Skip to content

Commit 313662b

Browse files
committed
Auto-format GitHub actions
1 parent 948faa7 commit 313662b

File tree

2 files changed

+167
-175
lines changed

2 files changed

+167
-175
lines changed

.github/workflows/build.yml

Lines changed: 166 additions & 174 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ name: Build
33
on:
44
push:
55
branches:
6-
- 'master'
6+
- "master"
77
tags:
8-
- '*'
8+
- "*"
99
schedule:
10-
- cron: '40 4 * * *' # every day at 4:40
10+
- cron: "40 4 * * *" # every day at 4:40
1111
pull_request:
1212

1313
jobs:
@@ -21,210 +21,202 @@ jobs:
2121
- 1.57
2222
runs-on: ubuntu-latest
2323
steps:
24-
- uses: actions/checkout@v3
25-
- uses: actions-rs/toolchain@v1
26-
with:
27-
profile: minimal
28-
toolchain: ${{ matrix.rust }}
29-
override: true
30-
- name: Run cargo build for stable
31-
if: matrix.rust != 1.57
32-
uses: actions-rs/cargo@v1
33-
with:
34-
command: build
35-
args: --no-default-features --features instructions
36-
- name: Run cargo build for stable without instructions
37-
uses: actions-rs/cargo@v1
38-
with:
39-
command: build
40-
args: --no-default-features
41-
- name: Run cargo doc for stable
42-
if: matrix.rust != 1.57
43-
uses: actions-rs/cargo@v1
44-
with:
45-
command: doc
46-
args: --no-default-features --features instructions
47-
- name: Run cargo doc for stable without instructions
48-
uses: actions-rs/cargo@v1
49-
with:
50-
command: doc
51-
args: --no-default-features
52-
- name: Run cargo test for stable
53-
if: matrix.rust != 1.57
54-
uses: actions-rs/cargo@v1
55-
with:
56-
command: test
57-
args: --no-default-features --features instructions
58-
- name: Run cargo test for stable without instructions
59-
uses: actions-rs/cargo@v1
60-
with:
61-
command: test
62-
args: --no-default-features
24+
- uses: actions/checkout@v3
25+
- uses: actions-rs/toolchain@v1
26+
with:
27+
profile: minimal
28+
toolchain: ${{ matrix.rust }}
29+
override: true
30+
- name: Run cargo build for stable
31+
if: matrix.rust != 1.57
32+
uses: actions-rs/cargo@v1
33+
with:
34+
command: build
35+
args: --no-default-features --features instructions
36+
- name: Run cargo build for stable without instructions
37+
uses: actions-rs/cargo@v1
38+
with:
39+
command: build
40+
args: --no-default-features
41+
- name: Run cargo doc for stable
42+
if: matrix.rust != 1.57
43+
uses: actions-rs/cargo@v1
44+
with:
45+
command: doc
46+
args: --no-default-features --features instructions
47+
- name: Run cargo doc for stable without instructions
48+
uses: actions-rs/cargo@v1
49+
with:
50+
command: doc
51+
args: --no-default-features
52+
- name: Run cargo test for stable
53+
if: matrix.rust != 1.57
54+
uses: actions-rs/cargo@v1
55+
with:
56+
command: test
57+
args: --no-default-features --features instructions
58+
- name: Run cargo test for stable without instructions
59+
uses: actions-rs/cargo@v1
60+
with:
61+
command: test
62+
args: --no-default-features
6363

6464
test:
6565
name: "Test"
6666

6767
strategy:
6868
fail-fast: false
6969
matrix:
70-
platform: [
71-
ubuntu-latest,
72-
macos-latest,
73-
windows-latest
74-
]
70+
platform: [ubuntu-latest, macos-latest, windows-latest]
7571

7672
runs-on: ${{ matrix.platform }}
7773
timeout-minutes: 15
7874

