-
Notifications
You must be signed in to change notification settings - Fork 0
113 lines (100 loc) · 2.84 KB
/
Copy pathci.yaml
File metadata and controls
113 lines (100 loc) · 2.84 KB
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
---
name: CI
on:
pull_request:
push:
branches:
- "master"
schedule:
- cron: "0 16 * * 1" # 8am PST every Monday
env:
CMAKE_POLICY_VERSION_MINIMUM: 3.5
jobs:
lint:
name: Lints
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
submodules: recursive
- uses: extractions/setup-just@v3
- name: Install rust
run: |
rustup -V
rustup set profile minimal
rustup toolchain install stable
rustup show
- name: Check Formatting
run: just fmt-check
- name: Clippy
run: just lint
# Check for docs warnings
# Only do this for the swiftnav crate since swiftnav-sys has some errors
# in the bindgen output
- name: Docs
run: just docs
build:
name: Build 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
# 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.87.0
steps:
- uses: actions/checkout@v5
with:
submodules: recursive
- uses: extractions/setup-just@v3
- 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 }}
run: |
rustup -V
rustup set profile minimal
rustup default ${{ matrix.toolchain }}
rustup target add ${{ matrix.binary_target }}
rustup show
- name: Build
env:
CARGO_BUILD_TARGET: ${{ matrix.binary_target }}
run: just build
- name: Test
env:
CARGO_BUILD_TARGET: ${{ matrix.binary_target }}
run: just test