Skip to content

Commit

Permalink
Disable testing with Homebrew GCC on macOS
Browse files Browse the repository at this point in the history
The gcc-13 is just an alias to AppleClang, which is already tested.
  • Loading branch information
dr8co committed Apr 28, 2024
1 parent e00bf72 commit e3a6886
Showing 1 changed file with 40 additions and 40 deletions.
80 changes: 40 additions & 40 deletions .github/workflows/cmake-multi-platform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ jobs:
fail-fast: false

matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
build_type: [Debug, Release]
c_compiler: [gcc-13, clang, cl]
os: [ ubuntu-latest, windows-latest, macos-latest ]
build_type: [ Debug, Release ]
c_compiler: [ gcc-13, clang, cl ]
include:
- os: windows-latest
c_compiler: cl
Expand All @@ -30,9 +30,7 @@ jobs:
- os: macos-latest
c_compiler: clang
cpp_compiler: clang++
- os: macos-latest
c_compiler: gcc-13
cpp_compiler: g++-13

exclude:
- os: windows-latest
c_compiler: gcc-13
Expand All @@ -42,46 +40,48 @@ jobs:
c_compiler: cl
- os: macos-latest
c_compiler: cl
- os: macos-latest
c_compiler: gcc-13

steps:
- name: Install Ninja
# Install Ninja, a build system that can be used as an alternative to make.
# Ninja is faster and recommended for large projects.
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get install ninja-build -y
- name: Install Ninja
# Install Ninja, a build system that can be used as an alternative to make.
# Ninja is faster and recommended for large projects.
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get install ninja-build -y

- uses: actions/checkout@v4
- uses: actions/checkout@v4

- name: Set reusable strings
# Turn repeated input strings (such as the build output directory) into step outputs. These step outputs can be used throughout the workflow file.
id: strings
shell: bash
run: |
- name: Set reusable strings
# Turn repeated input strings (such as the build output directory) into step outputs. These step outputs can be used throughout the workflow file.
id: strings
shell: bash
run: |
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
- name: Set the generator
id: set-generator
shell: bash
run: |
if [[ "${{ runner.os }}" == "Windows" ]]; then
echo "generator='Visual Studio 17 2022'" >> "$GITHUB_OUTPUT"
elif [[ "${{ runner.os }}" == "macOS" ]]; then
echo "generator='Xcode'" >> "$GITHUB_OUTPUT"
else
echo "generator='Ninja'" >> "$GITHUB_OUTPUT"
fi
- name: Set the generator
id: set-generator
shell: bash
run: |
if [[ "${{ runner.os }}" == "Windows" ]]; then
echo "generator='Visual Studio 17 2022'" >> "$GITHUB_OUTPUT"
elif [[ "${{ runner.os }}" == "macOS" ]]; then
echo "generator=Xcode" >> "$GITHUB_OUTPUT"
else
echo "generator=Ninja" >> "$GITHUB_OUTPUT"
fi
- name: Configure CMake
run: >
cmake -B ${{ steps.strings.outputs.build-output-dir }}
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }}
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }}
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-S ${{ github.workspace }} -G ${{ steps.set-generator.outputs.generator }}
- name: Configure CMake
run: >
cmake -B ${{ steps.strings.outputs.build-output-dir }}
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }}
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }}
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-S ${{ github.workspace }} -G ${{ steps.set-generator.outputs.generator }}
- name: Build
run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }} -j 4
- name: Build
run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }} -j 4

- name: Test
working-directory: ${{ steps.strings.outputs.build-output-dir }}
run: ctest --build-config ${{ matrix.build_type }}
- name: Test
working-directory: ${{ steps.strings.outputs.build-output-dir }}
run: ctest --build-config ${{ matrix.build_type }}

0 comments on commit e3a6886

Please sign in to comment.