diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7fe3a1b3..3b1cfcac 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 --package etherparse --all-features