-
Notifications
You must be signed in to change notification settings - Fork 82
188 lines (175 loc) · 5.71 KB
/
Copy pathdeploy.yml
File metadata and controls
188 lines (175 loc) · 5.71 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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
# Copyright 2021, Proofcraft Pty Ltd
# Copyright 2026, UNSW
#
# SPDX-License-Identifier: BSD-2-Clause
# Deploy default.xml to microkit-manifest after successful runs.
name: Deploy
on:
push:
branches: [main]
paths-ignore:
- '**.md'
- 'platforms.yml'
- '.linkcheck-ignore.yml'
tags:
# Run on version tags, for releases.
- '*.*.*'
# allow manual trigger
workflow_dispatch:
# allow explicit trigger from other repos when dependencies have changed
repository_dispatch:
types: [deps-update]
jobs:
code:
name: Freeze Code
runs-on: ubuntu-latest
outputs:
xml: ${{ steps.repo.outputs.xml }}
steps:
- id: repo
uses: seL4/ci-actions/repo-checkout@master
with:
manifest_repo: seL4/microkit-manifest
manifest_branch: main
manifest: main.xml
sdk-build:
name: Build SDK
needs: code
uses: ./.github/workflows/_sdk.yaml
with:
xml: ${{ needs.code.outputs.xml }}
# TODO: We want to add support for this but have yet to do so.
# sim:
# name: Simulation
# needs: code
# runs-on: ubuntu-latest
# strategy:
# matrix:
# march: [aarch64, x86_64, riscv64]
# compiler: [gcc]
# steps:
# - uses: seL4/ci-actions/microkit-sim@master
# with:
# xml: ${{ needs.code.outputs.xml }}
# march: ${{ matrix.march }}
# compiler: ${{ matrix.compiler }}
the_matrix:
name: Matrix
needs: sdk-build
runs-on: ubuntu-latest
outputs:
gh_matrix: ${{ steps.matrix.outputs.gh_matrix }}
test_cases: ${{ steps.matrix.outputs.test_cases }}
steps:
- name: Checkout code
uses: seL4/ci-actions/repo-checkout@master
with:
xml: ${{ needs.sdk-build.outputs.xml }}
# needed for reasons...
manifest_repo: seL4/microkit-manifest
manifest_branch: main
manifest: main.xml
- id: matrix
uses: seL4/ci-actions/microkit-hw-matrix@master
env:
# We don't actually care what this is set to, but for the files for
# each platform it expects this path to exist, so we set it up.
MICROKIT_SDK: /dummy-microkit-sdk-for-matrix
hw-build:
name: HW Test Builds
if: ${{ github.repository_owner == 'seL4' }}
runs-on: ubuntu-latest
# FIXME: Add simulation support
# needs: [sim, the_matrix, sdk-build]
needs: [the_matrix, sdk-build, code]
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.the_matrix.outputs.gh_matrix) }}
env:
SDK_VERSION: ${{ needs.sdk-build.outputs.SDK_VERSION }}
steps:
- name: Checkout code
uses: seL4/ci-actions/repo-checkout@master
with:
xml: ${{ needs.code.outputs.xml }}
# needed for reasons...
manifest_repo: seL4/microkit-manifest
manifest_branch: main
manifest: main.xml
- name: Download microkit SDK
uses: actions/download-artifact@v8
with:
name: microkit-sdk-${{ env.SDK_VERSION }}-linux-x86-64
- name: Extract microkit SDK
run: |
tar xzf ./microkit-sdk-${{ env.SDK_VERSION }}-linux-x86-64.tar.gz
export "MICROKIT_SDK=$(realpath ./microkit-sdk-${{ env.SDK_VERSION }}/)"
echo "MICROKIT_SDK=${MICROKIT_SDK}" >> "${GITHUB_ENV}"
- name: Install build dependencies
run: ./ci/install_march_build_deps.sh ${{ matrix.march }}
working-directory: ./microkit/
- name: Build
uses: seL4/ci-actions/microkit-hw-build@master
with:
board: ${{ matrix.board }}
env:
TEST_CASES: ${{ needs.the_matrix.outputs.test_cases }}
- name: Upload test case builds
uses: actions/upload-artifact@v7
with:
name: loader-img-${{ matrix.board }}
path: '*.loader.img'
hw-run:
name: HW Run
if: ${{ github.repository_owner == 'seL4' }}
runs-on: ubuntu-latest
needs: [the_matrix, hw-build, sdk-build]
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.the_matrix.outputs.gh_matrix) }}
# do not run concurrently with other workflows, but do run concurrently in the build matrix
concurrency: hw-run-${{ strategy.job-index }}
env:
SDK_VERSION: ${{ needs.sdk-build.outputs.SDK_VERSION }}
steps:
- name: Get machine queue
uses: actions/checkout@v6
with:
repository: seL4/machine_queue
path: machine_queue
- name: Download test cases builds
uses: actions/download-artifact@v8
with:
name: loader-img-${{ matrix.board }}
- name: Download microkit SDK
uses: actions/download-artifact@v8
with:
name: microkit-sdk-${{ env.SDK_VERSION }}-linux-x86-64
- name: Extract microkit SDK
run: |
tar xzf ./microkit-sdk-${{ env.SDK_VERSION }}-linux-x86-64.tar.gz
export "MICROKIT_SDK=$(realpath ./microkit-sdk-${{ env.SDK_VERSION }}/)"
echo "MICROKIT_SDK=${MICROKIT_SDK}" >> "${GITHUB_ENV}"
- name: Run
uses: seL4/ci-actions/microkit-hw-run@master
with:
board: ${{ matrix.board }}
index: ${{ strategy.job-index }}
env:
TEST_CASES: ${{ needs.the_matrix.outputs.test_cases }}
HW_SSH: ${{ secrets.HW_SSH }}
deploy:
name: Deploy manifest
if: ${{ github.repository_owner == 'seL4' }}
runs-on: ubuntu-24.04
needs: [code, hw-run, sdk-build]
steps:
- name: Deploy
uses: seL4/ci-actions/manifest-deploy@master
with:
xml: ${{ needs.code.outputs.xml }}
manifest_repo: seL4/microkit-manifest
manifest_branch: main
manifest: main.xml
env:
GH_SSH: ${{ secrets.CI_SSH }}