Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: actions-rs -> dtolnay #392

Merged
merged 1 commit into from
Oct 20, 2023
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
66 changes: 18 additions & 48 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,10 @@ jobs:
${{ runner.OS }}-build-

- name: Install Rust
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly
target: x86_64-unknown-linux-gnu
components: miri
override: true

- name: Run miri
run: MIRIFLAGS=-Zmiri-ignore-leaks cargo miri test
Expand All @@ -59,18 +57,12 @@ jobs:
uses: actions/checkout@v4

- name: Install Rust
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@stable
with:
profile: minimal
toolchain: stable
override: true
components: rustfmt

- name: cargo fmt --check
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
run: cargo fmt --all -- --check

# Compilation check
check:
Expand Down Expand Up @@ -121,18 +113,13 @@ jobs:
${{ runner.OS }}-build-

- name: Install Rust ${{ matrix.toolchain }} with target (${{ matrix.target }})
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}
target: ${{ matrix.target }}
override: true
targets: ${{ matrix.target }}

- name: cargo check
uses: actions-rs/cargo@v1
with:
use-cross: false
command: check
args: --target=${{ matrix.target }} --no-default-features --features=${{ matrix.features }}
run: cargo check --target=${{ matrix.target }} --no-default-features --features=${{ matrix.features }}

doc:
name: doc
Expand Down Expand Up @@ -173,18 +160,12 @@ jobs:
${{ runner.OS }}-build-

- name: Install stable Rust with target (${{ matrix.target }})
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
target: ${{ matrix.target }}
override: true
targets: ${{ matrix.target }}

- name: cargo doc
uses: actions-rs/cargo@v1
with:
use-cross: false
command: doc
args: --target=${{ matrix.target }} --no-default-features --features=${{ matrix.features }}
run: cargo doc --target=${{ matrix.target }} --no-default-features --features=${{ matrix.features }}

# Run cpass tests
testcpass:
Expand Down Expand Up @@ -230,16 +211,13 @@ jobs:
${{ runner.OS }}-build-

- name: Install Rust ${{ matrix.toolchain }} with target (${{ matrix.target }})
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}
target: ${{ matrix.target }}
override: true
- uses: actions-rs/cargo@v1
with:
use-cross: false
command: test
args: --test cpass --target=${{ matrix.target }} --features=${{ matrix.features }} ${{ matrix.buildtype }}
targets: ${{ matrix.target }}

- name: cargo test
run: cargo test --test cpass --target=${{ matrix.target }} --features=${{ matrix.features }} ${{ matrix.buildtype }}

# Run test suite for UI
testtsan:
Expand Down Expand Up @@ -279,24 +257,20 @@ jobs:
${{ runner.OS }}-build-

- name: Install Rust ${{ matrix.toolchain }} with target (${{ matrix.target }})
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}
target: ${{ matrix.target }}
components: rust-src
override: true

- name: Export variables
run: |
echo RUSTFLAGS="-Z sanitizer=thread" >> $GITHUB_ENV
echo TSAN_OPTIONS="suppressions=$(pwd)/suppressions.txt" >> $GITHUB_ENV
echo $GITHUB_ENV

- uses: actions-rs/cargo@v1
with:
use-cross: false
command: test
args: -Zbuild-std --test tsan --target=${{ matrix.target }} --features=${{ matrix.features }} ${{ matrix.buildtype }} -- --test-threads=1
- name: cargo test
run: cargo test -Zbuild-std --test tsan --target=${{ matrix.target }} --features=${{ matrix.features }} ${{ matrix.buildtype }} -- --test-threads=1

# Run cfail tests on MSRV
testcfail:
Expand Down Expand Up @@ -331,11 +305,7 @@ jobs:
${{ runner.OS }}-build-

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: x86_64-unknown-linux-gnu
override: true
uses: dtolnay/rust-toolchain@stable

- name: Run cargo
run: cargo run
Expand Down
Loading