-
Notifications
You must be signed in to change notification settings - Fork 0
81 lines (72 loc) · 2.14 KB
/
ci.yaml
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
---
name: CI
"on":
pull_request:
push:
branches:
- "master"
schedule:
- cron: "0 16 * * 1" # 8am PST every Monday
jobs:
ci:
name: Format, lint, and test
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
# Ubuntus
- os: ubuntu-latest
binary_target: x86_64-unknown-linux-musl
needs_musl: true
toolchain: stable
- os: ubuntu-20.04
binary_target: x86_64-unknown-linux-gnu
toolchain: stable
# MacOS ARM
- os: macos-latest
binary_target: aarch64-apple-darwin
toolchain: stable
# Windows
- os: windows-latest
binary_target: x86_64-pc-windows-msvc
toolchain: stable
# Nightly Rust
- os: ubuntu-latest
binary_target: x86_64-unknown-linux-gnu
toolchain: nightly
# MSRV
- os: ubuntu-latest
binary_target: x86_64-unknown-linux-gnu
toolchain: 1.62.1
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- uses: davidB/rust-cargo-make@v1
- name: Install musl tools
if: matrix.needs_musl
run: |
sudo apt-get install musl-tools
sudo ln -s /usr/bin/musl-gcc /usr/bin/musl-g++
# Required for bindgen on Windows
- name: Install LLVM and Clang
uses: KyleMayes/install-llvm-action@v2
if: matrix.os == 'windows-latest'
with:
version: "10.0"
directory: ${{ runner.temp }}/llvm-10.0/
- name: Set CMake generator
if: matrix.os == 'windows-latest'
run: |
echo "CMAKE_GENERATOR=NMake Makefiles" >> $env:GITHUB_ENV
echo "${{ env.CMAKE_GENERATOR }}"
echo $env:CMAKE_GENERATOR
- name: Install rust ${{ matrix.binary_target }}
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.toolchain }}-${{ matrix.binary_target }}
profile: minimal
- uses: actions-rs/cargo@v1
with:
command: make
args: --no-workspace workspace-ci-flow