|
| 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-${{ env.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 |
0 commit comments