Skip to content

Commit

Permalink
chore: introduce github actions CI
Browse files Browse the repository at this point in the history
  • Loading branch information
jeluard committed Dec 17, 2024
1 parent 89e18eb commit 68134c0
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Continuous Integration

on:
workflow_dispatch:
push:
branches: ["main"]
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
branches: ["*"]

env:
CARGO_TERM_COLOR: always

jobs:
build:
name: Build on ${{ matrix.environments.runner }} with target ${{ matrix.environments.target }}
strategy:
fail-fast: false
matrix:
environments:
- runner: ubuntu-latest
target: x86_64-unknown-linux-gnu
- runner: ubuntu-latest
target: wasm32-unknown-unknown
optional: true
- runner: macos-latest
target: x86_64-apple-darwin
timeout-minutes: 30
runs-on: ${{ matrix.environments.runner }}
continue-on-error: ${{ matrix.environments.optional || false }}
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.ref == 'refs/heads/main' }}
- uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.environments.target }}
- name: Check format
run: cargo fmt --all -- --check
- name: Run clippy
run: cargo clippy --all-targets --all-features -- -D warnings
- name: Run tests
run: cargo test --locked --all-features --workspace --target ${{ matrix.environments.target }}

0 comments on commit 68134c0

Please sign in to comment.