Skip to content

Commit 827623a

Browse files
committed
fix: reduce CI after split from old workspace
1 parent 0f5077a commit 827623a

File tree

3 files changed

+10
-118
lines changed

3 files changed

+10
-118
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- uses: extractions/setup-just@v3
1717
- uses: actions-rust-lang/setup-rust-toolchain@v1
1818
- run: just check
19-
features:
19+
test:
2020
strategy:
2121
matrix:
2222
platform: [ubuntu-latest, macos-latest, windows-latest]
@@ -25,32 +25,4 @@ jobs:
2525
- uses: actions/checkout@v4
2626
- uses: extractions/setup-just@v3
2727
- uses: actions-rust-lang/setup-rust-toolchain@v1
28-
- run: just test features
29-
msrv:
30-
runs-on: ubuntu-latest
31-
steps:
32-
- uses: actions/checkout@v4
33-
- uses: extractions/setup-just@v3
34-
- uses: actions-rust-lang/setup-rust-toolchain@v1
35-
- run: just test msrv
36-
constraints:
37-
runs-on: ubuntu-latest
38-
steps:
39-
- uses: actions/checkout@v4
40-
- uses: extractions/setup-just@v3
41-
- uses: actions-rust-lang/setup-rust-toolchain@v1
42-
- run: just test constraints
43-
no-std:
44-
runs-on: ubuntu-latest
45-
steps:
46-
- uses: actions/checkout@v4
47-
- uses: extractions/setup-just@v3
48-
- uses: actions-rust-lang/setup-rust-toolchain@v1
49-
- run: just test no-std
50-
bench:
51-
runs-on: ubuntu-latest
52-
steps:
53-
- uses: actions/checkout@v4
54-
- uses: extractions/setup-just@v3
55-
- uses: actions-rust-lang/setup-rust-toolchain@v1
56-
- run: just bench
28+
- run: just test

.github/workflows/weekly-check.yml

Lines changed: 0 additions & 25 deletions
This file was deleted.

justfile

Lines changed: 8 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22
#
33
# The recipes make heavy use of `rustup`'s toolchain syntax (e.g. `cargo +nightly`). `rustup` is
44
# required on the system in order to intercept the `cargo` commands and to install and use the appropriate toolchain with components.
5-
#
6-
# The root directory of this workspace is "virtual", it has no source code itself, just a holder of crates. This means
7-
# the cargo commands generally run on all the child crates by default without the `--workspace` flag.
85

96
NIGHTLY_TOOLCHAIN := "nightly-2025-07-10"
107
STABLE_TOOLCHAIN := "1.88.0"
@@ -22,7 +19,7 @@ STABLE_TOOLCHAIN := "1.88.0"
2219
# Verify check, fails if anything is off. Good for CI.
2320
@_check-verify:
2421
cargo +{{NIGHTLY_TOOLCHAIN}} fmt --check
25-
# Lint all workspace members. Enable all feature flags. Check all targets (tests, examples) along with library code. Turn warnings into errors.
22+
# Enable all feature flags. Check all targets (tests, examples) along with library code. Turn warnings into errors.
2623
cargo +{{NIGHTLY_TOOLCHAIN}} clippy --all-features --all-targets -- -D warnings
2724
# Static analysis of types and lifetimes. Nightly toolchain required by benches target.
2825
cargo +{{NIGHTLY_TOOLCHAIN}} check --all-features --all-targets
@@ -36,75 +33,23 @@ STABLE_TOOLCHAIN := "1.88.0"
3633
# Adding --fix flag to apply suggestions with --allow-dirty.
3734
cargo +{{NIGHTLY_TOOLCHAIN}} clippy --all-features --all-targets --fix --allow-dirty -- -D warnings
3835

39-
# Run a test suite: features, msrv, constraints, no-std, or all.
36+
# Run the test suite.
4037
@test suite="features":
41-
just _test-{{suite}}
42-
43-
# Run all test suites.
44-
@_test-all: _test-features _test-msrv _test-constraints _test-no-std
45-
46-
# Test library with feature flag matrix compatability.
47-
@_test-features:
48-
# Test the extremes: all features enabled as well as none. If features are additive, this should expose conflicts.
49-
# If non-additive features (mutually exclusive) are defined, more specific commands are required.
50-
# Run all targets except benches which needs the nightly toolchain.
51-
cargo +{{STABLE_TOOLCHAIN}} test --no-default-features --lib --bins --tests --examples
5238
cargo +{{STABLE_TOOLCHAIN}} test --all-features --lib --bins --tests --examples
5339
cargo +{{STABLE_TOOLCHAIN}} test --all-features --doc
5440

