Update GitHub Actions and Packit to run against the latest distributions available #564
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Review-checks | |
on: [pull_request] | |
jobs: | |
unit-tests: | |
strategy: | |
fail-fast: false | |
matrix: | |
image: | |
- quay.io/fedora/fedora:38 | |
- quay.io/fedora/fedora:39 | |
- quay.io/fedora/fedora:40 | |
- quay.io/fedora/fedora:rawhide | |
runs-on: ubuntu-latest | |
container: | |
image: ${{ matrix.image }} | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Set DNF command | |
run: | | |
if [[ "${{ matrix.image }}" == *"rawhide"* ]]; then | |
echo "DNF_COMMAND=dnf5" >> $GITHUB_ENV | |
else | |
echo "DNF_COMMAND=dnf" >> $GITHUB_ENV | |
fi | |
- name: Install deps | |
run: | | |
${{ env.DNF_COMMAND }} install -y '${{ env.DNF_COMMAND }}-command(builddep)' git-daemon python3-flask python3-requests python3-pytest python3-six procps-ng | |
- name: Install restraint deps | |
run: | | |
${{ env.DNF_COMMAND }} builddep --spec specfiles/restraint-upstream.spec -y | |
- name: Run tests | |
run: | | |
set -o pipefail | |
make check | tee unittests.out | |
mv unittests.out /__w/unittests.out | |
- uses: actions/upload-artifact@v1 | |
with: | |
name: unittests.out | |
path: /home/runner/work/unittests.out | |
valgrind: | |
strategy: | |
fail-fast: false | |
matrix: | |
image: | |
- quay.io/fedora/fedora:38 | |
- quay.io/fedora/fedora:39 | |
- quay.io/fedora/fedora:40 | |
- quay.io/fedora/fedora:rawhide | |
runs-on: ubuntu-latest | |
container: | |
image: ${{ matrix.image }} | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Set DNF command | |
run: | | |
if [[ "${{ matrix.image }}" == *"rawhide"* ]]; then | |
echo "DNF_COMMAND=dnf5" >> $GITHUB_ENV | |
else | |
echo "DNF_COMMAND=dnf" >> $GITHUB_ENV | |
fi | |
- name: Install deps | |
run: | | |
${{ env.DNF_COMMAND }} install -y '${{ env.DNF_COMMAND }}-command(builddep)' valgrind git-daemon procps-ng | |
- name: Install restraint deps | |
run: | | |
${{ env.DNF_COMMAND }} builddep --spec specfiles/restraint-upstream.spec -y | |
- name: Run valgrind | |
run: | | |
set -o pipefail | |
make valgrind 2>&1 | tee valgrind.out | |
mv valgrind.out /__w/valgrind.out | |
- uses: actions/upload-artifact@v1 | |
with: | |
name: valgrind.out | |
path: /home/runner/work/valgrind.out | |
static-build: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
image: | |
- quay.io/fedora/fedora:38 | |
- quay.io/fedora/fedora:39 | |
- quay.io/fedora/fedora:40 | |
- quay.io/fedora/fedora:rawhide | |
- quay.io/centos/centos:centos7 | |
container: | |
image: ${{ matrix.image }} | |
steps: | |
- name: Set DNF command | |
run: | | |
if [[ "${{ matrix.image }}" == *"rawhide"* ]]; then | |
echo "DNF_COMMAND=dnf5" >> $GITHUB_ENV | |
else | |
echo "DNF_COMMAND=dnf" >> $GITHUB_ENV | |
fi | |
- name: Enable EPEL | |
run: | | |
yum install -y epel-release | |
if: contains(matrix.image, 'centos') | |
- name: Install Git client (Fedora) | |
run: | | |
${{ env.DNF_COMMAND }} install -y git | |
if: contains(matrix.image, 'fedora') | |
- name: Install Git client (CentOS) | |
run: | | |
yum install -y https://repo.ius.io/ius-release-el7.rpm | |
yum install -y git236-core | |
if: contains(matrix.image, 'centos7') | |
- uses: actions/checkout@v3 | |
- name: Install deps | |
run: | | |
yum install -y ${{ env.DNF_COMMAND }} '${{ env.DNF_COMMAND }}-command(builddep)' tito | |
- name: Install restraint deps for static build | |
run: | | |
${{ env.DNF_COMMAND }} builddep -y --spec restraint.spec | |
- name: Mark git directories safe | |
run: | | |
git config --global --add safe.directory '*' | |
- name: Tito Build | |
run: | | |
tito build --rpm --test | |
static-build-centos-stream: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
version: ["8", "9"] | |
container: | |
image: quay.io/centos/centos:stream${{ matrix.version }} | |
options: --security-opt seccomp=unconfined | |
steps: | |
- name: Enable EPEL | |
run: | | |
yum install -y epel-release | |
- name: Install Git client | |
run: | | |
dnf install -y git | |
- uses: actions/checkout@v3 | |
- name: Install deps | |
run: | | |
yum install -y ${{ env.DNF_COMMAND }} 'dnf-command(builddep)' tito | |
- name: Enable PowerTools | |
run: | | |
yum config-manager --set-enabled powertools | |
if: contains(matrix.version, '8') | |
- name: Enable CRB | |
run: | | |
yum config-manager --set-enabled crb | |
if: contains(matrix.version, '9') | |
- name: Install restraint deps for static build | |
run: | | |
dnf builddep -y --spec restraint.spec | |
- name: Mark git directories safe | |
run: | | |
git config --global --add safe.directory '*' | |
- name: Tito Build | |
run: | | |
tito build --rpm --test |