-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (37 loc) · 1.1 KB
/
build.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
name: CI
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
# Cancel previously running PR jobs
concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: true
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
container:
image: ghcr.io/${{ github.repository }}-rust-ci:latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Indicate safe directory
## See https://github.com/actions/checkout/issues/363
run: git config --global --add safe.directory $(realpath .)
- run: pre-commit run --all-files --verbose --show-diff-on-failure
build_and_test:
name: Build & Test
runs-on: ubuntu-latest
container:
image: ghcr.io/${{ github.repository }}-rust-ci:latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- run: cargo check --workspace --all-targets
- run: cargo build --workspace --all-targets
- run: cargo test --workspace --all-targets