Skip to content

v0.6.0

v0.6.0 #103

Workflow file for this run

name: Continuous Integration
on:
pull_request:
push:
branches:
- main
- release/*
tags:
- v*
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
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
- 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: Rustfmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- name: Clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --all --features all -- --deny warnings
- name: Clippy (Wasm)
uses: actions-rs/cargo@v1
with:
command: clippy
args: --all --features all --target wasm32-unknown-unknown -- --deny warnings
test-native:
strategy:
matrix:
os:
- windows-latest
- macos-latest
- ubuntu-latest
name: Test (${{ matrix.os }})
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Platform Dependencies
if: runner.os == 'linux'
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev
- 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: stable
override: true
- name: Build
uses: actions-rs/cargo@v1
with:
command: build
args: --all --features all
- name: Test
uses: actions-rs/cargo@v1
with:
command: test
args: --all --features all
test-chrome-firefox:
name: Test (chrome, firefox)
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 firefox
- name: Install Chrome
uses: browser-actions/setup-chrome@v1
with:
chrome-version: stable
- 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: stable
target: wasm32-unknown-unknown
override: true
- name: Install wasm-pack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- name: Build (Wasm)
uses: actions-rs/cargo@v1
with:
command: build
args: --all --features all --target wasm32-unknown-unknown
- name: Test (Chrome)
run: wasm-pack test --chrome --headless --features all
- name: Test (Firefox)
run: wasm-pack test --firefox --headless --features all
test-safari:
name: Test (safari)
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- 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: stable
target: wasm32-unknown-unknown
override: true
- name: Install wasm-pack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- name: Build (Wasm)
uses: actions-rs/cargo@v1
with:
command: build
args: --all --features all --target wasm32-unknown-unknown
- name: Test (Safari)
run: wasm-pack test --safari --headless --features all
publish:
if: startsWith(github.ref, 'refs/tags/v')
needs: [conformance, test-native, test-chrome-firefox, test-safari]
name: Publish
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
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Publish
run: cargo publish --features all --token ${REGISTRY_TOKEN}
env:
REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }}