Skip to content

Commit

Permalink
Add release binaries from git main
Browse files Browse the repository at this point in the history
Signed-off-by: Colin Walters <[email protected]>
  • Loading branch information
cgwalters committed Dec 14, 2024
1 parent c861efa commit 1d5d5e8
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/builds.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Build binaries

on: push

permissions:
actions: read

jobs:
build:
strategy:
matrix:
base:
- docker.io/library/ubuntu:22.04
- docker.io/library/ubuntu:24.04
- quay.io/fedora/fedora:41
- quay.io/centos/centos:stream9
runs-on: ubuntu-24.04
container: ${{ matrix.base }}
steps:
- name: Bootstrap git:
run: if test -x /usr/bin/apt; then apt -y update && apt -y install git; else dnf -y install git; fi
- name: Checkout repository
uses: actions/checkout@v4
- name: Install dependencies
run: ./hacking/installdeps.sh
- name: Set SOURCE_DATE_EPOCH
run: echo "SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct)" >> $GITHUB_ENV
- name: Configure
run: meson setup build --prefix=/usr -Dfuse=disabled
- name: Build
run: meson compile -C build
- name: Capture build
run: DESTDIR=$(pwd)/instroot meson install -C build && \
tar -C instroot --sort=name --owner=0 --group=0 --numeric-owner \
--mtime="${SOURCE_DATE_EPOCH}" \
--pax-option=exthdr.name=%d/PaxHeaders/%f,delete=atime,delete=ctime \
-czf composefs.tar.gz .
- name: Upload binary
uses: actions/upload-artifact@v4
with:
name: composefs-${{ matrix.base }}.tar
path: composefs.tar.gz
- name: Upload log
uses: actions/upload-artifact@v4
if: always()
with:
name: testlog-asan.txt
path: build/meson-logs/testlog.txt
17 changes: 17 additions & 0 deletions hacking/installdeps.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
#!/bin/bash
set -xeuo pipefail

# Handle Fedora derivatives or others that have composefs
# shipped already.

if test -x /usr/bin/dnf; then
. /etc/os-release
case "${ID_LIKE:-}" in
*rhel*) dnf config-manager --set-enabled crb ;;
esac
dnf -y install dnf-utils tar git;
dnf -y builddep composefs
exit 0
fi

export DEBIAN_FRONTEND=noninteractive

PACKAGES=" \
Expand All @@ -9,6 +23,7 @@ PACKAGES=" \
autotools-dev \
git \
make \
tar \
gcc \
libssl-dev \
libfsverity-dev \
Expand All @@ -33,9 +48,11 @@ done

# Install packages:
if [ -n "${PACKAGES_REQUIRED}" ]; then
apt -y update
apt-get install -y $PACKAGES_REQUIRED
fi

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

0 comments on commit 1d5d5e8

Please sign in to comment.