Skip to content

Commit

Permalink
Revamp CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Speykious committed Feb 21, 2024
1 parent cc8062d commit 25c925d
Showing 1 changed file with 63 additions and 18 deletions.
81 changes: 63 additions & 18 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,33 +1,78 @@

name: CI

on:
push:
branches: [main]
pull_request:
workflow_dispatch:

permissions:
contents: read

jobs:
test:
name: Test suite
runs-on:
- ubuntu-latest
- windows-latest
timeout-minutes: 2
check:
name: Check (${{ matrix.os.name }} | ${{ matrix.profile.title }})
runs-on: ${{ matrix.os.runner }}
strategy:
fail-fast: false
matrix:
os:
- name: Linux (x64)
runner: ubuntu-latest
target: x86_64-unknown-linux-gnu

- name: Linux (ARM)
runner: ubuntu-latest
target: aarch64-unknown-linux-gnu

- name: MacOS (x64)
runner: macos-latest
target: x86_64-apple-darwin

- name: MacOS (ARM)
runner: macos-latest
target: aarch64-apple-darwin

- name: Windows (x64)
runner: windows-latest
target: x86_64-pc-windows-msvc

profile:
- title: Debug
arg: --debug

- title: Release
arg: --release

steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
- run: cargo test

test-release:
name: Test suite
runs-on:
- ubuntu-latest
- windows-latest
timeout-minutes: 2

- uses: dtolnay/[email protected]
with:
targets: ${{ matrix.os.target }}

- name: Build (${{ matrix.profile.title }})
run: cargo build ${{ matrix.profile.arg }} --all-features

- name: Test (${{ matrix.profile.title }})
run: cargo test ${{ matrix.profile.arg }} --all-features

miri:
name: Miri
runs-on: ${{ matrix.os.runner }}
strategy:
matrix:
os:
- name: Linux (x64)
runner: ubuntu-latest
target: x86_64-unknown-linux-gnu

steps:
- uses: actions/checkout@v4

- uses: dtolnay/rust-toolchain@nightly
- run: cargo test --release
with:
targets: ${{ matrix.os.target }}
components: miri

- name: Make sure Miri is still too strong
run: "! cargo +nightly miri test"

0 comments on commit 25c925d

Please sign in to comment.