-
Notifications
You must be signed in to change notification settings - Fork 16
87 lines (76 loc) · 2.27 KB
/
test.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
name: "conjure-oxide"
on:
push:
branches:
- main # run for pushes to the main branch. other branches need to create a PR if they want testing.
paths:
- conjure_oxide/**
- solvers/**
- crates/**
- Cargo.*
- .github/workflows/test.yml
- .github/workflows/code-coverage-deploy.yml
pull_request:
paths:
- conjure_oxide/**
- solvers/**
- crates/**
- Cargo.*
- .github/workflows/test.yml
- .github/workflows/code-coverage-deploy.yml
workflow_dispatch:
env:
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"
SCCACHE_GHA_VERSION: 4
jobs:
build-and-test:
name: "Build and Test"
strategy:
# run all combinations of the matrix even if one combination fails.
fail-fast: false
matrix:
rust_release:
- stable
- nightly
conjure_version:
- 2.5.1
os:
- ubuntu-latest
- macos-latest
include:
- os: ubuntu-latest
release_suffix: linux
- os: macos-latest
release_suffix: macos-intel
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Run sccache-cache
uses: mozilla-actions/sccache-action@v0.0.3
- name: Disable rust-lld (to fix linkme)
run: |
echo RUSTFLAGS=${RUSTFLAGS}\ -Zlinker-features=-lld >> $GITHUB_ENV
echo RUSTDOCFLAGS=${RUSTDOCFLAGS}\ -Zlinker-features=-lld >> $GITHUB_ENV
if: matrix.rust_release == 'nightly'
- run: rustup update ${{ matrix.rust_release }} && rustup default ${{ matrix.rust_release }}
- run: cargo build -vv --workspace
- uses: ./.github/actions/install-conjure
with:
os_arch: ${{ matrix.release_suffix }}
version: ${{ matrix.conjure_version }}
- run: cargo test --workspace
audit:
name: "Dependency Audit"
runs-on: ubuntu-latest
strategy:
# run all combinations of the matrix even if one combination fails.
fail-fast: false
matrix:
rust_release:
- stable
- nightly
steps:
- uses: actions/checkout@v3
- run: rustup update ${{ matrix.rust_release }} && rustup default ${{ matrix.rust_release }}
- run: cargo audit