Better linux testing (#314) #112
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 | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
name: "Check OS" | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macOS-latest, windows-latest] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Build | |
run: cargo build --verbose | |
- name: Run tests | |
run: cargo test --verbose | |
- name: Build with static CRT | |
if: matrix.os == 'ubuntu-latest' | |
run: RUSTFLAGS="-C target-feature=+crt-static" cargo run --example example --target x86_64-unknown-linux-gnu --verbose | |
- name: Install wasm-pack | |
if: matrix.os == 'ubuntu-latest' | |
run: cargo install wasm-pack | |
- name: Build Wasm tests | |
if: matrix.os == 'ubuntu-latest' | |
run: wasm-pack build --target web tests-wasm/ |