From f2886b7c76223de8dc60582a4edaa6a64f9f78cc Mon Sep 17 00:00:00 2001 From: Julian Schmid Date: Fri, 6 Mar 2026 19:25:35 +0100 Subject: [PATCH 1/2] Update ci jobs --- .github/workflows/main.yml | 68 ++++++++++++-------------------------- 1 file changed, 22 insertions(+), 46 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7fe3a1b3..b8a5b654 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -45,19 +45,15 @@ jobs: rust: stable-x86_64-gnu steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - - uses: actions-rs/toolchain@v1 + - uses: dtolnay/rust-toolchain@master with: - profile: minimal toolchain: ${{ matrix.rust }} - override: true - name: cargo build if: matrix.target == '' - uses: actions-rs/cargo@v1 - with: - command: build + run: cargo build - name: install cross if: matrix.target != '' @@ -65,55 +61,31 @@ jobs: - name: cross build if: matrix.target != '' - uses: actions-rs/cargo@v1 - with: - use-cross: true - command: build - args: --target ${{ matrix.target }} + run: cross build --target ${{ matrix.target }} - name: cargo test if: matrix.target == '' - uses: actions-rs/cargo@v1 - with: - command: test + run: cargo test - name: cross test if: matrix.target != '' - uses: actions-rs/cargo@v1 - with: - use-cross: true - command: test - args: --target ${{ matrix.target }} + run: cross test --target ${{ matrix.target }} - name: cargo build --no-default-features if: matrix.target == '' - uses: actions-rs/cargo@v1 - with: - command: build - args: --no-default-features + run: cargo build --no-default-features - name: cross build --no-default-features if: matrix.target != '' - uses: actions-rs/cargo@v1 - with: - use-cross: true - command: build - args: --target ${{ matrix.target }} --no-default-features + run: cross build --target ${{ matrix.target }} --no-default-features - name: cargo test --no-default-features if: matrix.target == '' - uses: actions-rs/cargo@v1 - with: - command: test - args: --no-default-features + run: cargo test --no-default-features - name: cross test --no-default-features if: matrix.target != '' - uses: actions-rs/cargo@v1 - with: - use-cross: true - command: test - args: --target ${{ matrix.target }} --no-default-features + run: cross test --target ${{ matrix.target }} --no-default-features no_std_build: name: no_std build @@ -122,18 +94,22 @@ jobs: run: working-directory: ./etherparse/ensure_no_std steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable with: - profile: minimal - toolchain: stable - target: x86_64-unknown-none - override: true + targets: x86_64-unknown-none - run: cargo build --target x86_64-unknown-none msrv: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: taiki-e/install-action@cargo-hack - - run: cargo hack check --rust-version --workspace --all-targets --ignore-private + - name: read rust-version from Cargo.toml + id: msrv + run: | + MSRV=$(sed -n 's/^rust-version *= *"\(.*\)"/\1/p' etherparse/Cargo.toml) + echo "version=$MSRV" >> "$GITHUB_OUTPUT" + - uses: dtolnay/rust-toolchain@master + with: + toolchain: ${{ steps.msrv.outputs.version }} + - run: cargo check --workspace --all-targets From 20e706cbedaed78050363a9040e0caa9764f36e2 Mon Sep 17 00:00:00 2001 From: Julian Schmid Date: Fri, 6 Mar 2026 19:34:06 +0100 Subject: [PATCH 2/2] Restrict the msrv build to the actual library. --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b8a5b654..3b1cfcac 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -112,4 +112,4 @@ jobs: - uses: dtolnay/rust-toolchain@master with: toolchain: ${{ steps.msrv.outputs.version }} - - run: cargo check --workspace --all-targets + - run: cargo check --package etherparse --all-features