-
Notifications
You must be signed in to change notification settings - Fork 15
138 lines (135 loc) · 5.13 KB
/
ci.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
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
name: CI
# @ivanv: TODO, should minisign Zig downloads
on:
pull_request:
push:
branches: [ "main" ]
jobs:
build_manual:
name: Build manual
runs-on: ubuntu-20.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Nix
uses: cachix/install-nix-action@v25
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: Create nix-shell and build PDF
run: nix-shell --pure -p texlive.combined.scheme-full pandoc librsvg --run "cd docs && pandoc MANUAL.md -o MANUAL.pdf"
- name: Upload manual PDF
uses: actions/upload-artifact@v4
with:
name: MANUAL
path: docs/MANUAL.pdf
build_linux_x86_64:
name: Build and run examples (Linux x86-64)
runs-on: ubuntu-20.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: 'true'
- name: Download Microkit SDK
run: ./ci/acquire_sdk.sh microkit-sdk.zip ${{ secrets.GITHUB_TOKEN }} linux-x86-64
shell: bash
- name: Extract Microkit SDK
run: unzip microkit-sdk.zip && tar -xf microkit-sdk-1.2.6.tar.gz
- name: Install dependencies (via apt)
# 'expect' is only a dependency for CI testing
run: sudo apt update && sudo apt install -y make clang lld llvm qemu-system-arm device-tree-compiler expect
- name: Install Zig
run: |
wget https://ziglang.org/builds/zig-linux-x86_64-0.12.0-dev.2150+63de8a598.tar.xz
tar xf zig-linux-x86_64-0.12.0-dev.2150+63de8a598.tar.xz
echo "${PWD}/zig-linux-x86_64-0.12.0-dev.2150+63de8a598/:$PATH" >> $GITHUB_PATH
- name: Install Rust
run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
- name: Build and run examples
run: ./ci/examples.sh ${PWD}/microkit-sdk-1.2.6
shell: bash
- name: Upload built system images
uses: actions/upload-artifact@v4
with:
# @ivanv: this needs to be fixed for the restructure
path: build_*/loader.img
build_macos_x86_64:
name: Build and run examples (macOS x86-64)
runs-on: macos-12
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: 'true'
- name: Download Microkit SDK
run: ./ci/acquire_sdk.sh microkit-sdk.zip ${{ secrets.GITHUB_TOKEN }} macos-x86-64
shell: bash
- name: Extract Microkit SDK
run: unzip microkit-sdk.zip && tar -xf microkit-sdk-1.2.6.tar.gz
- name: Install dependencies (via Homebrew)
# 'expect' is only a dependency for CI testing
run: |
brew install llvm qemu dtc make expect
echo "/usr/local/opt/llvm/bin:$PATH" >> $GITHUB_PATH
- name: Install Zig
run: |
wget https://ziglang.org/builds/zig-macos-x86_64-0.12.0-dev.2150+63de8a598.tar.xz
tar xf zig-macos-x86_64-0.12.0-dev.2150+63de8a598.tar.xz
echo "${PWD}/zig-macos-x86_64-0.12.0-dev.2150+63de8a598/:$PATH" >> $GITHUB_PATH
- name: Install Rust
run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
- name: Build and run examples
run: ./ci/examples.sh ${PWD}/microkit-sdk-1.2.6
shell: bash
- name: Upload built system images
uses: actions/upload-artifact@v4
with:
path: build_*/loader.img
build_linux_x86_64_nix:
name: Build and run examples (Linux x86-64 via Nix)
runs-on: ubuntu-20.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: 'true'
- name: Download Microkit SDK
run: ./ci/acquire_sdk.sh microkit-sdk.zip ${{ secrets.GITHUB_TOKEN }} linux-x86-64
shell: bash
- name: Extract Microkit SDK
run: unzip microkit-sdk.zip && tar -xf microkit-sdk-1.2.6.tar.gz
- name: Install Nix
uses: cachix/install-nix-action@v25
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: Build and run examples
run: nix-shell --pure --run "./ci/examples.sh ${PWD}/microkit-sdk-1.2.6"
- name: Upload built system images
uses: actions/upload-artifact@v4
with:
path: build_*/loader.img
build_macos_x86_64_nix:
name: Build and run examples (macOS x86-64 via Nix)
runs-on: macos-12
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: 'true'
- name: Download Microkit SDK
run: ./ci/acquire_sdk.sh microkit-sdk.zip ${{ secrets.GITHUB_TOKEN }} macos-x86-64
shell: bash
- name: Extract Microkit SDK
run: unzip microkit-sdk.zip && tar -xf microkit-sdk-1.2.6.tar.gz
- name: Install Nix
uses: cachix/install-nix-action@v25
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: Update Nix channel
run: nix-channel --update
- name: Build and run examples
run: nix-shell --pure --run "./ci/examples.sh ${PWD}/microkit-sdk-1.2.6"
- name: Upload built system images
uses: actions/upload-artifact@v4
with:
path: build_*/loader.img