124 lines
2.9 KiB
YAML
124 lines
2.9 KiB
YAML
name: ci
|
|
on:
|
|
push:
|
|
branches:
|
|
- experiment
|
|
pull_request:
|
|
branches:
|
|
- experiment
|
|
jobs:
|
|
fmt:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions-rs/toolchain@v1
|
|
with:
|
|
profile: minimal
|
|
toolchain: stable
|
|
components: rustfmt
|
|
- uses: Swatinem/rust-cache@v1
|
|
- run: ./scripts/ci/fmt
|
|
shell: bash
|
|
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions-rs/toolchain@v1
|
|
with:
|
|
profile: minimal
|
|
toolchain: stable
|
|
components: clippy
|
|
- uses: Swatinem/rust-cache@v1
|
|
- run: ./scripts/ci/lint
|
|
shell: bash
|
|
|
|
docs:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions-rs/toolchain@v1
|
|
with:
|
|
profile: minimal
|
|
toolchain: stable
|
|
- uses: Swatinem/rust-cache@v1
|
|
- run: ./scripts/ci/docs
|
|
shell: bash
|
|
|
|
cargo-deny:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
checks:
|
|
- advisories
|
|
- bans licenses sources
|
|
continue-on-error: ${{ matrix.checks == 'advisories' }}
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: EmbarkStudios/cargo-deny-action@v1
|
|
with:
|
|
command: check ${{ matrix.checks }}
|
|
|
|
js_tests:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Install wasm-pack
|
|
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
|
|
- name: run tests
|
|
run: ./scripts/ci/js_tests
|
|
|
|
cmake_build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Update CMake
|
|
uses: jwlawson/actions-setup-cmake@v1.12
|
|
with:
|
|
cmake-version: latest
|
|
- name: Build and test C bindings
|
|
run: ./scripts/ci/cmake-build Release Static
|
|
shell: bash
|
|
|
|
linux:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
toolchain:
|
|
- stable
|
|
- nightly
|
|
continue-on-error: ${{ matrix.toolchain == 'nightly' }}
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions-rs/toolchain@v1
|
|
with:
|
|
profile: minimal
|
|
toolchain: ${{ matrix.toolchain }}
|
|
- uses: Swatinem/rust-cache@v1
|
|
- run: ./scripts/ci/build-test
|
|
shell: bash
|
|
|
|
macos:
|
|
runs-on: macos-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions-rs/toolchain@v1
|
|
with:
|
|
profile: minimal
|
|
toolchain: stable
|
|
- uses: Swatinem/rust-cache@v1
|
|
- run: ./scripts/ci/build-test
|
|
shell: bash
|
|
|
|
windows:
|
|
runs-on: windows-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions-rs/toolchain@v1
|
|
with:
|
|
profile: minimal
|
|
toolchain: stable
|
|
- uses: Swatinem/rust-cache@v1
|
|
- run: ./scripts/ci/build-test
|
|
shell: bash
|
|
|