mirror of
https://github.com/ashaduri/gsmartcontrol.git
synced 2026-11-24 14:56:40 +00:00
CI: Build Linux on Ubuntu 22.04, 24.04 and 26.04 via a matrix
Replace the separate Ubuntu jobs with a single matrix job: 22.04 (GCC 11), 24.04 (GCC 14) and 26.04 (GCC 15). Upload packages from every matrix entry under a per-version artifact name. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
2bbd6a60f6
commit
b4d774bb1f
1 file changed
+14
-54
@@ -17,8 +17,17 @@ env:
|
||||
|
||||
jobs:
|
||||
|
||||
linux-ubuntu-24_04:
|
||||
runs-on: ubuntu-latest
|
||||
linux-ubuntu:
|
||||
name: linux-ubuntu-${{ matrix.os }} (gcc-${{ matrix.gcc }})
|
||||
runs-on: ubuntu-${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include: [
|
||||
{ os: "22.04", gcc: 11 },
|
||||
{ os: "24.04", gcc: 14 },
|
||||
{ os: "26.04", gcc: 15 },
|
||||
]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v7
|
||||
@@ -36,8 +45,8 @@ jobs:
|
||||
shell: bash
|
||||
working-directory: ${{github.workspace}}/build
|
||||
env:
|
||||
CC: gcc-14
|
||||
CXX: g++-14
|
||||
CC: gcc-${{ matrix.gcc }}
|
||||
CXX: g++-${{ matrix.gcc }}
|
||||
run: >
|
||||
cmake $GITHUB_WORKSPACE
|
||||
-DCMAKE_BUILD_TYPE=$BUILD_TYPE
|
||||
@@ -61,59 +70,10 @@ jobs:
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: Linux Packages
|
||||
name: Linux Packages (Ubuntu ${{ matrix.os }})
|
||||
path: ${{github.workspace}}/build/gsmartcontrol-*-Linux*.*
|
||||
|
||||
|
||||
linux-ubuntu-22_04:
|
||||
# GCC 11
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v7
|
||||
|
||||
- name: Update Package Database
|
||||
run: sudo apt-get update
|
||||
|
||||
- name: Install Dependencies
|
||||
run: sudo apt-get install libgtkmm-3.0-dev gettext
|
||||
|
||||
- name: Create Build Directory
|
||||
run: cmake -E make_directory build
|
||||
|
||||
- name: Configure CMake
|
||||
shell: bash
|
||||
working-directory: ${{github.workspace}}/build
|
||||
env:
|
||||
CC: gcc-11
|
||||
CXX: g++-11
|
||||
run: >
|
||||
cmake $GITHUB_WORKSPACE
|
||||
-DCMAKE_BUILD_TYPE=$BUILD_TYPE
|
||||
-DCMAKE_TOOLCHAIN_FILE="$GITHUB_WORKSPACE/toolchains/linux-dev.cmake"
|
||||
|
||||
- name: Build
|
||||
shell: bash
|
||||
working-directory: ${{github.workspace}}/build
|
||||
run: cmake --build . --config $BUILD_TYPE
|
||||
|
||||
- name: Test
|
||||
working-directory: ${{github.workspace}}/build
|
||||
shell: bash
|
||||
run: ctest -C $BUILD_TYPE --rerun-failed --output-on-failure
|
||||
|
||||
- name: Pack (cmake install and make binary package)
|
||||
shell: bash
|
||||
working-directory: ${{github.workspace}}/build
|
||||
run: cpack -G TBZ2
|
||||
|
||||
# - name: Upload artifacts
|
||||
# uses: actions/upload-artifact@v7
|
||||
# with:
|
||||
# name: Linux Packages
|
||||
# path: ${{github.workspace}}/build/gsmartcontrol-*-Linux*.*
|
||||
|
||||
|
||||
windows-msys2:
|
||||
uses: ./.github/workflows/windows-msys2.yml
|
||||
with:
|
||||
|
||||
Reference in new issue
Block a user