CI run 'test/all-platforms' #513
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
run-name: "CI run '${{ github.head_ref || github.ref_name }}'" | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
pull_request: | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
build-test: | |
strategy: | |
matrix: | |
target: [ 'x86_64-unknown-linux-gnu', 'aarch64-unknown-linux-gnu', 'x86_64-pc-windows-msvc', 'x86_64-apple-darwin', 'aarch64-apple-darwin', 'wasm32-unknown-unknown' ] | |
include: | |
- target: x86_64-unknown-linux-gnu | |
os: ubuntu-latest | |
- target: aarch64-unknown-linux-gnu | |
os: ubuntu-latest | |
- target: x86_64-pc-windows-msvc | |
os: windows-latest | |
- target: x86_64-apple-darwin | |
os: macos-latest | |
- target: aarch64-apple-darwin | |
os: macos-latest | |
- target: wasm32-unknown-unknown | |
os: ubuntu-latest | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Cache | |
id: rust-cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/*/release/ | |
target/*/debug/build/ | |
target/*/debug/deps/ | |
key: ${{ matrix.target }}-cargo-${{ hashFiles('**/Cargo.toml', '.github/workflows/*.yml') }} | |
exclude: | | |
target/*/debug/incremental/ | |
target/*/.fingerprint/ | |
target/debug/examples/ | |
target/debug/incremental/ | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
target: ${{ matrix.target }} | |
components: rustfmt, clippy | |
default: true | |
- name: Build | |
run: cargo build --target=${{ matrix.target }} | |
- name: Run tests | |
if: ${{ !contains(matrix.os, 'windows') }} | |
# Skip tests on Windows as compaction tests are not supported | |
run: make test | |
ci: | |
runs-on: ubuntu-latest | |
env: | |
RUSTFLAGS: --deny warnings | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Cache | |
id: rust-cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ubuntu-ci-cargo-${{ hashFiles('**/Cargo.toml', '.github/workflows/*.yml') }} | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
components: rustfmt, clippy | |
default: true | |
- name: Install cargo-deny | |
run: which cargo-deny || cargo install --debug --locked [email protected] | |
- name: License check | |
run: cargo deny --all-features check licenses | |
- name: Clippy | |
run: cargo clippy --all --all-targets -- -Dwarnings | |
- name: Format | |
run: cargo fmt --all -- --check |