-
Notifications
You must be signed in to change notification settings - Fork 7
222 lines (194 loc) Β· 9.13 KB
/
package.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
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
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
name: Package Repository
run-name: |
${{ github.event_name == 'schedule' && 'β° Scheduled build' || '' }}
${{ github.event_name == 'push' && format('π± Push build - {0}', github.event.head_commit.message) || '' }}
on:
schedule:
- cron: '0 0 * * 0'
push:
branches: [ master ]
# If pushes to master are made in rapid succession, cancel existing docker builds and use newer commits
concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
cancel-in-progress: true
env:
SECRET_DOCKER_CI: ${{ secrets.DOCKER_CI }}
REPOSITORY: hyperion-project
jobs:
#############################
###### Ubuntu & Debian ######
#############################
ubuntu_debian:
name: π§ ${{ matrix.os.description }} Qt ${{ matrix.qt_version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
os: [
{ distribution: ubuntu, codename: focal, description: Ubuntu 20.04 (Focal Fossa) },
{ distribution: ubuntu, codename: jammy, description: Ubuntu 22.04 (Jammy Jellyfish) },
{ distribution: ubuntu, codename: mantic, description: Ubuntu 23.10 (Mantic Minotaur) },
{ distribution: ubuntu, codename: noble, description: Ubuntu 24.04 (Noble Numbat) },
{ distribution: debian, codename: buster, description: Debian 10.x (Buster) },
{ distribution: debian, codename: bullseye, description: Debian 11.x (Bullseye) },
{ distribution: debian, codename: bookworm, description: Debian 12.x (Bookworm) },
{ distribution: debian, codename: trixie, description: Debian 13.x (Trixie) },
]
qt_version: [ '5', '6' ]
include:
- target_platform: linux/amd64,linux/arm64,linux/arm/v7
exclude:
# qt6 is not available on ubuntu focal and debian buster
- os: { distribution: ubuntu, codename: focal }
qt_version: '6'
- os: { distribution: debian, codename: buster }
qt_version: '6'
steps:
- name: π Checkout
uses: actions/checkout@v4
- name: β
Determine current Repository
if: ${{ !startsWith(github.repository, env.REPOSITORY) }}
run: echo "REPOSITORY=$(echo '${{ github.actor }}' | tr '[:upper:]' '[:lower:]')" >> ${GITHUB_ENV}
- name: π οΈ Set up QEMU
uses: docker/setup-qemu-action@v3
- name: π³ Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: π Login to GitHub Container Registry
if: ${{ env.SECRET_DOCKER_CI != null }}
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.DOCKER_CI }}
- name: π³ Set up Docker metadata
id: docker_metadata
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ env.REPOSITORY }}/${{ matrix.os.distribution }}
tags: |
type=raw,value=${{ matrix.os.codename }},enable=${{ matrix.qt_version == '5' }}
type=raw,value=${{ matrix.os.codename }}-qt6,enable=${{ matrix.qt_version == '6' }}
labels: |
maintainer=Hyperion Project <admin@hyperion-project.org>
org.opencontainers.image.vendor=Hyperion Project
org.opencontainers.image.title=${{ matrix.os.description }} - QT ${{ matrix.qt_version }}
org.opencontainers.image.description=Compilation environment to build Hyperion for ${{ matrix.os.distribution }} ${{ matrix.os.codename }}
org.opencontainers.image.url=${{ github.server_url }}
org.opencontainers.image.source=${{ github.server_url }}/hyperion.docker-ci
org.opencontainers.image.documentation=https://docs.hyperion-project.org/
org.opencontainers.image.licenses=MIT
- name: π· Build and π Push to GitHub Container/Package Registry
uses: docker/build-push-action@v6
with:
context: .
file: ubuntu_debian
push: true
platforms: ${{ matrix.target_platform }}
provenance: false
tags: ${{ steps.docker_metadata.outputs.tags }}
labels: ${{ steps.docker_metadata.outputs.labels }}
build-args: |
DIST=${{ matrix.os.distribution }}
SUITE=${{ matrix.os.codename }}
QT_VERSION=${{ matrix.qt_version }}
REPOSITORY="${{ github.server_url }}/${{ env.REPOSITORY }}"
debian_armv6:
name: π§ ${{ matrix.os.description }} Qt ${{ matrix.qt_version }} (armv6)
needs: [ ubuntu_debian ]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
os: [
{ codename: buster, description: Debian 10.x (Buster) },
{ codename: bullseye, description: Debian 11.x (Bullseye) },
{ codename: bookworm, description: Debian 12.x (Bookworm) }
]
qt_version: [ '5', '6' ]
exclude:
# qt6 is not available on debian buster/bullseye
- os: { codename: buster, description: Debian 10.x (Buster) }
qt_version: '6'
- os: { codename: bullseye, description: Debian 11.x (Bullseye) }
qt_version: '6'
steps:
- name: π Checkout
uses: actions/checkout@v4
- name: β
Determine current Repository
if: ${{ !startsWith(github.repository, env.REPOSITORY) }}
run: echo "REPOSITORY=$(echo '${{ github.actor }}' | tr '[:upper:]' '[:lower:]')" >> ${GITHUB_ENV}
- name: π οΈ Set up QEMU
uses: docker/setup-qemu-action@v3
- name: π³ Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: π· Build, π Combine and π Push to GitHub Container/Package Registry
run: |
echo ${{ secrets.DOCKER_CI }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin
docker buildx build --provenance=false --push --build-arg SUITE=${{ matrix.os.codename }} --build-arg QT_VERSION=${{ matrix.qt_version }} --platform=linux/arm/v6 --tag ghcr.io/${{ env.REPOSITORY }}/debian:${{ env.IMAGE }}-armv6 --file debian-armv6 .
docker buildx imagetools create -t ghcr.io/${{ env.REPOSITORY }}/debian:${{ env.IMAGE }} --append ghcr.io/${{ env.REPOSITORY }}/debian:${{ env.IMAGE }}-armv6
env:
IMAGE: ${{ matrix.qt_version == '6' && format('{0}-qt6', matrix.os.codename) || matrix.os.codename }}
####################
###### Fedora ######
####################
fedora:
name: π§ ${{ matrix.description }} ${{ matrix.tag }} Qt ${{ matrix.qt_version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
tag: [ 39, 40 ]
qt_version: [ '5', '6' ]
include:
- dist: fedora
- description: Fedora
- target_platform: linux/amd64, linux/arm64
steps:
- name: π Checkout
uses: actions/checkout@v4
- name: β
Determine current Repository
if: ${{ !startsWith(github.repository, env.REPOSITORY) }}
run: echo "REPOSITORY=$(echo '${{ github.actor }}' | tr '[:upper:]' '[:lower:]')" >> ${GITHUB_ENV}
- name: π οΈ Set up QEMU
uses: docker/setup-qemu-action@v3
- name: π³ Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: π Login to GitHub Container Registry
if: ${{ env.SECRET_DOCKER_CI != null }}
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.DOCKER_CI }}
- name: π³ Set up Docker metadata
id: docker_metadata
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ env.REPOSITORY }}/${{ matrix.dist }}
tags: |
type=raw,value=${{ matrix.tag }},enable=${{ matrix.qt_version == '5' }}
type=raw,value=${{ matrix.tag }}-qt6,enable=${{ matrix.qt_version == '6' }}
labels: |
maintainer=Hyperion Project <admin@hyperion-project.org>
org.opencontainers.image.vendor=Hyperion Project
org.opencontainers.image.title=${{ matrix.description }} - QT ${{ matrix.qt_version }}
org.opencontainers.image.description=Compilation environment to build Hyperion for ${{ matrix.description }} ${{ matrix.tag }}
org.opencontainers.image.url=${{ github.server_url }}
org.opencontainers.image.source=${{ github.server_url }}/hyperion.docker-ci
org.opencontainers.image.documentation=https://docs.hyperion-project.org/
org.opencontainers.image.licenses=MIT
- name: π· Build and π Push to GitHub Container/Package Registry
uses: docker/build-push-action@v6
with:
context: .
file: fedora
push: ${{ env.SECRET_DOCKER_CI != null }}
platforms: ${{ matrix.target_platform }}
provenance: false
tags: ${{ steps.docker_metadata.outputs.tags }}
labels: ${{ steps.docker_metadata.outputs.labels }}
build-args: |
DIST=${{ matrix.dist }}
SUITE=${{ matrix.tag }}
QT_VERSION=${{ matrix.qt_version }}
REPOSITORY="${{ github.server_url }}/${{ env.REPOSITORY }}"