7975
steps:
80-
- uses: actions/checkout@v3
81-
- uses: actions-rs/toolchain@v1
82-
with:
83-
profile: minimal
84-
toolchain: nightly
85-
override: true
86-
target: x86_64-unknown-linux-musl
87-
88-
- name: "Print Rust Version"
89-
run: |
90-
rustc -Vv
91-
cargo -Vv
92-
93-
- name: "Run cargo build"
94-
uses: actions-rs/cargo@v1
95-
with:
96-
command: build
97-
98-
- name: "Run cargo doc"
99-
uses: actions-rs/cargo@v1
100-
with:
101-
command: doc
102-
103-
- name: "Run cargo build on musl"
104-
uses: actions-rs/cargo@v1
105-
with:
106-
command: build
107-
args: --target x86_64-unknown-linux-musl
108-
if: runner.os == 'Linux'
109-
110-
- name: "Run cargo test"
111-
uses: actions-rs/cargo@v1
112-
with:
113-
command: test
114-
115-
- name: "Run cargo test on musl"
116-
uses: actions-rs/cargo@v1
117-
with:
118-
command: test
119-
args: --target x86_64-unknown-linux-musl
120-
if: runner.os == 'Linux'
121-
122-
- name: "Install Rustup Targets"
123-
run: |
124-
rustup target add i686-unknown-linux-gnu
125-
rustup target add thumbv7em-none-eabihf
126-
- name: 'Build on non x86_64 platforms'
127-
run: |
128-
cargo build --target i686-unknown-linux-gnu --no-default-features --features nightly
129-
cargo build --target thumbv7em-none-eabihf --no-default-features --features nightly
76+
- uses: actions/checkout@v3
77+
- uses: actions-rs/toolchain@v1
78+
with:
79+
profile: minimal
80+
toolchain: nightly
81+
override: true
82+
target: x86_64-unknown-linux-musl
83+
84+
- name: "Print Rust Version"
85+
run: |
86+
rustc -Vv
87+
cargo -Vv
88+
89+
- name: "Run cargo build"
90+
uses: actions-rs/cargo@v1
91+
with:
92+
command: build
93+
94+
- name: "Run cargo doc"
95+
uses: actions-rs/cargo@v1
96+
with:
97+
command: doc
98+
99+
- name: "Run cargo build on musl"
100+
uses: actions-rs/cargo@v1
101+
with:
102+
command: build
103+
args: --target x86_64-unknown-linux-musl
104+
if: runner.os == 'Linux'
105+
106+
- name: "Run cargo test"
107+
uses: actions-rs/cargo@v1
108+
with:
109+
command: test
110+
111+
- name: "Run cargo test on musl"
112+
uses: actions-rs/cargo@v1
113+
with:
114+
command: test
115+
args: --target x86_64-unknown-linux-musl
116+
if: runner.os == 'Linux'
117+
118+
- name: "Install Rustup Targets"
119+
run: |
120+
rustup target add i686-unknown-linux-gnu
121+
rustup target add thumbv7em-none-eabihf
122+
- name: "Build on non x86_64 platforms"
123+
run: |
124+
cargo build --target i686-unknown-linux-gnu --no-default-features --features nightly
125+
cargo build --target thumbv7em-none-eabihf --no-default-features --features nightly
130126
131127
bootloader-test:
132128
name: "Bootloader Integration Test"
133129

134130
strategy:
135131
fail-fast: false
136132
matrix:
137-
platform: [
138-
ubuntu-latest,
139-
macos-latest,
140-
windows-latest
141-
]
133+
platform: [ubuntu-latest, macos-latest, windows-latest]
142134

143135
runs-on: ${{ matrix.platform }}
144136
timeout-minutes: 15
145137

