-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (33 loc) · 1012 Bytes
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: Cargo Build & Test
on:
push:
branches:
- "*"
env:
CARGO_TERM_COLOR: always
jobs:
test:
name: Test
runs-on: ubuntu-latest
# Run only on pushes to branches with open PRs
if: github.event_name == 'push' && contains(fromJson('["refs/heads/main"]'), github.ref) == false && github.event.repository.pulls != '[]'
strategy:
matrix:
toolchain:
- stable
- beta
- nightly
steps:
- uses: actions/checkout@v3
- name: Install rust
run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }} && rustup component add rustfmt
- name: Install vcpkg build dependencies
run: sudo apt-get --assume-yes install nasm
- name: Install vcpkg
run: cargo install cargo-vcpkg
- name: Build vcpkg dependencies
run: cargo vcpkg --verbose build
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose