Skip to content

Commit

Permalink
Actions: Simplify matrix for Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
oblivioncth committed Jul 15, 2024
1 parent 37bea30 commit 95f5bf0
Showing 1 changed file with 13 additions and 33 deletions.
46 changes: 13 additions & 33 deletions .github/workflows/build-starpp-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,35 +18,15 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-20.04, ubuntu-22.04]
compiler: [clang]
lib_linkage: [shared, static]
include:
- os: ubuntu-20.04
compiler: clang
c_comp: clang-12
cxx_comp: clang++-12
qt_comp: clang12
- os: ubuntu-22.04
compiler: gcc
c_comp: gcc-12
cxx_comp: g++-12
qt_comp: clang14
lib_linkage: shared
- os: ubuntu-22.04
compiler: gcc
c_comp: gcc-12
cxx_comp: g++-12
qt_comp: clang14
lib_linkage: static
- os: ubuntu-22.04
compiler: clang
c_comp: clang-14
cxx_comp: clang++-14
qt_comp: clang14
- lib_linkage: shared
cmake_bsl: ON
- lib_linkage: static
cmake_bsl: OFF
compiler: [{c: gcc-12, cxx: g++-12, qt: clang14}, {c: clang-12, cxx: clang++-12, qt: clang12}, {c: clang-14, cxx: clang++-14, qt: clang14}]
linkage: [{type: shared, cmake_bsl: ON}, {type: static, cmake_bsl: OFF}]
exclude:
- os: ubuntu-20.04
compiler: {c: gcc-12, cxx: g++-12, qt: clang14}
- os: ubuntu-20.04
compiler: {c: clang-14, cxx: clang++-14, qt: clang14}
- os: ubuntu-22.04
compiler: {c: clang-12, cxx: clang++-12, qt: clang12}
runs-on: ${{ matrix.os }}
env:
cmake_gen: Ninja Multi-Config
Expand All @@ -62,8 +42,8 @@ jobs:
with:
version: 6.6.0
os: linux
compiler: ${{ matrix.qt_comp }}
linkage: ${{ matrix.lib_linkage }}
compiler: ${{ matrix.compiler.qt }}
linkage: ${{ matrix.linkage.type }}
path: ${{ env.qt_install_dir }}
credentials: ${{ secrets.qt_ffynnon_cred }}
- name: Update package index
Expand Down Expand Up @@ -94,7 +74,7 @@ jobs:
working-directory: ${{ env.starpp_src_dir }}
run: |
echo Configuring CMake...
"$qt_cmake" -G "$cmake_gen" -S "$starpp_src_dir" -B "$starpp_build_dir" -D CMAKE_CXX_COMPILER="${{ matrix.cxx_comp }}" -D CMAKE_C_COMPILER="${{ matrix.c_comp }}" -D BUILD_SHARED_LIBS="${{ matrix.cmake_bsl }}" -D STARPP_TESTS=ON -D STARPP_DOCS=ON
"$qt_cmake" -G "$cmake_gen" -S "$starpp_src_dir" -B "$starpp_build_dir" -D CMAKE_CXX_COMPILER="${{ matrix.compiler.cxx }}" -D CMAKE_C_COMPILER="${{ matrix.compiler.c }}" -D BUILD_SHARED_LIBS="${{ matrix.linkage.cmake_bsl }}" -D STARPP_TESTS=ON -D STARPP_DOCS=ON
echo Changing to build directory...
cd "$starpp_build_dir"
echo Building STARpp Release/Docs...
Expand All @@ -110,7 +90,7 @@ jobs:
id: get_artifact_name
run: |
cpack_name=$(find "${{ env.starpp_package_path }}" -type f -name "*.zip")
artifact_name="$(basename "$cpack_name" .zip) [${{ matrix.cxx_comp }}]"
artifact_name="$(basename "$cpack_name" .zip) [${{ matrix.compiler.cxx }}]"
echo "current_artifact_name=$artifact_name" >> $GITHUB_ENV
- name: Upload STARpp build artifact
uses: actions/upload-artifact@v4
Expand Down

0 comments on commit 95f5bf0

Please sign in to comment.