-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (42 loc) · 1.17 KB
/
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
42
43
name: CI
on:
push:
branches:
- 'master'
- 'release-[0-9]+.[0-9]+'
- 'ci/*'
jobs:
build:
name: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-22.04, windows-2022 ]
include:
- os: ubuntu-22.04
target: x86_64-unknown-linux-musl
- os: windows-2022
target: x86_64-pc-windows-msvc
runs-on: ${{ matrix.os }}
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Cache Cargo
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}
- if: matrix.os == 'ubuntu-22.04'
name: Install MUSL toolchain
run: |
sudo apt update
sudo apt install -y musl-tools
rustup target add x86_64-unknown-linux-musl
- name: Build ${{ github.repository }}
run: cargo build --target ${{ matrix.target }}
- name: Run unit tests
run: cargo test --target ${{ matrix.target }}