-
-
Notifications
You must be signed in to change notification settings - Fork 0
93 lines (83 loc) · 2.93 KB
/
Copy pathverify.yml
File metadata and controls
93 lines (83 loc) · 2.93 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
name: verify
on:
push:
branches: [main]
pull_request:
concurrency:
group: verify-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
packages: write
jobs:
gate:
name: gate / ${{ matrix.leg }}
runs-on: ubuntu-latest
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
include:
- leg: flight
stages: flight-build host-tests coverage schema-drift iface-headers invariants provenance
- leg: ground
stages: rust-build rust-tests rust-fmt rust-clippy ext-build ui-build
- leg: lint
stages: lint-flight
steps:
# full history only where the provenance stage runs
- uses: actions/checkout@v7
with:
fetch-depth: ${{ matrix.leg == 'flight' && '0' || '1' }}
submodules: true
- name: Restore tooling caches
uses: actions/cache@v6
with:
path: |
telemetry-tools/target
telemetry-tools/extension/node_modules
telemetry-tools/station-ui/node_modules
flight-software/build/tests
key: tooling-${{ hashFiles('telemetry-tools/Cargo.lock', 'telemetry-tools/extension/package-lock.json', 'telemetry-tools/station-ui/package-lock.json') }}
restore-keys: tooling-
- name: Log in to GHCR
uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build devcontainer
uses: devcontainers/ci@v0.3
with:
imageName: ghcr.io/${{ github.repository }}/devcontainer
cacheFrom: ghcr.io/${{ github.repository }}/devcontainer
push: ${{ matrix.leg == 'flight' && github.event_name == 'push' && 'always' || 'never' }}
runCmd: echo "devcontainer ready"
- name: Run gate leg
uses: devcontainers/ci@v0.3
with:
imageName: ghcr.io/${{ github.repository }}/devcontainer
cacheFrom: ghcr.io/${{ github.repository }}/devcontainer
push: never
runCmd: |
git config --global --add safe.directory "$PWD"
# post-create regenerates the schema artifacts; restore the
# committed versions so schema-drift checks the commit, not
# the fresh regen
git checkout -- interfaces/tools/generated docs/interfaces/ICD-007-packet-payloads.md
scripts/verify.sh ${{ matrix.stages }}
- name: Upload flight binaries
if: matrix.leg == 'flight' && github.event_name == 'push'
uses: actions/upload-artifact@v7
with:
name: flight-debug-${{ github.sha }}
path: flight-software/out/**/*.elf
if-no-files-found: error
verify:
name: verify
needs: gate
if: always()
runs-on: ubuntu-latest
steps:
- name: All gate legs green
run: test "${{ needs.gate.result }}" = "success"