|
name: CMake (Ubuntu Linux) |
|
|
|
on: [push, pull_request] |
|
|
|
env: |
|
BUILD_TYPE: RelWithDebInfo |
|
BUILD_NUMBER: ${{github.run_number}} |
|
QT_QPA_PLATFORM: offscreen |
|
DEBIAN_FRONTEND: noninteractive |
|
DEBFULLNAME: GitHub build |
|
DEBEMAIL: github-action@github.com |
|
CMAKE_BUILD_PARALLEL_LEVEL: 3 |
|
|
|
jobs: |
|
build: |
|
runs-on: ubuntu-24.04${{ matrix.arch == 'arm64' && '-arm' || '' }} |
|
container: ubuntu:${{matrix.container}} |
|
strategy: |
|
matrix: |
|
container: ['22.04', '24.04', '25.10', '26.04'] |
|
arch: ['amd64', 'arm64'] |
|
|
|
steps: |
|
- name: Install dependencies |
|
run: | |
|
for f in /etc/apt/sources.list /etc/apt/sources.list.d/*.list /etc/apt/sources.list.d/*.sources; do |
|
[ -f "$f" ] && sed -i 's|http://archive.ubuntu.com|http://azure.archive.ubuntu.com|g; s|http://security.ubuntu.com|http://azure.archive.ubuntu.com|g' "$f" |
|
done |
|
echo 'path-exclude=/usr/share/man/*' > /etc/dpkg/dpkg.cfg.d/99-nodocs |
|
echo 'path-exclude=/usr/share/doc/*' >> /etc/dpkg/dpkg.cfg.d/99-nodocs |
|
echo 'path-exclude=/usr/share/doc-base/*' >> /etc/dpkg/dpkg.cfg.d/99-nodocs |
|
apt update -qq && apt install --no-install-recommends -y git lsb-release fakeroot build-essential devscripts debhelper lintian pkg-config cmake libpcsclite-dev libssl-dev libgtest-dev libgl-dev libqt6svg6-dev qt6-tools-dev qt6-tools-dev-tools qt6-l10n-tools |
|
|
|
- uses: actions/checkout@v6 |
|
with: |
|
submodules: recursive |
|
persist-credentials: false |
|
|
|
- name: Configure CMake |
|
run: cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -B build -S . |
|
|
|
- name: Build |
|
run: | |
|
cmake --build build --config $BUILD_TYPE --target installer |
|
# Debian creates artifacts outside of project dir, copy them back to make them available in the build artifacts |
|
mv ../web-eid*.* build/ |
|
|
|
- name: Test package |
|
run: lintian build/*.deb |
|
|
|
- uses: actions/upload-artifact@v7 |
|
with: |
|
name: web-eid-app-ubuntu-build-ubuntu${{matrix.container}}-${{ matrix.arch }}-${{github.run_number}} |
|
path: build/*.*deb |