Skip to content

Commit 0549dc0

Browse files
committed
nightly: amd64 and arm64
Signed-off-by: Paweł Gronowski <[email protected]>
1 parent a3ac891 commit 0549dc0

File tree

3 files changed

+148
-71
lines changed

3 files changed

+148
-71
lines changed

.github/workflows/.nightly.yml

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
# reusable workflow
2+
name: .build
3+
4+
# TODO: hide reusable workflow from the UI. Tracked in https://github.com/community/community/discussions/12025
5+
6+
# Default to 'contents: read', which grants actions to read commits.
7+
#
8+
# If any permission is set, any permission not included in the list is
9+
# implicitly set to "none".
10+
#
11+
# see https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
12+
permissions:
13+
contents: read
14+
15+
on:
16+
workflow_call:
17+
inputs:
18+
arch:
19+
required: true
20+
type: string
21+
default: "amd64"
22+
target:
23+
required: true
24+
type: string
25+
image:
26+
required: true
27+
type: string
28+
29+
jobs:
30+
# Transform the arch into a specific worker
31+
# amd64 -> ubuntu-22.04
32+
# arm64 -> ubuntu22_arm64
33+
prepare:
34+
runs-on: ubuntu-22.04
35+
outputs:
36+
worker: ${{ steps.set.outputs.worker }}
37+
version: ${{ steps.set.outputs.version }}
38+
steps:
39+
-
40+
name: Set worker
41+
id: set
42+
run: |
43+
echo "version=$(date +%Y%m%d)" >> $GITHUB_OUTPUT
44+
case ${{ inputs.arch }} in
45+
amd64)
46+
echo "worker=ubuntu-20.04" >> $GITHUB_OUTPUT
47+
;;
48+
arm64)
49+
echo "worker=ubuntu22_arm64" >> $GITHUB_OUTPUT
50+
;;
51+
armhf)
52+
echo "worker=ubuntu22_arm64" >> $GITHUB_OUTPUT
53+
;;
54+
*)
55+
echo "::error::Unsupported arch: ${{ inputs.arch }}"
56+
exit 1
57+
;;
58+
esac
59+
60+
build:
61+
needs: prepare
62+
runs-on: ${{ needs.prepare.outputs.worker }}
63+
steps:
64+
-
65+
name: Set up Docker Buildx
66+
uses: docker/setup-buildx-action@v3
67+
68+
-
69+
name: Checkout
70+
uses: actions/checkout@v3
71+
72+
-
73+
name: Build
74+
run: |
75+
export VERSION=${{ needs.prepare.outputs.version }}
76+
export REF=master
77+
78+
export DOCKER_BUILDX_REF=master
79+
export DOCKER_BUILDX_VERSION=$VERSION
80+
81+
export DOCKER_COMPOSE_REF=main
82+
export DOCKER_COMPOSE_VERSION=$VERSION
83+
84+
export ARCH=${{ inputs.arch }}
85+
86+
make ${{ inputs.target }}
87+
88+
-
89+
name: Verify
90+
run: |
91+
export IMAGE=${{ inputs.image }}
92+
export ARCH=${{ inputs.arch }}
93+
94+
make verify
95+
96+
-
97+
name: Artifact deb
98+
uses: actions/upload-artifact@v4
99+
with:
100+
name: nightly-deb-${{ inputs.target }}-${{ inputs.arch }}
101+
path: deb/debbuild/${{ inputs.target }}
102+
retention-days: 1
103+
-
104+
name: Artifact rpm
105+
uses: actions/upload-artifact@v4
106+
with:
107+
name: nightly-rpm-${{ inputs.target }}-${{ inputs.arch }}
108+
path: rpm/rpmbuild/${{ inputs.target }}
109+
retention-days: 1

.github/workflows/ci.yml

Lines changed: 0 additions & 35 deletions
This file was deleted.

.github/workflows/nightly.yml

Lines changed: 39 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,48 @@
11
name: nightly
22

33
on:
4-
schedule:
5-
- cron: '0 0 * * *'
6-
workflow_dispatch: {}
4+
workflow_dispatch:
5+
pull_request:
76

87
jobs:
9-
build:
10-
runs-on: selfhosted
8+
packages:
119
strategy:
1210
fail-fast: false
1311
matrix:
14-
target:
15-
- debian-bookworm
16-
steps:
17-
-
18-
name: Set up Docker Buildx
19-
uses: docker/setup-buildx-action@v1
12+
arch:
13+
- amd64
14+
- arm64
15+
dist:
16+
#- {target: "debian-bullseye", image: "debian:bullseye"}
17+
- {target: "debian-bookworm", image: "debian:bookworm"}
18+
#- {target: "ubuntu-focal", image: "ubuntu:focal"}
19+
- {target: "ubuntu-jammy", image: "ubuntu:jammy"}
20+
- {target: "ubuntu-noble", image: "ubuntu:noble"}
21+
22+
- {target: "centos-9", image: "quay.io/centos/centos:stream9"}
23+
#- {target: "fedora-39", image: "fedora:39"}
24+
- {target: "fedora-40", image: "fedora:40"}
25+
#- {target: "rhel-8", image: "registry.access.redhat.com/ubi8/ubi"}
26+
#- {target: "rhel-9", image: "registry.access.redhat.com/ubi9/ubi"}
27+
include:
28+
#- arch: armhf
29+
# dist: {target: "debian-bullseye", image: "debian:bullseye"}
30+
- arch: armhf
31+
dist: {target: "debian-bookworm", image: "debian:bookworm"}
32+
#- arch: armhf
33+
# dist: {target: "ubuntu-focal", image: "ubuntu:focal"}
34+
#- arch: armhf
35+
# dist: {target: "ubuntu-jammy", image: "ubuntu:jammy"}
36+
- arch: armhf
37+
dist: {target: "ubuntu-noble", image: "ubuntu:noble"}
38+
# TODO
39+
# - arch: armhf
40+
# dist: {target: "raspbian-bullseye", image: "balenalib/rpi-raspbian:bullseye"}
41+
# - arch: armhf
42+
# dist: {target: "raspbian-bookworm", image: "balenalib/rpi-raspbian:bookworm"}
43+
uses: ./.github/workflows/.nightly.yml
44+
with:
45+
arch: ${{ matrix.arch }}
46+
target: ${{ matrix.dist.target }}
47+
image: ${{ matrix.dist.image }}
2048

21-
-
22-
name: Checkout
23-
uses: actions/checkout@v3
24-
25-
-
26-
name: Build
27-
run: |
28-
export VERSION=$(date +%Y%m%d)
29-
export REF=master
30-
31-
export DOCKER_BUILDX_REF=master
32-
export DOCKER_BUILDX_VERSION=$VERSION
33-
34-
export DOCKER_COMPOSE_REF=main
35-
export DOCKER_COMPOSE_VERSION=$VERSION
36-
37-
make ${{ matrix.target }}
38-
39-
-
40-
name: Artifact
41-
uses: actions/upload-artifact@v2
42-
with:
43-
name: nightly-${{ matrix.target }}
44-
path: deb/debbuild/${{ matrix.target }}
45-
retention-days: 3

0 commit comments

Comments
 (0)