@@ -3,7 +3,7 @@ on: [pull_request]
33
44name : Rust
55jobs :
6- test :
6+ heed- test :
77 name : Test the heed project
88 runs-on : ${{ matrix.os }}
99 strategy :
1313 - os : ubuntu-latest
1414 - os : windows-latest
1515 - os : macos-latest
16+ steps :
17+ - uses : actions/checkout@v2
18+ with :
19+ submodules : recursive
20+ - uses : actions-rs/toolchain@v1
21+ with :
22+ profile : minimal
23+ toolchain : stable
24+ override : true
25+ - name : Run cargo test
26+ run : |
27+ cargo clean
28+ cargo test
1629
30+ heed3-test :
31+ name : Test the heed3 project
32+ runs-on : ${{ matrix.os }}
33+ strategy :
34+ matrix :
35+ os : [ubuntu-latest, windows-latest, macos-latest]
36+ include :
37+ - os : ubuntu-latest
38+ - os : windows-latest
39+ - os : macos-latest
1740 steps :
1841 - uses : actions/checkout@v2
1942 with :
2649 - name : Run cargo test
2750 run : |
2851 cargo clean
52+ bash convert-to-heed3.sh
2953 cargo test
3054
3155 check-heed3 :
3862 - os : ubuntu-latest
3963 - os : windows-latest
4064 - os : macos-latest
41-
4265 steps :
4366 - uses : actions/checkout@v2
4467 with :
6588 include :
6689 - os : ubuntu-latest
6790 - os : macos-latest
68-
6991 steps :
7092 - uses : actions/checkout@v2
7193 with :
7597 profile : minimal
7698 toolchain : stable
7799 override : true
100+ - id : check_toml
101+ run : |
102+ if grep -q 'name = "heed3"' heed/Cargo.toml; then
103+ echo "should_skip=true" >> $GITHUB_OUTPUT
104+ else
105+ echo "should_skip=false" >> $GITHUB_OUTPUT
106+ fi
78107 - name : Run cargo test
108+ # Skip it if the CI is running with the heed3 Cargo.toml
109+ if : ${{ steps.check_toml.outputs.should_skip == 'false' }}
79110 run : |
80111 cargo clean
81112 cargo check --all-features -p heed
91122 include :
92123 - os : ubuntu-latest
93124 - os : macos-latest
94-
95125 steps :
96126 - uses : actions/checkout@v2
97127 with :
@@ -116,7 +146,6 @@ jobs:
116146 include :
117147 - os : ubuntu-latest
118148 - os : macos-latest
119-
120149 steps :
121150 - uses : actions/checkout@v2
122151 with :
@@ -126,7 +155,16 @@ jobs:
126155 profile : minimal
127156 toolchain : stable
128157 override : true
158+ - id : check_toml
159+ run : |
160+ if grep -q 'name = "heed3"' heed/Cargo.toml; then
161+ echo "should_skip=true" >> $GITHUB_OUTPUT
162+ else
163+ echo "should_skip=false" >> $GITHUB_OUTPUT
164+ fi
129165 - name : Run the examples
166+ # Skip it if the CI is running with the heed3 Cargo.toml
167+ if : ${{ steps.check_toml.outputs.should_skip == 'false' }}
130168 run : |
131169 cargo clean
132170 # rmp-serde needs a feature activated, so we'll just run it separately.
@@ -142,7 +180,6 @@ jobs:
142180 include :
143181 - os : ubuntu-latest
144182 - os : macos-latest
145-
146183 steps :
147184 - uses : actions/checkout@v2
148185 with :
@@ -158,8 +195,26 @@ jobs:
158195 bash convert-to-heed3.sh
159196 cargo run --example 2>&1 | grep -E '^ '| xargs -n1 cargo run --example
160197
198+ clippy :
199+ name : Ensure clippy is happy on heed and heed3
200+ runs-on : ubuntu-latest
201+ steps :
202+ - uses : actions/checkout@v2
203+ with :
204+ submodules : recursive
205+ - uses : actions-rs/toolchain@v1
206+ with :
207+ profile : minimal
208+ toolchain : stable
209+ override : true
210+ - name : Run the examples
211+ run : |
212+ cargo clippy --all-targets -- --deny warnings
213+ bash convert-to-heed3.sh
214+ cargo clippy --all-targets -- --deny warnings
215+
161216 fmt :
162- name : Ensure the heed project is formatted
217+ name : Ensure the heed and heed3 project are formatted
163218 runs-on : ubuntu-latest
164219 steps :
165220 - uses : actions/checkout@v2
@@ -170,7 +225,10 @@ jobs:
170225 override : true
171226 components : rustfmt
172227 - name : Run cargo fmt
173- run : cargo fmt --check
228+ run : |
229+ cargo fmt --check
230+ bash convert-to-heed3.sh
231+ cargo fmt --check
174232
175233 no-heed3-in-heed-folder :
176234 name : Ensure heed3 is not erasing heed
0 commit comments