Skip to content

Commit

Permalink
add actions
Browse files Browse the repository at this point in the history
  • Loading branch information
localcc committed Nov 10, 2023
1 parent 171717f commit 5f0ab43
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
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]
compiler:
[{ cxx: clang++, c: clang }, { cxx: g++, c: gcc }, { cxx: cl, c: cl }]
arch: [{ msvc: 86, gcc: 32 }, { msvc: 64, gcc: 64 }]
exclude:
- os: windows-latest
compiler: { cxx: g++, c: gcc }
- os: ubuntu-latest
compiler: { cxx: cl, c: cl }
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
- name: Configure env (windows)
uses: ilammy/msvc-dev-cmd@v1
if: runner.os == 'Windows'
with:
arch: x${{ matrix.arch.msvc }}

- 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

0 comments on commit 5f0ab43

Please sign in to comment.