Skip to content

Commit 2f7fec8

Browse files
committed
Add release binaries from git main on push
Targeting a few distributions, produce a tarball with binaries. This is intended to be used in other downstream CI scenarios. Signed-off-by: Colin Walters <[email protected]>
1 parent c861efa commit 2f7fec8

File tree

2 files changed

+72
-0
lines changed

2 files changed

+72
-0
lines changed

.github/workflows/builds.yaml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Build binaries
2+
3+
on: push
4+
5+
permissions:
6+
actions: read
7+
8+
jobs:
9+
build:
10+
strategy:
11+
matrix:
12+
include:
13+
- baseimage: docker.io/library/ubuntu:24.04
14+
basename: ubuntu-24.04
15+
- baseimage: docker.io/library/ubuntu:22.04
16+
basename: ubuntu-22.04
17+
- baseimage: quay.io/fedora/fedora:41
18+
basename: fedora-41
19+
- baseimage: quay.io/centos/centos:stream9
20+
basename: centos-stream9
21+
runs-on: ubuntu-24.04
22+
container: ${{ matrix.baseimage }}
23+
steps:
24+
- name: Bootstrap git
25+
run: if test -x /usr/bin/apt; then apt -y update && apt -y install git; else dnf -y install git; fi
26+
- name: Checkout repository
27+
uses: actions/checkout@v4
28+
- name: Fix git perms
29+
run: git config --global --add safe.directory $(pwd)
30+
- name: Install dependencies
31+
run: ./hacking/installdeps.sh
32+
- name: Set environment
33+
run: set -e
34+
echo "SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct)" >> $GITHUB_ENV
35+
- name: Configure
36+
run: meson setup build --prefix=/usr -Dfuse=disabled
37+
- name: Build
38+
run: meson compile -C build
39+
- name: Capture build
40+
run: set -e; DESTDIR=$(pwd)/instroot meson install -C build &&
41+
tar -C instroot --sort=name --owner=0 --group=0 --numeric-owner
42+
--mtime="${SOURCE_DATE_EPOCH}"
43+
--pax-option=exthdr.name=%d/PaxHeaders/%f,delete=atime,delete=ctime
44+
-czf composefs.tar.gz .
45+
- name: Upload binary
46+
uses: actions/upload-artifact@v4
47+
with:
48+
name: composefs-${{ matrix.basename }}.tar
49+
path: composefs.tar.gz
50+
- name: Upload log
51+
uses: actions/upload-artifact@v4
52+
if: always()
53+
with:
54+
name: testlog-asan.txt
55+
path: build/meson-logs/testlog.txt

hacking/installdeps.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
#!/bin/bash
22
set -xeuo pipefail
3+
4+
# Handle Fedora derivatives or others that have composefs
5+
# shipped already.
6+
7+
if test -x /usr/bin/dnf; then
8+
. /etc/os-release
9+
case "${ID_LIKE:-}" in
10+
*rhel*) dnf config-manager --set-enabled crb ;;
11+
esac
12+
dnf -y install dnf-utils tar git meson;
13+
dnf -y builddep composefs
14+
exit 0
15+
fi
16+
317
export DEBIAN_FRONTEND=noninteractive
418

519
PACKAGES=" \
@@ -9,6 +23,7 @@ PACKAGES=" \
923
autotools-dev \
1024
git \
1125
make \
26+
tar \
1227
gcc \
1328
libssl-dev \
1429
libfsverity-dev \
@@ -33,9 +48,11 @@ done
3348

3449
# Install packages:
3550
if [ -n "${PACKAGES_REQUIRED}" ]; then
51+
apt -y update
3652
apt-get install -y $PACKAGES_REQUIRED
3753
fi
3854

3955
if [ -n "${PACKAGES_OPTIONAL}" ]; then
56+
apt -y update
4057
apt-get install -y --ignore-missing $PACKAGES_OPTIONAL || true
4158
fi

0 commit comments

Comments
 (0)