22
33on :
44 pull_request :
5- types : [ ' labeled', ' unlabeled', ' opened', ' synchronize', ' reopened' ]
5+ types : [" labeled", " unlabeled", " opened", " synchronize", " reopened" ]
66 merge_group :
77 push :
88 branches :
2424 tests :
2525 name : CI Test Suite
2626 if : " github.event_name != 'pull_request' || ! contains(github.event.pull_request.labels.*.name, 'flaky-test')"
27- uses : ' ./.github/workflows/tests.yaml'
27+ uses : " ./.github/workflows/tests.yaml"
2828
2929 cross_build :
3030 name : Cross Build Only
3535 fail-fast : false
3636 matrix :
3737 target :
38- # cross tests are currently broken vor armv7 and aarch64
39- # see https://github.com/cross-rs/cross/issues/1311
38+ # cross tests are currently broken vor armv7 and aarch64
39+ # see https://github.com/cross-rs/cross/issues/1311
4040 # - armv7-linux-androideabi
4141 # - aarch64-linux-android
4242 # Freebsd execution fails in cross
@@ -45,29 +45,29 @@ jobs:
4545 # Netbsd execution fails to link in cross
4646 # - x86_64-unknown-netbsd
4747 steps :
48- - name : Checkout
49- uses : actions/checkout@v4
50- with :
51- submodules : recursive
52-
53- - name : Install rust stable
54- uses : dtolnay/rust-toolchain@stable
55-
56- - name : Cleanup Docker
57- continue-on-error : true
58- run : |
59- docker kill $(docker ps -q)
60-
61- # See https://github.com/cross-rs/cross/issues/1222
62- - uses : taiki-e/install-action@cross
63-
64- - name : build
65- # cross tests are currently broken vor armv7 and aarch64
66- # see https://github.com/cross-rs/cross/issues/1311. So on
67- # those platforms we only build but do not run tests.
68- run : cross build --all --target ${{ matrix.target }}
69- env :
70- RUST_LOG : ${{ runner.debug && 'TRACE' || 'DEBUG'}}
48+ - name : Checkout
49+ uses : actions/checkout@v4
50+ with :
51+ submodules : recursive
52+
53+ - name : Install rust stable
54+ uses : dtolnay/rust-toolchain@stable
55+
56+ - name : Cleanup Docker
57+ continue-on-error : true
58+ run : |
59+ docker kill $(docker ps -q)
60+
61+ # See https://github.com/cross-rs/cross/issues/1222
62+ - uses : taiki-e/install-action@cross
63+
64+ - name : build
65+ # cross tests are currently broken vor armv7 and aarch64
66+ # see https://github.com/cross-rs/cross/issues/1311. So on
67+ # those platforms we only build but do not run tests.
68+ run : cross build --all --target ${{ matrix.target }}
69+ env :
70+ RUST_LOG : ${{ runner.debug && 'TRACE' || 'DEBUG'}}
7171
7272 android_build :
7373 name : Android Build Only
@@ -82,38 +82,38 @@ jobs:
8282 - aarch64-linux-android
8383 - armv7-linux-androideabi
8484 steps :
85- - name : Checkout
86- uses : actions/checkout@v4
87-
88- - name : Set up Rust
89- uses : dtolnay/rust-toolchain@stable
90- with :
91- target : ${{ matrix.target }}
92- - name : Install rustup target
93- run : rustup target add ${{ matrix.target }}
94-
95- - name : Setup Java
96- uses : actions/setup-java@v4
97- with :
98- distribution : ' temurin'
99- java-version : ' 17 '
100-
101- - name : Setup Android SDK
102- uses : android-actions/setup-android@v3
103-
104- - name : Setup Android NDK
105- uses : arqu/setup-ndk@main
106- id : setup-ndk
107- with :
108- ndk-version : r23
109- add-to-path : true
110-
111- - name : Build
112- env :
113- ANDROID_NDK_HOME : ${{ steps.setup-ndk.outputs.ndk-path }}
114- run : |
115- cargo install --version 3.5.4 cargo-ndk
116- cargo ndk --target ${{ matrix.target }} build
85+ - name : Checkout
86+ uses : actions/checkout@v4
87+
88+ - name : Set up Rust
89+ uses : dtolnay/rust-toolchain@stable
90+ with :
91+ target : ${{ matrix.target }}
92+ - name : Install rustup target
93+ run : rustup target add ${{ matrix.target }}
94+
95+ - name : Setup Java
96+ uses : actions/setup-java@v4
97+ with :
98+ distribution : " temurin"
99+ java-version : " 17 "
100+
101+ - name : Setup Android SDK
102+ uses : android-actions/setup-android@v3
103+
104+ - name : Setup Android NDK
105+ uses : arqu/setup-ndk@main
106+ id : setup-ndk
107+ with :
108+ ndk-version : r23
109+ add-to-path : true
110+
111+ - name : Build
112+ env :
113+ ANDROID_NDK_HOME : ${{ steps.setup-ndk.outputs.ndk-path }}
114+ run : |
115+ cargo install --version 3.5.4 cargo-ndk
116+ cargo ndk --target ${{ matrix.target }} build
117117
118118 cross_test :
119119 name : Cross Test
@@ -126,27 +126,26 @@ jobs:
126126 target :
127127 - i686-unknown-linux-gnu
128128 steps :
129- - name : Checkout
130- uses : actions/checkout@v4
131- with :
132- submodules : recursive
133-
134- - name : Install rust stable
135- uses : dtolnay/rust-toolchain@stable
129+ - name : Checkout
130+ uses : actions/checkout@v4
131+ with :
132+ submodules : recursive
136133
137- - name : Cleanup Docker
138- continue-on-error : true
139- run : |
140- docker kill $(docker ps -q)
134+ - name : Install rust stable
135+ uses : dtolnay/rust-toolchain@stable
141136
142- # See https://github.com/cross-rs/cross/issues/1222
143- - uses : taiki-e/install-action@cross
137+ - name : Cleanup Docker
138+ continue-on-error : true
139+ run : |
140+ docker kill $(docker ps -q)
144141
145- - name : test
146- run : cross test --all --target ${{ matrix.target }} -- --test-threads=12
147- env :
148- RUST_LOG : ${{ runner.debug && 'TRACE' || 'DEBUG' }}
142+ # See https://github.com/cross-rs/cross/issues/1222
143+ - uses : taiki-e/install-action@cross
149144
145+ - name : test
146+ run : cross test --all --target ${{ matrix.target }} -- --test-threads=12
147+ env :
148+ RUST_LOG : ${{ runner.debug && 'TRACE' || 'DEBUG' }}
150149
151150 wasm_build :
152151 name : Build wasm32
@@ -190,7 +189,7 @@ jobs:
190189 # uses: obi1kenobi/cargo-semver-checks-action@v2
191190 uses : n0-computer/cargo-semver-checks-action@feat-baseline
192191 with :
193- package : iroh, iroh-base, iroh-cli, iroh- dns-server, iroh-metrics, iroh-net, iroh-net-bench, iroh-node-util, iroh-router, netwatch, portmapper, iroh-relay, iroh-net-report
192+ package : iroh, iroh-base, iroh-dns-server, iroh-metrics, iroh-net, iroh-net-bench, iroh-node-util, iroh-router, netwatch, portmapper, iroh-relay, iroh-net-report
194193 baseline-rev : ${{ env.HEAD_COMMIT_SHA }}
195194 use-cache : false
196195
@@ -202,13 +201,13 @@ jobs:
202201 RUSTC_WRAPPER : " sccache"
203202 SCCACHE_GHA_ENABLED : " on"
204203 steps :
205- - uses : actions/checkout@v4
206- - uses : dtolnay/rust-toolchain@stable
207- with :
208- components : rustfmt
209- - uses : mozilla-actions/sccache-action@v0.0.6
210- - uses : taiki-e/install-action@cargo-make
211- - run : cargo make format-check
204+ - uses : actions/checkout@v4
205+ - uses : dtolnay/rust-toolchain@stable
206+ with :
207+ components : rustfmt
208+ - uses : mozilla-actions/sccache-action@v0.0.6
209+ - uses : taiki-e/install-action@cargo-make
210+ - run : cargo make format-check
212211
213212 check_docs :
214213 timeout-minutes : 30
@@ -218,17 +217,17 @@ jobs:
218217 RUSTC_WRAPPER : " sccache"
219218 SCCACHE_GHA_ENABLED : " on"
220219 steps :
221- - uses : actions/checkout@v4
222- - uses : dtolnay/rust-toolchain@master
223- with :
224- toolchain : nightly-2024-05-02
225- - name : Install sccache
226- uses : mozilla-actions/sccache-action@v0.0.6
227-
228- - name : Docs
229- run : cargo doc --workspace --all-features --no-deps --document-private-items
230- env :
231- RUSTDOCFLAGS : --cfg docsrs
220+ - uses : actions/checkout@v4
221+ - uses : dtolnay/rust-toolchain@master
222+ with :
223+ toolchain : nightly-2024-05-02
224+ - name : Install sccache
225+ uses : mozilla-actions/sccache-action@v0.0.6
226+
227+ - name : Docs
228+ run : cargo doc --workspace --all-features --no-deps --document-private-items
229+ env :
230+ RUSTDOCFLAGS : --cfg docsrs
232231
233232 clippy_check :
234233 timeout-minutes : 30
@@ -237,23 +236,23 @@ jobs:
237236 RUSTC_WRAPPER : " sccache"
238237 SCCACHE_GHA_ENABLED : " on"
239238 steps :
240- - uses : actions/checkout@v4
241- - uses : dtolnay/rust-toolchain@stable
242- with :
243- components : clippy
244- - name : Install sccache
245- uses : mozilla-actions/sccache-action@v0.0.6
239+ - uses : actions/checkout@v4
240+ - uses : dtolnay/rust-toolchain@stable
241+ with :
242+ components : clippy
243+ - name : Install sccache
244+ uses : mozilla-actions/sccache-action@v0.0.6
246245
247- # TODO: We have a bunch of platform-dependent code so should
248- # probably run this job on the full platform matrix
249- - name : clippy check (all features)
250- run : cargo clippy --workspace --all-features --all-targets --bins --tests --benches
246+ # TODO: We have a bunch of platform-dependent code so should
247+ # probably run this job on the full platform matrix
248+ - name : clippy check (all features)
249+ run : cargo clippy --workspace --all-features --all-targets --lib -- bins --tests --benches --examples
251250
252- - name : clippy check (no features)
253- run : cargo clippy --workspace --no-default-features --lib --bins --tests
251+ - name : clippy check (no features)
252+ run : cargo clippy --workspace --no-default-features --all-targets -- lib --bins --tests --benches --examples
254253
255- - name : clippy check (default features)
256- run : cargo clippy --workspace --all-targets
254+ - name : clippy check (default features)
255+ run : cargo clippy --workspace --all-targets --lib --bins --tests --benches --examples
257256
258257 msrv :
259258 if : " github.event_name != 'pull_request' || ! contains(github.event.pull_request.labels.*.name, 'flaky-test')"
@@ -264,16 +263,16 @@ jobs:
264263 RUSTC_WRAPPER : " sccache"
265264 SCCACHE_GHA_ENABLED : " on"
266265 steps :
267- - uses : actions/checkout@v4
268- - uses : dtolnay/rust-toolchain@master
269- with :
270- toolchain : ${{ env.MSRV }}
271- - name : Install sccache
272- uses : mozilla-actions/sccache-action@v0.0.6
266+ - uses : actions/checkout@v4
267+ - uses : dtolnay/rust-toolchain@master
268+ with :
269+ toolchain : ${{ env.MSRV }}
270+ - name : Install sccache
271+ uses : mozilla-actions/sccache-action@v0.0.6
273272
274- - name : Check MSRV all features
275- run : |
276- cargo +$MSRV check --workspace --all-targets
273+ - name : Check MSRV all features
274+ run : |
275+ cargo +$MSRV check --workspace --all-targets
277276
278277 cargo_deny :
279278 timeout-minutes : 30
@@ -290,73 +289,19 @@ jobs:
290289 netsim-integration-tests :
291290 permissions : write-all
292291 if : " github.event_name != 'pull_request' || ! contains(github.event.pull_request.labels.*.name, 'flaky-test')"
293- uses : ' ./.github/workflows/netsim_runner.yaml'
292+ uses : " ./.github/workflows/netsim_runner.yaml"
294293 secrets : inherit
295294 with :
296295 branch : ${{ github.ref }}
297296 max_workers : 4
298297 netsim_branch : " main"
299- sim_paths : " sims/iroh /iroh.json,sims/integration "
298+ sim_paths : " sims/iroh_v2 /iroh.json,sims/integration_v2 "
300299 pr_number : ${{ github.event.pull_request.number || '' }}
301300
302- docker_build_and_test :
303- name : Docker Test
304- if : " github.event_name != 'pull_request' || ! contains(github.event.pull_request.labels.*.name, 'flaky-test')"
305- timeout-minutes : 30
306- runs-on : [self-hosted, linux, X64]
307- steps :
308- - name : Checkout
309- uses : actions/checkout@v4
310-
311- - name : Install rust
312- uses : dtolnay/rust-toolchain@master
313- with :
314- toolchain : stable
315-
316- - name : Install sccache
317- uses : mozilla-actions/sccache-action@v0.0.6
318-
319- - name : Prep
320- run : sudo apt-get install musl-tools -y
321-
322- - name : Build iroh
323- run : cargo build --profile=dev-ci --all-features --bin iroh --target x86_64-unknown-linux-musl
324-
325- - name : Prep bins
326- run : |
327- mkdir -p bins/linux/amd64
328- cp target/x86_64-unknown-linux-musl/dev-ci/iroh bins/linux/amd64/iroh
329-
330- - name : Cleanup Docker
331- continue-on-error : true
332- run : |
333- docker kill $(docker ps -q)
334-
335- - name : Set up Docker Buildx
336- uses : docker/setup-buildx-action@v3
337-
338- - name : Build Docker image
339- uses : docker/build-push-action@v6
340- with :
341- context : .
342- push : false
343- load : true
344- tags : n0computer/iroh-test:latest
345- target : iroh
346- platforms : linux/amd64
347- file : docker/Dockerfile.ci
348-
349- - name : Run Docker image & stats test
350- run : |
351- docker run -p 9090:9090 -p 4919:4919/udp -Pd n0computer/iroh-test:latest --rpc-addr 0.0.0.0:4919 start
352- # Give the server time to start
353- sleep 3
354- target/x86_64-unknown-linux-musl/dev-ci/iroh --rpc-addr 127.0.0.1:4919 stats
355-
356301 codespell :
357302 timeout-minutes : 30
358303 runs-on : ubuntu-latest
359304 steps :
360- - uses : actions/checkout@v4
361- - run : pip install --user codespell[toml]
362- - run : codespell --ignore-words-list=ans,atmost,crate,inout,ratatui,ser,stayin,swarmin,worl --skip=CHANGELOG.md
305+ - uses : actions/checkout@v4
306+ - run : pip install --user codespell[toml]
307+ - run : codespell --ignore-words-list=ans,atmost,crate,inout,ratatui,ser,stayin,swarmin,worl --skip=CHANGELOG.md
0 commit comments