-
Notifications
You must be signed in to change notification settings - Fork 56
45 lines (43 loc) · 1.54 KB
/
rust.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
name: Rust
on:
pull_request:
paths-ignore:
- "**.md"
- ".github/dependabot.yml"
branches: [develop]
env:
# From-scratch builds with incremental compilation enabled adds unneeded performance and disk overhead.
CARGO_INCREMENTAL: "0"
jobs:
build:
strategy:
fail-fast: false
matrix:
make_target: ["check-licenses", "build", "integ", "integ-fips"]
os: [ubuntu-latest, windows-latest, macos-latest]
exclude:
- os: windows-latest
make_target: check-licenses
- os: macos-latest
make_target: check-licenses
- os: macos-latest
make_target: integ-fips
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
.cargo
# you can edit the .github/cache_bust file if you need to clear the cache
key: ${{ hashFiles('.github/cache_bust') }}-${{ runner.os }}-${{ matrix.make_target }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ hashFiles('.github/cache_bust') }}-${{ runner.os }}-${{ matrix.make_target }}
- uses: ilammy/setup-nasm@v1 # requirement for windows FIPS builds
- name: Install ninja-build tool
uses: seanmiddleditch/gha-setup-ninja@v4
# print the current rustc. replace stable to pin to a specific toolchain version.
- run: rustup default stable
- run: rustup component add rustfmt
- run: rustup component add clippy
- run: make ${{ matrix.make_target }}