-
Notifications
You must be signed in to change notification settings - Fork 3
74 lines (61 loc) · 1.82 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
---
name: CI
on:
push:
branches:
- main
tags:
- 'v*'
pull_request:
jobs:
formatting-and-quality:
name: Formatting and Quality
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
flake:
- '**/*.nix'
- 'flake.lock'
rust:
- '**/*.rs'
- '**/Cargo.toml'
- 'Cargo.lock'
- uses: DeterminateSystems/nix-installer-action@v16
- uses: DeterminateSystems/magic-nix-cache-action@v8
# Evaluate the devshell here so that the time reported for subsequent
# steps that use it reflect what is actually done there.
- name: Evaluate devshell
run: nix develop
- name: Format
run: nix develop --command treefmt --fail-on-change
- name: Clippy
if: steps.filter.outputs.flake == 'true' || steps.filter.outputs.rust == 'true'
run: nix develop --command cargo clippy --all-targets -- -D warnings
- name: Repository cleanliness
if: steps.filter.outputs.flake == 'true' || steps.filter.outputs.rust == 'true'
run: git diff --exit-code
- name: Test
if: steps.filter.outputs.flake == 'true' || steps.filter.outputs.rust == 'true'
run: nix develop --command cargo test --all-targets
components:
name: Components
needs:
- formatting-and-quality
strategy:
matrix:
component:
- diagnostics
- digitiser-aggregator
- nexus-writer
- simulator
- trace-archiver-hdf5
- trace-archiver-tdengine
- trace-reader
- trace-to-events
uses: ./.github/workflows/component.yml
with:
component: ${{ matrix.component }}