Skip to content

Commit 8ee005d

Browse files
authored
ci: migrate workflows to depot, add arm64 linux build (#1564)
* ci: migrate nix and api release workflow to depot * feat: migrate arch build workflows to depot * fix: install qt6 shader tools * fix: libcmark-gfm static linkage * ci: add build arch image workflow * feat: specify correct platform for depot build * ci: move release workflow to depot arch image * feat: move amd64 appimage to depot * fix: mising dep for appimage * feat: add arm64 appimage support * feat: add arm64 appimage build * feat: add arm64 support in script
1 parent 59d1b6d commit 8ee005d

16 files changed

Lines changed: 215 additions & 75 deletions

.github/workflows/api-release.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,19 @@ concurrency:
1616

1717
jobs:
1818
publish:
19-
runs-on: [self-hosted, Linux, X64, prod]
19+
runs-on: depot-ubuntu-24.04
2020
defaults:
2121
run:
2222
working-directory: ./src/typescript/api
2323
steps:
2424
- uses: actions/checkout@v4
2525

26+
- name: Setup Node.js
27+
uses: actions/setup-node@v4
28+
with:
29+
node-version: 22
30+
registry-url: https://registry.npmjs.org
31+
2632
- name: Set version from tag
2733
run: |
2834
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Build AppImage build-env image
2+
3+
on:
4+
schedule:
5+
- cron: "0 5 * * 1"
6+
push:
7+
branches: [main]
8+
paths:
9+
- scripts/runners/appimage/AppImageBuilder.Dockerfile
10+
- .github/workflows/build-appimage-image.yaml
11+
workflow_dispatch:
12+
13+
concurrency:
14+
group: ${{ github.workflow }}
15+
cancel-in-progress: false
16+
17+
jobs:
18+
build:
19+
runs-on: depot-ubuntu-24.04
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
target:
24+
- platform: linux/amd64
25+
tag: appimage-amd64-latest
26+
- platform: linux/arm64
27+
tag: appimage-arm64-latest
28+
29+
name: Build AppImage image (${{ matrix.target.platform }})
30+
31+
steps:
32+
- name: Checkout code
33+
uses: actions/checkout@v4
34+
35+
- name: Set up Depot
36+
uses: depot/setup-action@v1
37+
38+
- name: Build and push to Depot Registry
39+
uses: depot/build-push-action@v1
40+
with:
41+
project: ${{ vars.DEPOT_PROJECT_ID }}
42+
platforms: ${{ matrix.target.platform }}
43+
context: scripts/runners/appimage
44+
file: scripts/runners/appimage/AppImageBuilder.Dockerfile
45+
save: true
46+
save-tags: ${{ matrix.target.tag }}

.github/workflows/build-appimage.yaml

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,25 @@ concurrency:
1313

1414
jobs:
1515
build:
16-
runs-on: [self-hosted, Linux, X64, appimage]
16+
runs-on: ${{ matrix.target.runner }}
17+
container: registry.depot.dev/${{ vars.DEPOT_PROJECT_ID }}:${{ matrix.target.tag }}
18+
19+
strategy:
20+
fail-fast: false
21+
matrix:
22+
target:
23+
- arch: amd64
24+
runner: depot-ubuntu-24.04-16
25+
tag: appimage-amd64-latest
26+
- arch: arm64
27+
runner: depot-ubuntu-24.04-arm-16
28+
tag: appimage-arm64-latest
29+
30+
name: Build AppImage (${{ matrix.target.arch }})
31+
1732
env:
1833
INSTALL_DIR: ${{ github.workspace }}/install
34+
APPIMAGE_EXTRACT_AND_RUN: "1"
1935

2036
steps:
2137
- name: Checkout code
@@ -24,7 +40,7 @@ jobs:
2440
- name: ccache
2541
uses: hendrikmuhs/ccache-action@v1.2
2642
with:
27-
key: self-hosted-prod
43+
key: appimage-${{ matrix.target.arch }}
2844
max-size: 0
2945

3046
- name: Configure CMake
@@ -34,7 +50,7 @@ jobs:
3450
-DCMAKE_INSTALL_PREFIX="${INSTALL_DIR}"
3551
3652
- name: Build
37-
run: cmake --build build --parallel ${nproc}
53+
run: cmake --build build --parallel $(nproc)
3854

3955
- name: Install
4056
run: cmake --install build
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Build Arch build-env image
2+
3+
on:
4+
schedule:
5+
- cron: "0 4 * * 1"
6+
push:
7+
branches: [main]
8+
paths:
9+
- scripts/runners/arch/base.Dockerfile
10+
- .github/workflows/build-arch-image.yaml
11+
workflow_dispatch:
12+
13+
concurrency:
14+
group: ${{ github.workflow }}
15+
cancel-in-progress: false
16+
17+
jobs:
18+
build:
19+
runs-on: depot-ubuntu-24.04
20+
steps:
21+
- name: Checkout code
22+
uses: actions/checkout@v4
23+
24+
- name: Set up Depot
25+
uses: depot/setup-action@v1
26+
27+
- name: Build and push to Depot Registry
28+
uses: depot/build-push-action@v1
29+
with:
30+
project: ${{ vars.DEPOT_PROJECT_ID }}
31+
platforms: linux/amd64
32+
context: scripts/runners/arch
33+
file: scripts/runners/arch/base.Dockerfile
34+
save: true
35+
save-tags: arch-latest
Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build
1+
name: Build (Linux)
22

33
on:
44
push:
@@ -13,10 +13,11 @@ concurrency:
1313

1414
jobs:
1515
build:
16-
runs-on: [self-hosted, Linux, X64, prod]
16+
runs-on: depot-ubuntu-24.04-16
17+
container: registry.depot.dev/${{ vars.DEPOT_PROJECT_ID }}:arch-latest
1718

1819
strategy:
19-
max-parallel: 1
20+
fail-fast: false
2021
matrix:
2122
compiler:
2223
- name: GCC
@@ -32,9 +33,21 @@ jobs:
3233
- name: Checkout code
3334
uses: actions/checkout@v4
3435

36+
- name: ccache
37+
uses: hendrikmuhs/ccache-action@v1.2
38+
with:
39+
key: build-${{ matrix.compiler.name }}
40+
3541
- name: Configure CMake
3642
run: |
37-
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=ON -DCMAKE_PREFIX_PATH=$Qt6_DIR -DCMAKE_C_COMPILER=${{ matrix.compiler.cc }} -DCMAKE_CXX_COMPILER=${{ matrix.compiler.cxx }}
43+
cmake -S . -B build -G Ninja \
44+
-DCMAKE_BUILD_TYPE=Release \
45+
-DBUILD_TESTS=ON \
46+
-DUSE_SYSTEM_CMARK_GFM=OFF \
47+
-DCMAKE_C_COMPILER=${{ matrix.compiler.cc }} \
48+
-DCMAKE_CXX_COMPILER=${{ matrix.compiler.cxx }} \
49+
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
50+
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
3851
3952
- name: Build
4053
run: cmake --build build --parallel $(nproc)

.github/workflows/cachix.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
runs-on: ${{ matrix.os }}
1010
strategy:
1111
matrix:
12-
os: [ubuntu-latest, ubuntu-24.04-arm]
12+
os: [depot-ubuntu-24.04, depot-ubuntu-24.04-arm]
1313
steps:
1414
- uses: actions/checkout@v4
1515
- uses: cachix/install-nix-action@v25

.github/workflows/format.yaml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ concurrency:
1212

1313
jobs:
1414
format:
15-
runs-on: [self-hosted, Linux, X64, prod]
15+
runs-on: depot-ubuntu-24.04
16+
container: registry.depot.dev/${{ vars.DEPOT_PROJECT_ID }}:arch-latest
1617

1718
steps:
1819
- name: Checkout code
@@ -21,11 +22,6 @@ jobs:
2122
- name: Check C++ formatting
2223
run: make check-format
2324

24-
- name: Setup Node.js
25-
uses: actions/setup-node@v4
26-
with:
27-
node-version: 22
28-
2925
- name: Check TypeScript formatting
3026
working-directory: src/typescript
3127
run: npx @biomejs/biome format

.github/workflows/nix-format.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ concurrency:
1212

1313
jobs:
1414
format:
15-
runs-on: [self-hosted, Linux, X64, prod]
15+
runs-on: depot-ubuntu-24.04
1616

1717
steps:
1818
- name: Checkout code

.github/workflows/nix-support.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66

77
jobs:
88
update-tags:
9-
runs-on: ubuntu-latest
9+
runs-on: depot-ubuntu-24.04
1010

1111
steps:
1212
- uses: actions/checkout@v5

.github/workflows/release.yml

Lines changed: 16 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ concurrency:
1616

1717
jobs:
1818
build-binary:
19-
runs-on: [self-hosted, Linux, X64, prod]
19+
runs-on: depot-ubuntu-24.04-16
20+
container: registry.depot.dev/${{ vars.DEPOT_PROJECT_ID }}:arch-latest
2021
permissions:
2122
contents: write
2223
outputs:
@@ -70,7 +71,6 @@ jobs:
7071
-DVICINAE_PROVENANCE=binary_release \
7172
-DLTO=ON \
7273
-DUSE_SYSTEM_CMARK_GFM=OFF \
73-
-DCMAKE_PREFIX_PATH="$Qt6_DIR" \
7474
-DCMAKE_INSTALL_PREFIX="${INSTALL_DIR}"
7575
7676
- name: Build
@@ -90,42 +90,6 @@ jobs:
9090
cd "${INSTALL_DIR}"
9191
tar -czvf "${{ github.workspace }}/${{ steps.meta.outputs.artifact }}" .
9292
93-
- name: Fetch sponsors
94-
id: sponsors
95-
env:
96-
GH_TOKEN: ${{ secrets.SPONSORS_TOKEN || github.token }}
97-
run: |
98-
set -euo pipefail
99-
logins=$(gh api graphql -f query='
100-
query {
101-
organization(login: "vicinaehq") {
102-
sponsors(first: 100) {
103-
nodes {
104-
... on User { login }
105-
... on Organization { login }
106-
}
107-
}
108-
}
109-
}
110-
' --jq '.data.organization.sponsors.nodes[].login' 2>/dev/null || true)
111-
112-
if [[ -z "$logins" ]]; then
113-
echo "body=" >> "$GITHUB_OUTPUT"
114-
else
115-
{
116-
echo 'body<<SPONSORS_EOF'
117-
echo ""
118-
echo "## Sponsors"
119-
echo ""
120-
echo "Thanks to our sponsors for supporting vicinae!"
121-
echo ""
122-
while IFS= read -r login; do
123-
echo "- [@${login}](https://github.com/${login})"
124-
done <<< "$logins"
125-
echo 'SPONSORS_EOF'
126-
} >> "$GITHUB_OUTPUT"
127-
fi
128-
12993
- name: Create GitHub Release and upload asset
13094
uses: softprops/action-gh-release@v2
13195
with:
@@ -135,24 +99,29 @@ jobs:
13599
files: |
136100
${{ steps.meta.outputs.artifact }}
137101
138-
- name: Append sponsors to release notes
139-
if: steps.sponsors.outputs.body != ''
140-
uses: softprops/action-gh-release@v2
141-
with:
142-
tag_name: ${{ steps.meta.outputs.tag }}
143-
append_body: true
144-
body: ${{ steps.sponsors.outputs.body }}
145-
146102
147103
build-appimage:
148104
needs: build-binary
149-
runs-on: [self-hosted, Linux, X64, appimage]
105+
runs-on: ${{ matrix.target.runner }}
106+
container: registry.depot.dev/${{ vars.DEPOT_PROJECT_ID }}:${{ matrix.target.tag }}
150107
permissions:
151108
contents: write
109+
strategy:
110+
fail-fast: false
111+
matrix:
112+
target:
113+
- arch: amd64
114+
runner: depot-ubuntu-24.04-16
115+
tag: appimage-amd64-latest
116+
- arch: arm64
117+
runner: depot-ubuntu-24.04-arm-16
118+
tag: appimage-arm64-latest
119+
name: build-appimage (${{ matrix.target.arch }})
152120
env:
153121
BUILD_TYPE: Release
154122
INSTALL_DIR: ${{ github.workspace }}/install
155123
APP_DIR: ${{ github.workspace }}/appdir
124+
APPIMAGE_EXTRACT_AND_RUN: "1"
156125

157126
steps:
158127
- name: Checkout

0 commit comments

Comments
 (0)