Skip to content

add actions

add actions #3

Workflow file for this run

name: Unit Tests
on:
push:
branches:
- main
pull_request:
branches:
- main
env:
RUSTFLAGS: "-C target-cpu=native"
jobs:
test:
strategy:
matrix:
os: [windows-latest, ubuntu-latest]
target:
[
"i686-pc-windows-msvc",
"x86_64-pc-windows-msvc",
"i686-unknown-linux-gnu",
"x86_64-unknown-linux-gnu",
]
exclude:
- os: windows-latest
target: "i686-unknown-linux-gnu"
- os: windows-latest
target: "x86_64-unknown-linux-gnu"
- os: ubuntu-latest
target: "i686-pc-windows-msvc"
- os: ubuntu-latest
target: "x86_64-pc-windows-msvc"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Configure env (linux)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y ninja-build gcc-multilib g++-multilib
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
components: clippy
- name: Run sccache-cache
uses: mozilla-actions/[email protected]
- name: Run clippy
run: cargo clippy -- -D warnings
- name: Run tests
run: cargo test