Skip to content

Improve CI to make it work again #119

Improve CI to make it work again

Improve CI to make it work again #119

Workflow file for this run

---
name: Cargo build and test
on:
pull_request:
paths:
- .github/workflows/*.yml
- '**/*.rs'
- Cargo.toml
- Cargo.lock
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: "--deny warnings "
jobs:
build-and-test:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
rust: [stable, beta]
include:
- os: ubuntu-latest
rust: nightly
- os: ubuntu-latest
rust: 1.65.0
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: actions-rs/[email protected]
with:
toolchain: ${{ matrix.rust }}
default: true
- name: Install cargo-hack
uses: taiki-e/install-action@cargo-hack
- name: Build
run: cargo build
- name: Test
run: cargo hack --feature-powerset test
- name: Test with artificial delay
shell: bash
run: RUSTFLAGS+="--cfg oneshot_test_delay" cargo hack --feature-powerset test
- name: Test with loom
shell: bash
run: RUSTFLAGS+="--cfg loom" LOOM_MAX_BRANCHES=100000 cargo hack --feature-powerset test --test sync --test loom