Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use docker images for CI/CD (fedora & opensuse) #663

Merged
merged 1 commit into from
Dec 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 10 additions & 19 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,34 +103,25 @@ jobs:
path: ${{ steps.deb.outputs.path }}

rpm:
name: rpm (${{ matrix.build-type }}, Qt ${{ matrix.qt-version-major }}, ${{ matrix.container != '' && matrix.container || matrix.os }})
runs-on: ${{ matrix.os }}
container: ${{ matrix.container }}
name: rpm (${{ matrix.build-type }}, Qt ${{ matrix.qt-version-major }}, ${{ matrix.image }})
runs-on: ubuntu-latest
container: zjeffer/notes:${{ matrix.image }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-20.04
# Fedora's release cycle: https://docs.fedoraproject.org/en-US/releases/lifecycle/
container: fedora:38
- # Fedora's release cycle: https://docs.fedoraproject.org/en-US/releases/lifecycle/
image: fedora
qt-version-major: 6
build-type: release

- os: ubuntu-20.04
container: opensuse/leap:15
- image: opensuse
qt-version-major: 6
build-type: release
steps:
- name: Install build dependencies
env:
PKG_MANAGER: ${{ startsWith(matrix.container, 'fedora') && 'dnf' || 'zypper' }}
# Fedora doesn't include libxkbcommon-devel as a dependency of Qt 6, so have to install it manually.
PKG_LIST: ${{ startsWith(matrix.container, 'fedora') && 'libxkbcommon-devel qt6-qtbase-private-devel qt6-qtdeclarative-devel' || 'qt6-base-private-devel qt6-declarative-devel' }}
run: |
${{ env.PKG_MANAGER }} update -y
${{ env.PKG_MANAGER }} install -y cmake gcc git ${{ env.PKG_LIST }} rpm-build rpmlint
# Prevent git's dubious ownership message
git config --global --add safe.directory "${PWD}"
- name: Setup git configuration
# workaround for "detected dubious ownership in repository" git error: https://github.com/actions/checkout/issues/1169
run: git config --global --add safe.directory "${PWD}"

- name: Checkout code
uses: actions/checkout@v3
Expand Down Expand Up @@ -164,7 +155,7 @@ jobs:
VERBOSE: 1
# openSUSE defaults to GCC 7, which doesn't support the filesystem library from C++17,
# and causes trouble compiling for Qt 6. So we have to manully specify GCC 10 instead.
CXX: ${{ startsWith(matrix.container, 'opensuse') && 'g++-10' || 'g++' }}
CXX: ${{ startsWith(matrix.image, 'opensuse') && 'g++-10' || 'g++' }}
run: |
cmake --warn-uninitialized --warn-unused-vars \
-B build \
Expand Down
5 changes: 5 additions & 0 deletions Dockerfiles/fedora
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM fedora:38

RUN dnf update -y && \
dnf install -y cmake gcc git rpm-build rpmlint \
libxkbcommon-devel qt6-qtbase-private-devel qt6-qtdeclarative-devel
5 changes: 5 additions & 0 deletions Dockerfiles/opensuse
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM opensuse/leap:15

RUN zypper update -y && \
zypper install -y cmake gcc git rpm-build rpmlint \
qt6-base-private-devel qt6-declarative-devel