Skip to content

More appropriate catch blocks #126

More appropriate catch blocks

More appropriate catch blocks #126

Workflow file for this run

name: C/C++ CI
on: [push]
jobs:
ci:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
env:
CMAKE_GENERATOR: Unix Makefiles
#ASAN_OPTIONS: strict_string_checks=true:detect_odr_violation=2:detect_stack_use_after_return=true:check_initialization_order=true:strict_init_order=true
#TSAN_OPTIONS: force_seq_cst_atomics=1
#CTEST_OUTPUT_ON_FAILURE: ON
#CTEST_PARALLEL_LEVEL: 2
strategy:
fail-fast: false
matrix:
# Github Actions requires a single row to be added to the build matrix.
# See https://help.github.com/en/articles/workflow-syntax-for-github-actions.
name: [
# ubuntu-18.04-gcc-4.8, # uncomplete support of C++14
# ubuntu-18.04-gcc-4.9,
# ubuntu-18.04-gcc-5,
# ubuntu-18.04-gcc-6,
#ubuntu-18.04-gcc-7,
#ubuntu-18.04-gcc-8,
#ubuntu-18.04-gcc-9,
# ubuntu-20.04-gcc-10,
# ubuntu-20.04-gcc-11,
ubuntu-22.04-gcc-11,
ubuntu-22.04-gcc-12,
ubuntu-24.04-gcc-13,
ubuntu-24.04-gcc-14,
#ubuntu-22.04-gcc-12, # no PUBkey
# CLang do not allow passing elements of SIMD vectors as non-const references, need to
# wait until we implement SIMD operations via appropriate library.
#ubuntu-18.04-clang-3.5,
#ubuntu-18.04-clang-3.6,
#ubuntu-18.04-clang-3.7,
#ubuntu-18.04-clang-3.8,
##ubuntu-18.04-clang-3.9,
#ubuntu-18.04-clang-4.0,
#ubuntu-18.04-clang-5.0,
#ubuntu-18.04-clang-6.0,
#ubuntu-18.04-clang-7,
#ubuntu-18.04-clang-8,
#ubuntu-18.04-clang-9,
ubuntu-22.04-clang-12,
ubuntu-22.04-clang-14,
ubuntu-24.04-clang-16,
ubuntu-24.04-clang-18,
#ubuntu-18.04-clang-9, # no PUB key
#windows-2016-cl,
#windows-2016-clang-cl,
#windows-2016-clang,
#windows-2016-gcc,
#windows-2019-cl,
#windows-2019-clang-cl,
#windows-2019-clang,
#windows-2019-gcc,
#macOS-latest-xcode-11.0,
#macOS-latest-xcode-11.3,
]
include:
#- name: ubuntu-18.04-gcc-4.8
#os: ubuntu-18.04
#compiler: gcc
#version: "4.8"
#- name: ubuntu-18.04-gcc-4.9
#os: ubuntu-18.04
#compiler: gcc
#version: "4.9"
#- name: ubuntu-18.04-gcc-5
#os: ubuntu-18.04
#compiler: gcc
#version: "5"
#- name: ubuntu-18.04-gcc-6
#os: ubuntu-18.04
#compiler: gcc
#version: "6"
# - name: ubuntu-18.04-gcc-7
# os: ubuntu-18.04
# compiler: gcc
# version: "7"
#
# - name: ubuntu-18.04-gcc-8
# os: ubuntu-18.04
# compiler: gcc
# version: "8"
#
# - name: ubuntu-18.04-gcc-9
# os: ubuntu-18.04
# compiler: gcc
# version: "9"
#
# - name: ubuntu-20.04-gcc-10
# os: ubuntu-20.04
# compiler: gcc
# version: "10"
#
# - name: ubuntu-20.04-gcc-11
# os: ubuntu-20.04
# compiler: gcc
# version: "11"
- name: ubuntu-22.04-gcc-11
os: ubuntu-22.04
compiler: gcc
version: "11"
- name: ubuntu-22.04-gcc-12
os: ubuntu-22.04
compiler: gcc
version: "12"
- name: ubuntu-24.04-gcc-13
os: ubuntu-24.04
compiler: gcc
version: "13"
- name: ubuntu-24.04-gcc-14
os: ubuntu-24.04
compiler: gcc
version: "14"
#- name: ubuntu-18.04-clang-3.5
#os: ubuntu-18.04
#compiler: clang
#version: "3.5"
#- name: ubuntu-18.04-clang-3.6
#os: ubuntu-18.04
#compiler: clang
#version: "3.6"
#- name: ubuntu-18.04-clang-3.7
#os: ubuntu-18.04
#compiler: clang
#version: "3.7"
#- name: ubuntu-18.04-clang-3.8
#os: ubuntu-18.04
#compiler: clang
#version: "3.8"
#- name: ubuntu-18.04-clang-3.9
#os: ubuntu-18.04
#compiler: clang
#version: "3.9"
#- name: ubuntu-18.04-clang-4.0
#os: ubuntu-18.04
#compiler: clang
#version: "4.0"
# - name: ubuntu-18.04-clang-5.0
# os: ubuntu-18.04
# compiler: clang
# version: "5.0"
#
# - name: ubuntu-18.04-clang-6.0
# os: ubuntu-18.04
# compiler: clang
# version: "6.0"
#
# - name: ubuntu-18.04-clang-7
# os: ubuntu-18.04
# compiler: clang
# version: "7"
#
# - name: ubuntu-18.04-clang-8
# os: ubuntu-18.04
# compiler: clang
# version: "8"
#- name: ubuntu-18.04-clang-9
#os: ubuntu-18.04
#compiler: clang
#version: "9"
- name: ubuntu-22.04-clang-12
os: ubuntu-22.04
compiler: clang
version: "12"
- name: ubuntu-22.04-clang-14
os: ubuntu-22.04
compiler: clang
version: "14"
- name: ubuntu-24.04-clang-16
os: ubuntu-24.04
compiler: clang
version: "16"
- name: ubuntu-24.04-clang-18
os: ubuntu-24.04
compiler: clang
version: "18"
steps:
- uses: actions/checkout@v4
- name: Install (Linux)
if: runner.os == 'Linux'
run: |
# CMake 3.15 allows specifying the generator using the CMAKE_GENERATOR
# environment variable.
#curl -sSL https://github.com/Kitware/CMake/releases/download/v3.15.4/cmake-3.15.4-Linux-x86_64.tar.gz -o cmake.tar.gz
#sudo tar xf cmake.tar.gz --strip 1 -C /usr/local
# Required for libc6-dbg:i386 and g++-multilib packages which are
# needed for x86 builds.
sudo dpkg --add-architecture i386
# clang-3.7 and earlier are not available in Bionic anymore so we get
# them from the Xenial repositories instead.
#sudo add-apt-repository "deb http://dk.archive.ubuntu.com/ubuntu/ xenial main"
#sudo add-apt-repository "deb http://dk.archive.ubuntu.com/ubuntu/ xenial universe"
if [ "${{ matrix.compiler }}" = "clang" ]; then
sudo add-apt-repository "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy main"
sudo add-apt-repository "deb http://apt.llvm.org/noble/ llvm-toolchain-noble main"
fi
# libc6-dbg:i386 is required for running valgrind on x86.
#sudo apt-get install -y ninja-build valgrind libc6-dbg:i386
if [ "${{ matrix.compiler }}" = "gcc" ]; then
sudo apt-get update
sudo apt-get install -y g++-${{ matrix.version }} g++-${{ matrix.version }}-multilib
echo "CC=gcc-${{ matrix.version }}" >> $GITHUB_ENV
echo "CXX=g++-${{ matrix.version }}" >> $GITHUB_ENV
gcc-${{ matrix.version }} --version
g++-${{ matrix.version }} --version
else
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -
sudo apt-get update
sudo apt-get install -y clang-${{ matrix.version }} g++-multilib
echo "CC=clang-${{ matrix.version }}" >> $GITHUB_ENV
echo "CXX=clang++-${{ matrix.version }}" >> $GITHUB_ENV
clang-${{ matrix.version }} --version
clang++-${{ matrix.version }} --version
fi
# Bparser dependency
sudo apt-get install -y libboost-all-dev
# install eigen
sudo apt install libeigen3-dev
- name: Build dir
run: mkdir build
- name: make cmake_dbg
run: make cmake_dbg
- uses: actions/upload-artifact@v4
if: failure()
with:
name: CMakeOutput_dbg.log
path: build/CMakeFiles/CMakeOutput.log
- name: make test_grammar_dbg
run: cd build && make VERBOSE=1 test_grammar
- name: make test_array_dbg
run: make test_array
#- name: make test_processor_dbg
#run: make test_processor
- name: make test_parser_dbg
run: make test_parser
#- name: make test_speed_dbg
#run: make test_speed
- name: make clean
run: make clean
- name: make cmake_rel
run: make cmake_rel
- uses: actions/upload-artifact@v4
if: failure()
with:
name: CMakeOutput_rel.log
path: build/CMakeFiles/CMakeOutput.log
- name: make test_grammar_rel
run: make test_grammar
- name: make test_array_rel
run: make test_array
#- name: make test_processor_rel
#run: make test_processor
- name: make test_parser_rel
run: make test_parser
- name: make test_speed_rel
run: make test_speed