-
-
Notifications
You must be signed in to change notification settings - Fork 5
55 lines (51 loc) · 1.52 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
44
45
46
47
48
49
50
51
52
53
54
55
name: CI
on:
push:
branches:
- dev
- main
pull_request:
branches:
- dev
- main
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
# Build the app on all supported platforms
build:
strategy:
matrix:
platform: [ubuntu-22.04]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v4
- name: Set minimal profile (Windows only)
if: matrix.platform == 'windows-latest'
run: rustup set profile minimal
- uses: Swatinem/rust-cache@v2
with:
key: "${{matrix.platform}}"
- name: install packages (ubuntu)
if: matrix.platform == 'ubuntu-22.04'
run: sudo apt-get update && sudo apt-get -y --no-install-recommends install mold capnproto
- name: Build
run: cargo build --locked
# We only need to run the checks on a single platform
checks:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
with:
key: ubuntu-22.04
- name: install packages
run: sudo apt-get update && sudo apt-get -y --no-install-recommends install mold capnproto
# Checks begin here!
- run: cargo fmt --all -- --check
- run: cargo test --locked
- run: cargo clippy --locked --all-targets
# We care that the benchmarks build and run, not about their numeric output.
# To keep the CI a bit leaner, do this in the dev profile.
- run: cargo build --locked --all-targets
- run: cargo doc --document-private-items