Skip to content

Commit

Permalink
Merge pull request #84 from wusatosi/compiler_test
Browse files Browse the repository at this point in the history
Compiler test
  • Loading branch information
wusatosi authored Dec 13, 2024
2 parents 589d0f8 + c74a62e commit bce8e81
Showing 1 changed file with 73 additions and 1 deletion.
74 changes: 73 additions & 1 deletion .github/workflows/ci_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,81 @@ jobs:
cmake --install build --config Debug --prefix /opt/beman.exemplar
ls -R /opt/beman.exemplar
compiler-test:
runs-on: ubuntu-24.04
strategy:
matrix:
compilers:
- class: GNU
version: 14
- class: GNU
version: 13
- class: GNU
version: 12
- class: LLVM
version: 20
- class: LLVM
version: 19
- class: LLVM
version: 18
- class: LLVM
version: 17
name: "Compiler: ${{ matrix.compilers.class }} ${{ matrix.compilers.version }}"
steps:
- uses: actions/checkout@v4
- name: Setup build environment
uses: lukka/get-cmake@latest
with:
cmakeVersion: "~3.25.0"
ninjaVersion: "^1.11.1"
- name: Install Compiler
id: install-compiler
run: |
if [ "${{ matrix.compilers.class }}" = "GNU" ]; then
CC=gcc-${{ matrix.compilers.version }}
CXX=g++-${{ matrix.compilers.version }}
sudo add-apt-repository universe
sudo apt-get update
sudo apt-get install -y $CC
sudo apt-get install -y $CXX
$CC --version
$CXX --version
else
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo bash llvm.sh ${{ matrix.compilers.version }}
CC=clang-${{ matrix.compilers.version }}
CXX=clang++-${{ matrix.compilers.version }}
$CC --version
$CXX --version
fi
echo "CC=$CC" >> "$GITHUB_OUTPUT"
echo "CXX=$CXX" >> "$GITHUB_OUTPUT"
- name: Configure CMake
run: |
cmake -B build -S . -DCMAKE_CXX_STANDARD=20
env:
CC: ${{ steps.install-compiler.outputs.CC }}
CXX: ${{ steps.install-compiler.outputs.CXX }}
CMAKE_GENERATOR: "Ninja Multi-Config"
- name: Build Debug
run: |
cmake --build build --config Debug --verbose
cmake --build build --config Debug --target all_verify_interface_header_sets
cmake --install build --config Debug --prefix /opt/beman.exemplar
find /opt/beman.exemplar -type f
- name: Test Debug
run: ctest --test-dir build --build-config Debug


create-issue-when-fault:
runs-on: ubuntu-latest
needs: [preset-test, gtest-test, configuration-test]
needs: [preset-test, gtest-test, configuration-test, compiler-test]
if: failure() && github.event_name == 'schedule'
steps:
# See https://github.com/cli/cli/issues/5075
Expand Down

0 comments on commit bce8e81

Please sign in to comment.