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 ba08c25
Showing 1 changed file with 63 additions and 0 deletions.
63 changes: 63 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
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
- 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 ba08c25

Please sign in to comment.