Skip to content

Commit c6b3f1e

Browse files
ci: add platform build coverage
- New build-platforms.yml with build-only jobs for portability checking - Linux matrix: ubuntu-22.04, ubuntu-24.04-arm, plus release/debug/hardened build variants - Hardened build uses _FORTIFY_SOURCE=3 and -fstack-protector-strong - Alpine/musl via Docker container (alpine:3.21) - FreeBSD 14 via vmactions/freebsd-vm - All compile-only, no runtime tests (test harness not yet portable to these platforms) - Upload meson build logs on failure for all platforms including FreeBSD - All actions pinned to Node 24-capable SHAs, host runners pinned to ubuntu-24.04
1 parent d749988 commit c6b3f1e

1 file changed

Lines changed: 109 additions & 0 deletions

File tree

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
name: platform builds
2+
3+
on:
4+
push:
5+
pull_request:
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
13+
cancel-in-progress: true
14+
15+
jobs:
16+
linux-compat:
17+
name: ${{ matrix.name }}
18+
runs-on: ${{ matrix.runner }}
19+
timeout-minutes: 15
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
include:
24+
- name: ubuntu-22.04
25+
runner: ubuntu-22.04
26+
- name: ubuntu-24.04-arm
27+
runner: ubuntu-24.04-arm
28+
- name: ubuntu-24.04-release
29+
runner: ubuntu-24.04
30+
buildtype: release
31+
- name: ubuntu-24.04-debug
32+
runner: ubuntu-24.04
33+
buildtype: debug
34+
- name: ubuntu-24.04-hardened
35+
runner: ubuntu-24.04
36+
extra_cflags: "-D_FORTIFY_SOURCE=3 -fstack-protector-strong"
37+
steps:
38+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
39+
40+
- name: Set up Python
41+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
42+
with:
43+
python-version: '3.12'
44+
45+
- name: Install dependencies
46+
run: |
47+
sudo apt-get update
48+
sudo apt-get install -y gcc ninja-build pkg-config libglib2.0-dev libfuse3-dev
49+
pip3 install meson
50+
51+
- name: Build
52+
env:
53+
CFLAGS: ${{ matrix.extra_cflags || '' }}
54+
run: |
55+
meson setup build ${{ matrix.buildtype && format('--buildtype={0}', matrix.buildtype) || '' }}
56+
ninja -C build
57+
58+
- name: Upload build logs
59+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
60+
if: failure()
61+
with:
62+
name: build-logs-${{ matrix.name }}
63+
path: build/meson-logs/
64+
65+
alpine-musl:
66+
name: alpine-musl
67+
runs-on: ubuntu-24.04
68+
timeout-minutes: 15
69+
steps:
70+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
71+
72+
- name: Build in Alpine container
73+
run: |
74+
docker run --rm -v "$PWD:/work" -w /work alpine:3.21 sh -euxc '
75+
apk add --no-cache gcc musl-dev meson ninja pkgconf glib-dev fuse3-dev
76+
meson setup build-alpine
77+
ninja -C build-alpine
78+
'
79+
80+
- name: Upload build logs
81+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
82+
if: failure()
83+
with:
84+
name: build-logs-alpine-musl
85+
path: build-alpine/meson-logs/
86+
87+
freebsd:
88+
name: freebsd-14
89+
runs-on: ubuntu-24.04
90+
timeout-minutes: 20
91+
steps:
92+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
93+
94+
- name: Build on FreeBSD
95+
uses: vmactions/freebsd-vm@d1e65811565151536c0c894fff74f06351ed26e6 # v1.4.5
96+
with:
97+
usesh: true
98+
prepare: |
99+
pkg install -y fusefs-libs3 glib meson ninja pkgconf
100+
run: |
101+
meson setup build-freebsd
102+
ninja -C build-freebsd
103+
104+
- name: Upload build logs
105+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
106+
if: failure()
107+
with:
108+
name: build-logs-freebsd
109+
path: build-freebsd/meson-logs/

0 commit comments

Comments
 (0)