55-
# Check code with MSRV compiler.
56-
@_test-msrv:
57-
# Handles creating sandboxed environments to ensure no newer binaries sneak in.
58-
cargo install cargo-msrv@0.18.4
59-
cargo msrv --manifest-path protocol/Cargo.toml verify --all-features
60-
cargo msrv --manifest-path traffic/Cargo.toml verify --all-features
61-
62-
# Check minimum and maximum dependency contraints.
63-
@_test-constraints:
64-
# Ensure that the workspace code works with dependency versions at both extremes. This checks
65-
# that we are not unintentionally using new feautures of a dependency or removed ones.
66-
# Skipping "--all-targets" for these checks since tests and examples are not relevant for a library consumer.
67-
# Enabling "--all-features" so all dependencies are checked.
68-
# Clear any previously resolved versions and re-resolve to the minimums.
69-
rm -f Cargo.lock
70-
cargo +{{NIGHTLY_TOOLCHAIN}} check --all-features -Z direct-minimal-versions
71-
# Clear again and check the maximums by ignoring any rust-version caps.
72-
rm -f Cargo.lock
73-
cargo +{{NIGHTLY_TOOLCHAIN}} check --all-features --ignore-rust-version
74-
rm -f Cargo.lock
75-
76-
# Test no standard library support.
77-
@_test-no-std:
78-
cargo install cross@0.2.5
79-
$HOME/.cargo/bin/cross build --package bip324 --target thumbv7m-none-eabi --no-default-features
80-
81-
# Run benchmarks.
82-
@bench:
83-
cargo +{{NIGHTLY_TOOLCHAIN}} bench --package bip324 --bench cipher_session
84-
85-
# Run fuzz target: receive_key or receive_garbage.
86-
@fuzz target seconds:
87-
rustup component add --toolchain {{NIGHTLY_TOOLCHAIN}} llvm-tools-preview
88-
cargo install cargo-fuzz@0.12.0
89-
# Generate new test cases and add to corpus. Bumping length for garbage.
90-
cd protocol && cargo +{{NIGHTLY_TOOLCHAIN}} fuzz run {{target}} -- -max_len=5120 -max_total_time={{seconds}}
91-
# Measure coverage of corpus against code.
92-
cd protocol && cargo +{{NIGHTLY_TOOLCHAIN}} fuzz coverage {{target}}
93-
# Generate HTML coverage report.
94-
protocol/fuzz/coverage.sh {{NIGHTLY_TOOLCHAIN}} {{target}}
95-
9641
# Add a release tag and publish to the upstream remote. Requires write privileges.
97-
@tag crate version remote="upstream":
42+
@tag crate version remote="origin":
9843
# Guardrails: on a clean main with updated changelog and manifest.
9944
if ! git diff --quiet || ! git diff --cached --quiet; then \
10045
echo "tag: Uncommitted changes"; exit 1; fi
10146
if [ "`git rev-parse --abbrev-ref HEAD`" != "main" ]; then \
10247
echo "tag: Not on main branch"; exit 1; fi
103-
if ! grep -q "## v{{version}}" {{crate}}/CHANGELOG.md; then \
48+
if ! grep -q "## v{{version}}" CHANGELOG.md; then \
10449
echo "tag: CHANGELOG.md entry missing for v{{version}}"; exit 1; fi
105-
if ! grep -q '^version = "{{version}}"' {{crate}}/Cargo.toml; then \
50+
if ! grep -q '^version = "{{version}}"' Cargo.toml; then \
10651
echo "tag: Cargo.toml version mismatch"; exit 1; fi
10752
# An annotated release tag is specific to a crate following the convention crate-version.
108-
echo "Adding release tag {{crate}}-v{{version}} and pushing to {{remote}}..."
109-
git tag -a {{crate}}-v{{version}} -m "Release v{{version}} for {{crate}}"
110-
git push {{remote}} {{crate}}-v{{version}}
53+
echo "Adding release tag v{{version}} and pushing to {{remote}}..."
54+
git tag -a v{{version}} -m "Release v{{version}}"
55+
git push {{remote}} v{{version}}

0 commit comments

Comments
 (0)