-
Notifications
You must be signed in to change notification settings - Fork 8
175 lines (152 loc) · 6.19 KB
/
Copy pathbuild-linux-packages.yml
File metadata and controls
175 lines (152 loc) · 6.19 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
174
175
# Linux packaging build test: AppImage, deb, rpm, Flatpak (branches and PRs).
# Tagged release assets run in build-release.yml with draft.
#
# Pinned first-party actions (bump tag and SHA together when upgrading):
# actions/checkout@v6.0.1 8e8c483db84b4bee98b60c0593521ed34d9990e8
# actions/upload-artifact@v5.0.0 330a01c490aca151604b8cf639adc76d48f6c5d4
name: Build Linux packages
on:
push:
branches:
- dev
pull_request:
branches:
- dev
paths:
- "package.json"
- "scripts/ensure-flatpak-flathub-remote.sh"
- "scripts/ci/github-build-linux-*.sh"
- ".github/workflows/build-linux-packages.yml"
- ".github/workflows/build-release.yml"
- ".github/workflows/frontend-build.yml"
- ".github/actions/**"
workflow_dispatch:
permissions:
contents: read
concurrency:
group: linux-packages-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
NODE_OPTIONS: --max-old-space-size=8192
PYTHON_VERSION: "3.14"
NODE_VERSION: "24"
UV_VERSION: "0.11.15"
PNPM_VERSION: "11.1.2"
jobs:
frontend:
name: Build frontend artifact
uses: ./.github/workflows/frontend-build.yml
permissions:
contents: read
with:
artifact_name: meshchatx-frontend-linux-pkg-${{ github.run_id }}-${{ github.run_attempt }}
retention_days: 1
linux-test:
name: Linux build test (${{ matrix.arch }})
needs: frontend
strategy:
fail-fast: false
matrix:
include:
- arch: x64
runner: ubuntu-latest
- arch: arm64
runner: ubuntu-24.04-arm
runs-on: ${{ matrix.runner }}
timeout-minutes: 120
permissions:
contents: read
actions: write
env:
FRONTEND_ARTIFACT_NAME: ${{ needs.frontend.outputs.artifact_name }}
MESHCHATX_FRONTEND_PREBUILT: "1"
steps:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
- name: Set up Python and UV
uses: ./.github/actions/setup-python-uv
with:
python-version: ${{ env.PYTHON_VERSION }}
uv-version: ${{ env.UV_VERSION }}
- name: Set up Node and pnpm
uses: ./.github/actions/setup-node-pnpm
with:
node-version: ${{ env.NODE_VERSION }}
pnpm-version: ${{ env.PNPM_VERSION }}
- name: Linux packaging APT dependencies
run: bash scripts/ci/github-apt-linux-packaging.sh
- name: Install dependencies
run: bash scripts/ci/github-install-deps.sh
- name: Fetch frontend artifact
uses: ./.github/actions/fetch-frontend-artifact
with:
artifact-name: ${{ env.FRONTEND_ARTIFACT_NAME }}
- name: Setup Task
run: sh scripts/ci/setup-task.sh
- name: Build release-assets
run: bash scripts/ci/github-build-linux-release-assets.sh
- name: Upload Linux build-test artifact (${{ matrix.arch }})
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
with:
name: meshchatx-linux-build-test-${{ matrix.arch }}-${{ github.ref_name }}-${{ github.run_id }}
path: release-assets/
if-no-files-found: warn
retention-days: 1
flatpak:
name: Flatpak (electron-builder)
needs: frontend
runs-on: ubuntu-latest
timeout-minutes: 90
permissions:
contents: read
env:
FRONTEND_ARTIFACT_NAME: ${{ needs.frontend.outputs.artifact_name }}
MESHCHATX_FRONTEND_PREBUILT: "1"
steps:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
- name: Install flatpak toolchain
run: |
set -euo pipefail
sudo apt-get update -y
sudo apt-get install -y --no-install-recommends \
flatpak \
flatpak-builder \
elfutils \
zstd \
desktop-file-utils \
appstream
- name: Install flatpak runtimes (user scope)
run: |
set -euo pipefail
bash scripts/ensure-flatpak-flathub-remote.sh
flatpak --user install -y --noninteractive flathub \
org.freedesktop.Platform//25.08 \
org.freedesktop.Sdk//25.08 \
org.electronjs.Electron2.BaseApp//25.08
- name: Set up development environment
uses: ./.github/actions/setup-dev-environment
with:
python-version: ${{ env.PYTHON_VERSION }}
uv-version: ${{ env.UV_VERSION }}
node-version: ${{ env.NODE_VERSION }}
pnpm-version: ${{ env.PNPM_VERSION }}
- name: Fetch frontend artifact
uses: ./.github/actions/fetch-frontend-artifact
with:
artifact-name: ${{ env.FRONTEND_ARTIFACT_NAME }}
- name: Build flatpak bundle
run: bash scripts/ci/github-build-linux-flatpak.sh
- name: List flatpak output
run: |
set -euo pipefail
ls -la dist 2>/dev/null || true
find dist -maxdepth 3 -type f \( -name "*.flatpak" -o -name "*.flatpakref" \) -print
- name: Upload flatpak artifact
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
with:
name: meshchatx-linux-flatpak-${{ github.ref_name }}-${{ github.run_id }}
path: dist/*.flatpak
if-no-files-found: error
retention-days: 7