-
Notifications
You must be signed in to change notification settings - Fork 1
113 lines (96 loc) · 2.72 KB
/
build.yml
File metadata and controls
113 lines (96 loc) · 2.72 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
name: Build
on: [push, pull_request]
jobs:
download_source:
name: Download source
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Download source
run: |
./main.py --arch x86_64 --branch main --download-only
./main.py --arch x86_64 --branch time32 --download-only
- uses: actions/upload-artifact@v4
with:
name: src
path: |
assets
build_container_base:
name: Build container base
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Build container base
run: |
podman build \
-t redpanda-cpp/basic-appimage-builder \
container/_base
podman save \
-o basic-appimage-builder.tar \
redpanda-cpp/basic-appimage-builder
- uses: actions/upload-artifact@v4
with:
name: container-base
path: |
basic-appimage-builder.tar
build:
name: Build
needs: [download_source, build_container_base]
strategy:
fail-fast: false
matrix:
arch:
- x86_64
- x86_64.v3
- aarch64
- riscv64
- loong64
- i686
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Download source
uses: actions/download-artifact@v4
with:
name: src
path: assets
- name: Build
run: |
if [[ "${{ matrix.arch }}" == "i686" ]]; then
branch="time32"
else
branch="main"
fi
podman run \
--platform linux/amd64 \
--rm \
--cap-add=sys_admin \
--volume $PWD:/mnt \
--workdir /mnt \
docker.io/amd64/ubuntu:24.04 \
bash -c \
"./support/dep.sh && ./main.py -a ${{ matrix.arch }} -b $branch"
- name: Upload
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.arch }}
path: container/${{ matrix.arch }}/qt.tar
- uses: actions/download-artifact@v4
with:
name: container-base
path: assets
- name: Load container base
run: |
docker load -i assets/basic-appimage-builder.tar
- uses: macbre/push-to-ghcr@master
if: github.ref_type == 'tag'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
image_name: ${{ github.repository }}-${{ matrix.arch }}
dockerfile: container/${{ matrix.arch }}/Dockerfile
context: container/${{ matrix.arch }}
image_tag: ${{ github.ref_name }}