Skip to content

Add missing needs: get_fedora_releases #251

Add missing needs: get_fedora_releases

Add missing needs: get_fedora_releases #251

Workflow file for this run

name: Continuous Integration
on:
push:
branches:
- main
- ci_tests
pull_request:
branches:
- main
- ci_tests
jobs:
ubuntu:
name: Ubuntu
runs-on: ${{ matrix.os }}
continue-on-error: true
strategy:
fail-fast: false
matrix:
os:
- ubuntu-20.04
- ubuntu-22.04
compiler:
- gcc
- clang
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install build dependencies
run: |
sudo apt update
sudo apt install -y meson pkgconf openssl libssl-dev libpath-utils-dev libtalloc-dev help2man libpopt-dev ${{ matrix.compiler }}
sudo apt install -y --no-install-recommends debhelper devscripts lintian
# 18.04's debhelper is too old, we want to use compat level 12
if grep -q 18.04 /etc/os-release; then
sudo apt install -y -t bionic-backports debhelper
fi
- name: Configure build directory
run: |
CC=${{ matrix.compiler}} meson setup ${{ matrix.os }}
- name: Build SSCG
run: |
ninja -C ${{ matrix.os }}
- name: Run in-tree tests
run: |
meson test -t 5 --print-errorlogs -C ${{ matrix.os }}
- name: Build Debian source package
run: |
set -ex
mkdir deb
# keep version number as 0 for upstream, to match debian/changelog
git archive -o deb/sscg_0.orig.tar.gz --prefix sscg/ HEAD
cd deb
# unpack tar again to make sure the dist is complete and clean
tar xf sscg_*.tar.gz
cd sscg
cp -r packaging/debian .
# build source and binary package, with lintian
debuild -e CC=${{ matrix.compiler}} -us -uc
- name: Install built Debian binary package
run: |
sudo dpkg -i deb/sscg_*.deb
- name: Smoke test installed package
run: |
cd /tmp/
sscg
openssl x509 -in service.pem -text
openssl x509 -in ca.crt -text
get_fedora_releases:
name: Get Fedora Releases
runs-on: ubuntu-latest
steps:
- name: Query Fedora
id: releases
uses: sgallagher/get-fedora-releases-action@v1
outputs:
stable: ${{ steps.releases.outputs.stable }}
development: ${{ steps.releases.outputs.development }}
active: ${{ steps.releases.outputs.active }}
fedora:
name: Fedora x86_64
runs-on: ubuntu-latest
needs: get_fedora_releases
strategy:
fail-fast: false
matrix:
release: ${{ fromJson(needs.get_fedora_releases.outputs.active) }}
compiler:
- gcc
- clang
container:
image: quay.io/fedora/fedora:${{ matrix.release }}
options: --security-opt seccomp=unconfined
steps:
- name: Identify the system
run: |
cat /etc/os-release
- name: Checkout code
uses: actions/checkout@v4
- name: Install build dependencies
run: |
dnf install -y meson pkgconf openssl openssl-devel libpath_utils-devel libtalloc-devel help2man popt-devel ${{ matrix.compiler }}
- name: Configure build directory
run: |
CC=${{ matrix.compiler}} meson setup fedora-${{ matrix.release }}
- name: Build SSCG
run: |
ninja -C fedora-${{ matrix.release }}
- name: Run in-tree tests
run: |
meson test -t 5 --print-errorlogs -C fedora-${{ matrix.release }}
fedora_aarch64:
name: Fedora ARM64
runs-on: [self-hosted, linux, ARM64]
needs: get_fedora_releases
strategy:
fail-fast: false
matrix:
release: ${{ fromJson(needs.get_fedora_releases.outputs.active) }}
compiler:
- gcc
- clang
container:
image: quay.io/fedora/fedora:${{ matrix.release }}
options: --security-opt seccomp=unconfined
steps:
- name: Identify the system
run: |
cat /etc/os-release
- name: Checkout code
uses: actions/checkout@v4
- name: Install build dependencies
run: |
dnf install -y meson pkgconf openssl openssl-devel libpath_utils-devel libtalloc-devel help2man popt-devel ${{ matrix.compiler }}
- name: Configure build directory
run: |
CC=${{ matrix.compiler}} meson setup fedora-${{ matrix.release }}
- name: Build SSCG
run: |
ninja -C fedora-${{ matrix.release }}
- name: Run in-tree tests
run: |
meson test -t 5 --print-errorlogs -C fedora-${{ matrix.release }}
centos-stream:
name: CentOS Stream
runs-on: ubuntu-latest
continue-on-error: false
strategy:
fail-fast: false
matrix:
release:
- 8
- 9
compiler:
- gcc
- clang
container:
image: quay.io/centos/centos:stream${{ matrix.release }}
options: --security-opt seccomp=unconfined
steps:
- name: Identify the system
run: |
cat /etc/os-release
- name: Checkout SSCG code
uses: actions/checkout@v4
- name: Enable DNF tools
run: |
yum -y install dnf-plugins-core
- name: Enable CRB
if: matrix.release > 8
run: |
yum config-manager --set-enabled crb
- name: Enable PowerTools
if: matrix.release == 8
run: |
yum config-manager --set-enabled powertools
- name: Install build dependencies
run: |
yum install -y meson pkgconf-pkg-config openssl openssl-devel libpath_utils-devel libtalloc-devel help2man popt-devel ${{ matrix.compiler }}
- name: Configure build directory
run: |
CC=${{ matrix.compiler}} meson setup --errorlogs centos-stream-${{ matrix.release }} || ( cat centos-stream-${{ matrix.release }}/meson-logs/meson-log.txt && exit 1 )
- name: Build SSCG
run: |
ninja -C centos-stream-${{ matrix.release }}
- name: Run in-tree tests
run: |
meson test -t 5 --print-errorlogs -C centos-stream-${{ matrix.release }}