-
-
Notifications
You must be signed in to change notification settings - Fork 23
173 lines (149 loc) · 5.04 KB
/
build.yml
File metadata and controls
173 lines (149 loc) · 5.04 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
name: build
on:
workflow_dispatch:
inputs:
linux:
description: "Enable Linux build"
required: true
default: true
type: boolean
windows:
description: "Enable Windows build"
required: true
default: true
type: boolean
android:
description: "Enable Android build"
required: true
default: true
type: boolean
permissions:
contents: read
jobs:
build-linux-x86_64:
runs-on: ubuntu-latest
if: inputs.linux
permissions:
id-token: write
attestations: write
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Install basic requirements
run: sudo apt-get install -y pkg-config libdbus-1-dev libxkbcommon-dev
- name: Install just
run: sudo snap install just --classic
- name: Install rust
run: rustup install --profile minimal stable
- name: Build cli
run: just build-cli bundled-dependencies
- name: Build gui
run: just build-gui bundled-dependencies
- name: Add platform to file name
run: |
mv build-output/openscq30 build-output/openscq30-cli-linux-x86_64
mv build-output/openscq30-gui build-output/openscq30-gui-linux-x86_64
- name: Attest artifacts
uses: actions/attest@59d89421af93a897026c735860bf21b6eb4f7b26 # v4.1.0
with:
subject-path: build-output/*
- name: Upload artifacts
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: linux-x86_64
path: build-output/*
build-linux-arm64:
runs-on: ubuntu-24.04-arm
if: inputs.linux
permissions:
id-token: write
attestations: write
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Install basic requirements
run: sudo apt-get install -y pkg-config libdbus-1-dev libxkbcommon-dev
- name: Install just
run: sudo snap install just --classic
- name: Install rust
run: rustup install --profile minimal stable
- name: Build cli
run: just build-cli bundled-dependencies
- name: Build gui
run: just build-gui bundled-dependencies
- name: Add platform to file name
run: |
mv build-output/openscq30 build-output/openscq30-cli-linux-arm64
mv build-output/openscq30-gui build-output/openscq30-gui-linux-arm64
- name: Attest artifacts
uses: actions/attest@59d89421af93a897026c735860bf21b6eb4f7b26 # v4.1.0
with:
subject-path: build-output/*
- name: Upload artifacts
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: linux-arm64
path: build-output/*
build-windows:
runs-on: windows-latest
if: inputs.windows
permissions:
id-token: write
attestations: write
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Install rust
run: rustup install --profile minimal stable
- name: Install just
run: choco install just
- name: Build cli
run: just build-cli
- name: Build gui
run: just build-gui
- name: Build installer
run: just build-gui-installer
- name: Add platform to file name
run: |
mv build-output/openscq30.exe build-output/openscq30-cli-windows-x86_64.exe
mv build-output/openscq30-gui.exe build-output/openscq30-gui-windows-x86_64.exe
mv build-output/openscq30-gui-installer.exe build-output/openscq30-gui-installer-windows-x86_64.exe
- name: Attest artifacts
uses: actions/attest@59d89421af93a897026c735860bf21b6eb4f7b26 # v4.1.0
with:
subject-path: build-output/*
- name: Upload artifacts
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: windows
path: build-output/*
build-android:
runs-on: ubuntu-latest
if: inputs.android
permissions:
id-token: write
attestations: write
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Install build tools
uses: ./.github/actions/install-android-build-tools
with:
cache: false
- name: Install just
run: sudo snap install just --classic
- name: Build
run: just build-android
- name: Attest artifacts
uses: actions/attest@59d89421af93a897026c735860bf21b6eb4f7b26 # v4.1.0
with:
subject-path: build-output/*
- name: Upload apks
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: android
path: build-output/*