|
| 1 | +# GitHub Actions Scripts |
| 2 | +# Copyright (C) 2021-2026 by Thomas Dreibholz |
| 3 | +# |
| 4 | +# This program is free software: you can redistribute it and/or modify |
| 5 | +# it under the terms of the GNU General Public License as published by |
| 6 | +# the Free Software Foundation, either version 3 of the License, or |
| 7 | +# (at your option) any later version. |
| 8 | +# |
| 9 | +# This program is distributed in the hope that it will be useful, |
| 10 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | +# GNU General Public License for more details. |
| 13 | +# |
| 14 | +# You should have received a copy of the GNU General Public License |
| 15 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 16 | +# |
| 17 | +# Contact: dreibh@simula.no |
| 18 | + |
| 19 | +name: Fedora Linux CI Tests |
| 20 | + |
| 21 | +on: |
| 22 | + push: |
| 23 | + branches: |
| 24 | + - master |
| 25 | + - main |
| 26 | + - dreibh/github-actions |
| 27 | + |
| 28 | +jobs: |
| 29 | + |
| 30 | + # ######################################################################### |
| 31 | + # #### Build from Sources #### |
| 32 | + # ######################################################################### |
| 33 | + Build: |
| 34 | + |
| 35 | + # ###### Build matrix ################################################### |
| 36 | + strategy: |
| 37 | + matrix: |
| 38 | + include: |
| 39 | + # ====== Fedora Linux ============================================= |
| 40 | + - label: "Fedora 43 with Clang" |
| 41 | + image: fedora:43 |
| 42 | + cc: clang |
| 43 | + cxx: clang++ |
| 44 | + |
| 45 | + # ###### Build commands ################################################# |
| 46 | + name: ${{ matrix.label }} |
| 47 | + runs-on: ubuntu-latest |
| 48 | + container: |
| 49 | + image: ${{ matrix.image }} |
| 50 | + steps: |
| 51 | + # NOTE: actions/checkout@v6 does not work for old Ubuntu 18.04! |
| 52 | + - uses: actions/checkout@v6 |
| 53 | + - name: Build |
| 54 | + shell: bash |
| 55 | + run: | |
| 56 | + CC=${{ matrix.cc }} CXX=${{ matrix.cxx }} ARCH= ci/ci-setup compile |
| 57 | + CC=${{ matrix.cc }} CXX=${{ matrix.cxx }} ARCH= ci/ci-install compile |
| 58 | + CC=${{ matrix.cc }} CXX=${{ matrix.cxx }} ARCH= ci/ci-build compile |
| 59 | +
|
| 60 | +
|
| 61 | + # ######################################################################### |
| 62 | + # #### Multi-Architecture Builds #### |
| 63 | + # ######################################################################### |
| 64 | + Architectures: |
| 65 | + # ###### Build matrix ################################################### |
| 66 | + strategy: |
| 67 | + matrix: |
| 68 | + include: |
| 69 | + # ====== Fedora Linux ============================================= |
| 70 | + - label: "Fedora 43 with Clang/PPC64" |
| 71 | + arch: ppc64le |
| 72 | + distro: fedora43 |
| 73 | + cc: clang |
| 74 | + cxx: clang++ |
| 75 | + # ====== Fedora Linux ============================================= |
| 76 | + - label: "Fedora 43 with Clang/ARMv8" |
| 77 | + arch: aarch64 |
| 78 | + distro: fedora43 |
| 79 | + cc: clang |
| 80 | + cxx: clang++ |
| 81 | + |
| 82 | + # ###### Build commands ################################################# |
| 83 | + name: ${{ matrix.label }} |
| 84 | + runs-on: ubuntu-latest |
| 85 | + steps: |
| 86 | + - uses: actions/checkout@v6 |
| 87 | + # NOTE: dreibh/run-on-arch-action provides the upstream |
| 88 | + # uraimo/run-on-arch-action action, with additional dockerfiles |
| 89 | + # needed for the builds here! |
| 90 | + - uses: dreibh/run-on-arch-action@dreibh/tests |
| 91 | + name: Build |
| 92 | + id: build |
| 93 | + with: |
| 94 | + arch: ${{ matrix.arch }} |
| 95 | + distro: ${{ matrix.distro }} |
| 96 | + run: | |
| 97 | + CC=${{ matrix.cc }} CXX=${{ matrix.cxx }} ci/ci-setup compile |
| 98 | + CC=${{ matrix.cc }} CXX=${{ matrix.cxx }} ci/ci-install compile |
| 99 | + CC=${{ matrix.cc }} CXX=${{ matrix.cxx }} ci/ci-build compile |
| 100 | +
|
| 101 | +
|
| 102 | + # ######################################################################### |
| 103 | + # #### Build Packages #### |
| 104 | + # ######################################################################### |
| 105 | + Package: |
| 106 | + name: Fedora Packaging |
| 107 | + runs-on: ubuntu-latest |
| 108 | + container: |
| 109 | + # The GitHub runner issue with Mock seems to be fixed now: |
| 110 | + # => https://github.com/rpm-software-management/mock/issues/1487 |
| 111 | + image: fedora:43 |
| 112 | + options: --privileged --cap-add=SYS_ADMIN |
| 113 | + steps: |
| 114 | + - uses: actions/checkout@v6 |
| 115 | + - name: Packaging |
| 116 | + shell: bash |
| 117 | + run: | |
| 118 | + CC=clang CXX=clang++ ARCH= ci/ci-setup package |
| 119 | + CC=clang CXX=clang++ ARCH= ci/ci-install package |
| 120 | + CC=clang CXX=clang++ ARCH= ci/ci-build package |
| 121 | + ci/ci-test |
0 commit comments