Skip to content

Commit c7cf3be

Browse files
committed
Add release binaries from git main
Signed-off-by: Colin Walters <[email protected]>
1 parent c861efa commit c7cf3be

File tree

2 files changed

+69
-0
lines changed

2 files changed

+69
-0
lines changed

.github/workflows/builds.yaml

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