Initial book #97
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: Continuous Integration | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
- release/* | |
tags: | |
- v* | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
jobs: | |
conformance: | |
name: Conformance | |
runs-on: "ubuntu-latest" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install Platform Dependencies | |
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev mold | |
- name: Cache Rust | |
uses: actions/cache@v3 | |
with: | |
key: ${{ runner.os }}-nightly-${{ hashFiles('Cargo.toml') }} | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
- name: Setup Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: nightly | |
components: rustfmt, clippy | |
target: wasm32-unknown-unknown | |
override: true | |
- name: Commit Lint | |
uses: gsactions/commit-message-checker@v1 | |
with: | |
pattern: "^(feat|fix|refactor|tweak|style|test|docs|ci|chore): " | |
error: "One of the commit messages doesn't conform to the commit style of the project." | |
excludeTitle: "true" | |
excludeDescription: "true" | |
checkAllCommitMessages: "true" | |
accessToken: ${{ secrets.GITHUB_TOKEN }} | |
- name: Line Lint | |
uses: fernandrone/[email protected] | |
id: linelint | |
- name: Rustfmt | |
uses: actions-rs/cargo@v1 | |
with: | |
command: fmt | |
args: --all -- --check | |
- name: Clippy (native) | |
uses: actions-rs/cargo@v1 | |
with: | |
command: clippy | |
args: --all-targets -- --deny warnings | |
- name: Clippy (wasm) | |
uses: actions-rs/cargo@v1 | |
with: | |
command: clippy | |
args: --all-targets --target wasm32-unknown-unknown --no-default-features --features wasm-development -- --deny warnings | |
build-native: | |
strategy: | |
matrix: | |
os: | |
- windows-latest | |
- macos-latest | |
- ubuntu-latest | |
name: Build (${{ matrix.os }}) | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup Linux | |
if: runner.os == 'Linux' | |
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev mold | |
- name: Setup macOS | |
if: runner.os == 'macOS' | |
run: brew install llvm && echo "PATH=$(brew --prefix)/opt/llvm/bin:$PATH" >> $GITHUB_ENV | |
- name: Cache Rust | |
uses: actions/cache@v3 | |
with: | |
key: ${{ runner.os }}-${{ matrix.rust }}-${{ hashFiles('Cargo.toml') }} | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
- name: Setup Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: nightly | |
override: true | |
- name: Build | |
uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
args: --all-targets | |
build-wasm: | |
name: Build (wasm) | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Install Platform Dependencies | |
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev mold | |
- name: Cache Rust | |
uses: actions/cache@v3 | |
with: | |
key: ${{ runner.os }}-${{ matrix.rust }}-${{ hashFiles('Cargo.toml') }} | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
- name: Setup Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: nightly | |
target: wasm32-unknown-unknown | |
override: true | |
- name: Build | |
uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
args: --all-targets --target wasm32-unknown-unknown --no-default-features --features wasm-development |