mirror of
https://github.com/troglobit/finit.git
synced 2026-10-09 16:50:59 +07:00
With 5.0 on master, maintenance releases move to a 4.x branch: run push builds, docs deploy, and weekly distcheck for any N.x branch, and mark only the highest stable tag as the latest release. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
79 lines
2.6 KiB
YAML
79 lines
2.6 KiB
YAML
name: Weekly Distcheck
|
|
|
|
# Verify that `make distcheck` works as intended: all tests pass, and
|
|
# any new files are distributed in the tarballs
|
|
on:
|
|
schedule:
|
|
- cron: '0 0 * * 0'
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
schedule:
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
branches: ${{ steps.schedule.outputs.branches }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Check for branches with no commits since last week
|
|
id: schedule
|
|
run: |
|
|
branches=
|
|
maint=$(git branch -r --format='%(refname:lstrip=3)' | grep -E '^[0-9]+\.x$')
|
|
for branch in master $maint; do
|
|
commits="$(git log --format=%H --since='1 week ago' origin/$branch)"
|
|
if [ -z "$commits" ]; then
|
|
branches="$branches\"$branch\","
|
|
fi
|
|
done
|
|
echo "branches=[${branches%,}]" >> $GITHUB_OUTPUT
|
|
distcheck:
|
|
needs: schedule
|
|
if: ${{ needs.schedule.outputs.branches != '[]' }}
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
branch: ${{ fromJSON(needs.schedule.outputs.branches) }}
|
|
fail-fast: false
|
|
steps:
|
|
- name: Install dependencies
|
|
run: |
|
|
sudo apt-get -y update
|
|
sudo apt-get -y install pkg-config jq libcap-dev
|
|
wget https://github.com/troglobit/libuev/releases/download/v2.4.1/libuev-2.4.1.tar.xz
|
|
wget https://github.com/troglobit/libite/releases/download/v2.6.2/libite-2.6.2.tar.gz
|
|
tar xf libuev-2.4.1.tar.xz
|
|
tar xf libite-2.6.2.tar.gz
|
|
(cd libuev-2.4.1 && ./configure && make -j9 && sudo make install-strip)
|
|
(cd libite-2.6.2 && ./configure && make -j9 && sudo make install-strip)
|
|
sudo ldconfig
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
ref: ${{ matrix.branch }}
|
|
- name: Base run
|
|
run: |
|
|
./autogen.sh
|
|
./configure --prefix=/usr --exec-prefix= --sysconfdir=/etc --localstatedir=/var
|
|
make -j9 V=1
|
|
- name: Install to /tmp
|
|
run: |
|
|
DESTDIR=/tmp make install-strip
|
|
- name: Enable unprivileged userns (unshare)
|
|
run: |
|
|
sudo sysctl kernel.apparmor_restrict_unprivileged_userns=0
|
|
- name: Check dist tarball
|
|
run: |
|
|
ver=$(/tmp/sbin/initctl -V | awk '/Finit.*/ {print $2;}')
|
|
dir=finit-$ver/_build/sub
|
|
make -j1 distcheck || (cat $dir/test/test-suite.log; false)
|
|
- name: Upload Test Results
|
|
if: always()
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: finit-weekly-test-logs-${{ matrix.branch }}
|
|
path: finit-*/_build/sub/test/*.log
|