Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 22 additions & 46 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,75 +45,47 @@ 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 != ''
run: cargo install cross --locked

- 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
Expand All @@ -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
Loading