Skip to content

Commit a62a2bd

Browse files
feat: fix minimal crates selection (#3255)
Depends on - [x] n0-computer/net-tools#19 - [x] n0-computer/n0-future#3
1 parent 1957ca8 commit a62a2bd

File tree

7 files changed

+147
-40
lines changed

7 files changed

+147
-40
lines changed

.github/workflows/ci.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,8 @@ jobs:
150150
wasm_test:
151151
name: Build & test wasm32 for browsers
152152
runs-on: ubuntu-latest
153+
env:
154+
RUSTFLAGS: '--cfg getrandom_backend="wasm_js"'
153155
steps:
154156
- name: Checkout sources
155157
uses: actions/checkout@v4
@@ -167,7 +169,7 @@ jobs:
167169

168170
- name: Install cargo-binstall
169171
uses: cargo-bins/cargo-binstall@main
170-
172+
171173
- name: Install wasm-bindgen-test-runner
172174
run: cargo binstall wasm-bindgen-cli --locked --no-confirm
173175

.github/workflows/tests.yaml

+68
Original file line numberDiff line numberDiff line change
@@ -236,3 +236,71 @@ jobs:
236236
path: output
237237
retention-days: 1
238238
compression-level: 0
239+
240+
minimal-crates:
241+
runs-on: ${{ matrix.runner }}
242+
strategy:
243+
fail-fast: false
244+
matrix:
245+
name: [ubuntu-latest, macOS-arm-latest] # TODO: windows
246+
include:
247+
- name: ubuntu-latest
248+
os: ubuntu-latest
249+
release-os: linux
250+
release-arch: amd64
251+
runner: [self-hosted, linux, X64]
252+
- name: macOS-arm-latest
253+
os: macOS-latest
254+
release-os: darwin
255+
release-arch: aarch64
256+
runner: [self-hosted, macOS, ARM64]
257+
steps:
258+
- uses: actions/checkout@v4
259+
- uses: dtolnay/rust-toolchain@nightly
260+
- name: cargo check
261+
run: |
262+
rm -f Cargo.lock
263+
cargo +nightly check -Z minimal-versions --workspace --all-features --lib --bins
264+
265+
minimal-crates-windows:
266+
timeout-minutes: 30
267+
name: "Minimal Crates (Windows)"
268+
runs-on: ${{ matrix.runner }}
269+
strategy:
270+
fail-fast: false
271+
matrix:
272+
name: [windows-latest]
273+
rust: ["${{ inputs.rust-version}}"]
274+
target:
275+
- x86_64-pc-windows-msvc
276+
include:
277+
- name: windows-latest
278+
os: windows
279+
runner: [self-hosted, windows, x64]
280+
env:
281+
# Using self-hosted runners so use local cache for sccache and
282+
# not SCCACHE_GHA_ENABLED.
283+
RUSTC_WRAPPER: "sccache"
284+
steps:
285+
- name: Checkout
286+
uses: actions/checkout@v4
287+
with:
288+
ref: ${{ inputs.git-ref }}
289+
290+
- name: Install Rust nightly
291+
run: |
292+
rustup toolchain install nightly
293+
rustup target add ${{ matrix.target }}
294+
rustup set default-host ${{ matrix.target }}
295+
296+
- name: Install sccache
297+
uses: mozilla-actions/[email protected]
298+
299+
- uses: msys2/setup-msys2@v2
300+
with:
301+
release: false
302+
303+
- name: cargo check
304+
run: |
305+
rm -Force Cargo.lock
306+
cargo +nightly check -Z minimal-versions --workspace --all-features --lib --bins

Cargo.lock

+53-28
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

iroh-base/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ workspace = true
1717
[dependencies]
1818
curve25519-dalek = { version = "4.1.3", features = ["serde", "rand_core", "zeroize"], optional = true }
1919
data-encoding = { version = "2.3.3", optional = true }
20-
ed25519-dalek = { version = "2.0.0", features = ["serde", "rand_core", "zeroize"], optional = true }
20+
ed25519-dalek = { version = "2.1.1", features = ["serde", "rand_core", "zeroize"], optional = true }
2121
derive_more = { version = "1.0.0", features = ["display"], optional = true }
22-
url = { version = "2.5", features = ["serde"], optional = true }
22+
url = { version = "2.5.3", features = ["serde"], optional = true }
2323
postcard = { version = "1", default-features = false, features = ["alloc", "use-std", "experimental-derive"], optional = true }
2424
rand_core = { version = "0.6.4", optional = true }
2525
serde = { version = "1", features = ["derive", "rc"] }

iroh-dns-server/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ tower_governor = "0.7"
5454
tracing = "0.1"
5555
tracing-subscriber = "0.3.18"
5656
ttl_cache = "0.5.1"
57-
url = "2.5"
57+
url = "2.5.3"
5858
z32 = "1.1.1"
5959

6060
[dev-dependencies]

0 commit comments

Comments
 (0)