Skip to content

Commit

Permalink
Merge pull request #62 from bemanproject/compiler_test
Browse files Browse the repository at this point in the history
Add Compiler test
  • Loading branch information
wusatosi authored Feb 3, 2025
2 parents 501804e + ddaca35 commit 7355351
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 1 deletion.
54 changes: 54 additions & 0 deletions .github/workflows/ci_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,60 @@ jobs:
- name: Test Debug
run: ctest --test-dir build --build-config Debug

compiler-test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
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
container:
image: ghcr.io/wusatosi/cpp-docker:${{ matrix.compilers.class }}-${{ matrix.compilers.version }}
name: "Compiler: ${{ matrix.compilers.class }} ${{ matrix.compilers.version }}"
steps:
- uses: actions/checkout@v4
- name: Install Compiler
id: install-compiler
run: |
if [ "${{ matrix.compilers.class }}" = "gnu" ]; then
CC=gcc-${{ matrix.compilers.version }}
CXX=g++-${{ matrix.compilers.version }}
else
CC=clang-${{ matrix.compilers.version }}
CXX=clang++-${{ matrix.compilers.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 /tmp/beman.exemplar
find /tmp/beman.exemplar -type f
- name: Test Debug
run: ctest --test-dir build --build-config Debug

create-issue-when-fault:
runs-on: ubuntu-latest
needs: [test]
Expand Down
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,17 @@ template <int Capacity> inplace_vector<int, Capacity> fibonacci_to(int num) {
Building this repository requires **C++20** or later.
We will evaluate the possibility of partial support for C++17
when constexpr is fully supported and tested.
### Dependencies
TODO: tested platforms.
Current implementation is tested against both GNU gcc and LLVM clang compilers.
More specifically, gcc version 12 to 14, and clang version 17 to 20.
Versions outside of this range will likely work as well,
they are just not tested in our current infrastructure.
We are working on expanding this range of compiler support,
and aim to bring `inplace_vector` to MSVC soon!
### Instructions
Expand Down

0 comments on commit 7355351

Please sign in to comment.