Skip to content

Commit

Permalink
test with g++11
Browse files Browse the repository at this point in the history
  • Loading branch information
LiangliangNan committed Dec 2, 2024
1 parent 335e308 commit d085452
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/test-build-gcc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,16 @@ jobs:
- name: Install GCC version ${{ matrix.compiler }}
run: |
sudo apt-get install -y ${MATRIX_COMPILER_VERSION}
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/${{ matrix.compiler }} 100
g++ --version
sudo apt-get install -y ${MATRIX_COMPILER_PACKAGE}
if ! command -v ${{ matrix.compiler }}; then
echo "Error: ${{ matrix.compiler }} not installed"; exit 1;
fi
env:
MATRIX_COMPILER_PACKAGE: |
$(if [[ "${{ matrix.compiler }}" == "g++-11" ]]; then echo "gcc-11 g++-11"; else echo "${{ matrix.compiler }}"; fi)
- name: Configure and build with CMake
run: |
mkdir -p build && cd build
cmake -DCMAKE_CXX_COMPILER=$(which g++) -DCMAKE_BUILD_TYPE=Release ..
cmake -DCMAKE_CXX_COMPILER=${{ matrix.compiler }} -DCMAKE_BUILD_TYPE=Release ..
make

0 comments on commit d085452

Please sign in to comment.