146138
steps:
147-
- name: "Checkout Repository"
148-
uses: actions/checkout@v3
149-
150-
- name: Cache binaries
151-
id: cache-bin
152-
uses: actions/cache@v3
153-
with:
154-
path: binaries
155-
key: ${{ runner.OS }}-binaries
156-
- name: Add binaries/bin to PATH
157-
run: echo "$GITHUB_WORKSPACE/binaries/bin" >> $GITHUB_PATH
158-
shell: bash
159-
160-
- name: "Install Rustup Components"
161-
uses: actions-rs/toolchain@v1
162-
with:
163-
toolchain: nightly
164-
override: true
165-
profile: minimal
166-
components: rust-src, llvm-tools-preview
167-
- name: "Install cargo-xbuild"
168-
run: cargo install cargo-xbuild --debug --root binaries
169-
- name: "Install bootimage"
170-
run: cargo install bootimage --debug --root binaries
171-
172-
# install QEMU
173-
- name: Install QEMU (Linux)
174-
run: |
175-
sudo apt update
176-
sudo apt install qemu-system-x86
177-
if: runner.os == 'Linux'
178-
- name: Install QEMU (macOS)
179-
run: brew install qemu
180-
if: runner.os == 'macOS'
181-
env:
182-
HOMEBREW_NO_AUTO_UPDATE: 1
183-
HOMEBREW_NO_BOTTLE_SOURCE_FALLBACK: 1
184-
HOMEBREW_NO_INSTALL_CLEANUP: 1
185-
- name: Install QEMU (Windows)
186-
run: |
187-
choco install qemu --version 2021.5.5
188-
echo "$Env:Programfiles\qemu" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
189-
if: runner.os == 'Windows'
190-
shell: pwsh
191-
192-
- name: "Print QEMU Version"
193-
run: qemu-system-x86_64 --version
194-
195-
- name: "Run Test Framework"
196-
run: cargo xtest
197-
working-directory: 'testing'
139+
- name: "Checkout Repository"
140+
uses: actions/checkout@v3
141+
142+
- name: Cache binaries
143+
id: cache-bin
144+
uses: actions/cache@v3
145+
with:
146+
path: binaries
147+
key: ${{ runner.OS }}-binaries
148+
- name: Add binaries/bin to PATH
149+
run: echo "$GITHUB_WORKSPACE/binaries/bin" >> $GITHUB_PATH
150+
shell: bash
151+
152+
- name: "Install Rustup Components"
153+
uses: actions-rs/toolchain@v1
154+
with:
155+
toolchain: nightly
156+
override: true
157+
profile: minimal
158+
components: rust-src, llvm-tools-preview
159+
- name: "Install cargo-xbuild"
160+
run: cargo install cargo-xbuild --debug --root binaries
161+
- name: "Install bootimage"
162+
run: cargo install bootimage --debug --root binaries
163+
164+
# install QEMU
165+
- name: Install QEMU (Linux)
166+
run: |
167+
sudo apt update
168+
sudo apt install qemu-system-x86
169+
if: runner.os == 'Linux'
170+
- name: Install QEMU (macOS)
171+
run: brew install qemu
172+
if: runner.os == 'macOS'
173+
env:
174+
HOMEBREW_NO_AUTO_UPDATE: 1
175+
HOMEBREW_NO_BOTTLE_SOURCE_FALLBACK: 1
176+
HOMEBREW_NO_INSTALL_CLEANUP: 1
177+
- name: Install QEMU (Windows)
178+
run: |
179+
choco install qemu --version 2021.5.5
180+
echo "$Env:Programfiles\qemu" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
181+
if: runner.os == 'Windows'
182+
shell: pwsh
183+
184+
- name: "Print QEMU Version"
185+
run: qemu-system-x86_64 --version
186+
187+
- name: "Run Test Framework"
188+
run: cargo xtest
189+
working-directory: "testing"
198190

199191
check_formatting:
200192
name: "Check Formatting"
201193
runs-on: ubuntu-latest
202194
timeout-minutes: 2
203195
steps:
204-
- uses: actions/checkout@v3
205-
- uses: actions-rs/toolchain@v1
206-
with:
207-
toolchain: nightly
208-
override: true
209-
profile: minimal
210-
components: rustfmt
211-
- uses: actions-rs/cargo@v1
212-
with:
213-
command: fmt
214-
args: --all -- --check
196+
- uses: actions/checkout@v3
197+
- uses: actions-rs/toolchain@v1
198+
with:
199+
toolchain: nightly
200+
override: true
201+
profile: minimal
202+
components: rustfmt
203+
- uses: actions-rs/cargo@v1
204+
with:
205+
command: fmt
206+
args: --all -- --check
215207

216208
clippy:
217209
name: "Clippy"
218210
runs-on: ubuntu-latest
219211
timeout-minutes: 10
220212
steps:
221-
- uses: actions/checkout@v3
222-
- uses: actions-rs/toolchain@v1
223-
with:
224-
toolchain: nightly
225-
override: true
226-
profile: minimal
227-
components: clippy
228-
- uses: actions-rs/cargo@v1
229-
with:
230-
command: clippy
213+
- uses: actions/checkout@v3
214+
- uses: actions-rs/toolchain@v1
215+
with:
216+
toolchain: nightly
217+
override: true
218+
profile: minimal
219+
components: clippy
220+
- uses: actions-rs/cargo@v1
221+
with:
222+
command: clippy

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Release
33
on:
44
push:
55
branches:
6-
- 'master'
6+
- "master"
77

88
jobs:
99
release:

0 commit comments

Comments
 (0)