Ubuntu #2167
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: Ubuntu | |
on: | |
schedule: | |
- cron: '5 5 * * *' | |
push: | |
branches: [ release, develop ] | |
pull_request: | |
push: | |
branches-ignore: develop | |
pull_request: | |
branches-ignore: develop | |
jobs: | |
CI_Tests: | |
permissions: | |
actions: none | |
checks: none | |
contents: none | |
deployments: none | |
issues: none | |
packages: none | |
pull-requests: none | |
repository-projects: none | |
security-events: none | |
statuses: none | |
strategy: | |
fail-fast: false | |
matrix: | |
cpp_version: [ 17, 20 ] | |
build_type: [ Debug, Release ] | |
except_type: [ exceptions_on, exceptions_off ] | |
os: [ ubuntu-20.04, ubuntu-22.04 ] | |
toolset: [ g++-9, g++-10, g++-11, g++-12, clang++-8, clang++-9, clang++-10, clang++-11, clang++-12, clang++-13, clang++-14, clang++-15, clang++-16, clang++-17 ] | |
exclude: | |
- toolset: clang++-8 | |
cpp_version: 20 | |
- toolset: clang++-9 | |
cpp_version: 17 | |
build_type: Debug | |
- toolset: clang++-9 | |
cpp_version: 20 | |
- toolset: clang++-10 | |
cpp_version: 20 | |
- toolset: clang++-11 | |
cpp_version: 20 | |
- toolset: clang++-12 | |
cpp_version: 20 | |
- toolset: clang++-13 | |
cpp_version: 20 | |
- toolset: clang++-14 | |
cpp_version: 20 | |
- toolset: g++-9 | |
cpp_version: 20 | |
- os: ubuntu-20.04 | |
toolset: g++-12 | |
- os: ubuntu-20.04 | |
toolset: clang++-9 | |
- os: ubuntu-20.04 | |
toolset: clang++-10 | |
- os: ubuntu-20.04 | |
toolset: clang++-11 | |
- os: ubuntu-20.04 | |
toolset: clang++-12 | |
- os: ubuntu-20.04 | |
toolset: clang++-13 | |
- os: ubuntu-20.04 | |
toolset: clang++-14 | |
- os: ubuntu-20.04 | |
toolset: clang++-15 | |
- os: ubuntu-20.04 | |
toolset: clang++-16 | |
- os: ubuntu-20.04 | |
toolset: clang++-17 | |
- os: ubuntu-22.04 | |
toolset: g++-9 | |
- os: ubuntu-22.04 | |
toolset: g++-10 | |
- os: ubuntu-22.04 | |
toolset: g++-11 | |
- os: ubuntu-22.04 | |
toolset: clang++-8 | |
- os: ubuntu-22.04 | |
toolset: clang++-9 | |
- os: ubuntu-22.04 | |
toolset: clang++-10 | |
- os: ubuntu-22.04 | |
toolset: clang++-11 | |
runs-on: ${{ matrix.os }} | |
name: "${{ matrix.os }} ${{ matrix.toolset }} ${{ matrix.cpp_version }} ${{ matrix.build_type }} ${{ matrix.except_type}}" | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Setup APT and Base Dependencies(20.04) | |
if: endsWith( matrix.os, '20.04' ) | |
run: | | |
sudo wget -O /etc/apt/trusted.gpg.d/llvm.asc https://apt.llvm.org/llvm-snapshot.gpg.key | |
sudo apt-add-repository 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal main' | |
sudo apt-add-repository 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-13 main' | |
sudo apt-add-repository 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-14 main' | |
sudo apt-add-repository 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-15 main' | |
sudo apt-add-repository 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-16 main' | |
sudo apt-add-repository 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-17 main' | |
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test | |
sudo apt update | |
sudo apt install ninja-build libunwind-dev | |
- name: Setup APT and Base Dependencies(20.04) | |
if: endsWith( matrix.os, '22.04' ) | |
run: | | |
sudo wget -O /etc/apt/trusted.gpg.d/llvm.asc https://apt.llvm.org/llvm-snapshot.gpg.key | |
sudo apt-add-repository 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy main' | |
sudo apt-add-repository 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-13 main' | |
sudo apt-add-repository 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-14 main' | |
sudo apt-add-repository 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-15 main' | |
sudo apt-add-repository 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-16 main' | |
sudo apt-add-repository 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-17 main' | |
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test | |
sudo apt update | |
sudo apt install ninja-build libunwind-dev | |
- name: Get Clang Version | |
if: startsWith( matrix.toolset, 'clang' ) | |
run: | | |
echo "DAW_CLANG_VER=$(echo ${{matrix.toolset}} | cut -d- -f2)" >> $GITHUB_ENV | |
- name: Get Clang Environment | |
if: startsWith( matrix.toolset, 'clang' ) | |
run: | | |
echo "CC=$(echo clang-${{ env.DAW_CLANG_VER }})" >> $GITHUB_ENV | |
echo "CXX=$(echo clang++-${{ env.DAW_CLANG_VER }})" >> $GITHUB_ENV | |
#echo "CXXFLAGS=${CXXFLASGS} -stdlib=libc++" >> $GITHUB_ENV | |
echo "UBSAN_OPTIONS='halt_on_errors=1'" >> $GITHUB_ENV | |
- name: Install Clang Environment | |
if: startsWith( matrix.toolset, 'clang' ) | |
run: | | |
sudo apt-get install --ignore-missing \ | |
${{ env.CC }} | |
- name: Get GCC version | |
if: startsWith( matrix.toolset, 'g++' ) | |
run: | | |
echo "DAW_GCC_VER=$(echo ${{matrix.toolset}} | cut -d- -f2)" >> $GITHUB_ENV | |
- name: Set GCC Environment | |
if: startsWith( matrix.toolset, 'g++' ) | |
run: | | |
echo "CC=$(echo gcc-${{ env.DAW_GCC_VER }})" >> $GITHUB_ENV | |
echo "CXX=$(echo g++-${{ env.DAW_GCC_VER }})" >> $GITHUB_ENV | |
- name: Install GCC Environment | |
if: startsWith( matrix.toolset, 'g++' ) | |
run: | | |
sudo apt install ${{ env.CC }} ${{ env.CXX }} | |
- name: Create Build | |
run: | | |
mkdir build | |
- name: Build Dependencies | |
if: endsWith( matrix.except_type, '_on' ) | |
run: cmake -GNinja -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DDAW_NUM_RUNS=1 -DDAW_ENABLE_TESTING=ON -DDAW_NO_FLATTEN=ON -DCMAKE_CXX_STANDARD=${{ matrix.cpp_version }} -Bbuild/ . | |
- name: Build Dependencies No Exceptions | |
if: endsWith( matrix.except_type, '_off' ) | |
run: cmake -GNinja -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DDAW_NUM_RUNS=1 -DDAW_ENABLE_TESTING=ON -DDAW_NO_FLATTEN=ON -DCMAKE_CXX_STANDARD=${{ matrix.cpp_version }} -DDAW_USE_EXCEPTIONS=OFF -Bbuild/ . | |
- name: Build | |
run: cmake --build build/ --target ci_tests -- -k 0 | |
continue-on-error: true | |
- name: Test | |
run: | | |
sudo service apport stop | |
ulimit -c unlimited | |
ulimit -c | |
sudo sysctl -w kernel.core_pattern=core.%e.%p | |
ctest -C ${{ matrix.build_type }} -j2 -VV --timeout 1200 --test-dir build/ | |
# - name: Fuzzing | |
# if: matrix.toolset == 'clang++-13' | |
# run: | | |
# echo "CXXFLAGS='-stdlib=libstdc++'" >> $GITHUB_ENV | |
# ulimit -c unlimited | |
# cmake --build build/ --target daw_json_fuzzing | |
# ./build/tests/daw_json_fuzzing -max_len=4000 -max_total_time=120 | |
- name: Archive any crashes as an artifact | |
uses: actions/upload-artifact@v4 | |
if: always( ) | |
with: | |
name: crashes | |
path: | | |
crash-* | |
leak-* | |
timeout-* | |
build/core* | |
core* | |
/var/lib/systemd/coredump/* | |
/var/crash/* | |
!/var/crash/_usr_bin_do-release* | |
!/var/crash/_usr_lib_* | |
if-no-files-found: ignore |