Skip to content

Commit

Permalink
CI: actions-rs -> dtolnay
Browse files Browse the repository at this point in the history
  • Loading branch information
newAM committed Oct 20, 2023
1 parent 7d3282b commit 1decffb
Showing 1 changed file with 18 additions and 48 deletions.
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

0 comments on commit 1decffb

Please sign in to comment.