implement flex_array #95
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and run Tests | |
on: [ push ] | |
concurrency: | |
group: build-and-run-tests-${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build-and-run-tests: | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
- os: ubuntu-22.04 | |
compiler: clang-14 | |
- os: ubuntu-22.04 | |
compiler: clang-15 | |
- os: ubuntu-22.04 | |
compiler: clang-16 | |
- os: ubuntu-22.04 | |
compiler: gcc-12 | |
- os: ubuntu-22.04 | |
compiler: gcc-13 | |
runs-on: ${{ matrix.config.os }} | |
name: ${{ matrix.config.os }} (${{ matrix.config.compiler }}) | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- name: Add repos for for gcc-13 and clang-16 | |
run: | | |
# gcc-13 | |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y | |
# clang-16 | |
source /etc/os-release | |
echo "deb http://apt.llvm.org/${UBUNTU_CODENAME}/ llvm-toolchain-${UBUNTU_CODENAME}-16 main" | sudo tee /etc/apt/sources.list.d/llvm-16.list | |
curl https://apt.llvm.org/llvm-snapshot.gpg.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/llvm-16.gpg > /dev/null | |
sudo apt-get update -y | |
- name: Install CMake | |
uses: lukka/[email protected] | |
with: | |
cmakeVersion: 3.16.9 | |
- name: Install compiler | |
id: install_cc | |
uses: rlalik/[email protected] | |
with: | |
compiler: ${{ matrix.config.compiler }} | |
- name: Install linker | |
uses: rui314/setup-mold@v1 | |
- uses: actions/checkout@v3 | |
- name: install conan | |
shell: bash | |
env: | |
CC: ${{ steps.install_cc.outputs.cc }} | |
CXX: ${{ steps.install_cc.outputs.cxx }} | |
run: | | |
pip3 install "conan==1.60.1" | |
conan profile new --detect default | |
conan profile update settings.compiler.libcxx=libstdc++11 default | |
conan profile update env.CXXFLAGS="${CXXFLAGS}" default | |
conan profile update env.CMAKE_EXE_LINKER_FLAGS="${CMAKE_EXE_LINKER_FLAGS}" default | |
conan profile update env.CXX="${CXX}" default | |
conan profile update env.CC="${CC}" default | |
- name: Cache conan data | |
id: cache-conan | |
uses: actions/cache@v3 | |
with: | |
path: ~/.conan/data | |
key: tests-${{ matrix.config.os }}-${{ matrix.config.compiler }}-conan | |
- name: Configure CMake | |
run: cmake -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTING=On -DBUILD_EXAMPLES=On -DUSE_CONAN=On -G Ninja -B build . | |
env: | |
CC: ${{ steps.install_cc.outputs.cc }} | |
CXX: ${{ steps.install_cc.outputs.cxx }} | |
CXXFLAGS: -fsanitize=undefined -fsanitize=address -fno-omit-frame-pointer -fno-optimize-sibling-calls | |
- name: Build tests and examples | |
working-directory: build | |
run: cmake --build . --parallel 2 | |
- name: Run tests | |
working-directory: build | |
run: ctest --verbose --parallel 2 | |
- name: Run examples | |
working-directory: build | |
run: | | |
for example in examples/examples_*; do | |
echo "executing ${example}" | |
./${example} | |
done |