Change nested parse logs level from 'info' to 'debug' (#146) #521
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: CI Linux | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
name: ${{ matrix.name }} ${{ matrix.build_type }} | |
# The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac. | |
# You can convert this to a matrix build if you need cross-platform coverage. | |
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix | |
runs-on: ${{ matrix.os }} | |
env: | |
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) | |
BUILD_TYPE: ${{ matrix.build_type }} | |
CTEST_OUTPUT_ON_FAILURE: ON | |
CLANG_DEFAULT: 13 | |
strategy: | |
fail-fast: false | |
matrix: | |
name: [ | |
ubuntu-latest-gcc-12, | |
ubuntu-20.04-clang-13, | |
ubuntu-22.04-clang-14, | |
ubuntu-22.04-clang-15, | |
mac-os-latest | |
] | |
build_type: [Debug, Release] | |
include: | |
- name: ubuntu-latest-gcc-12 | |
os: ubuntu-latest | |
compiler: gcc | |
version: "12" | |
- name: ubuntu-20.04-clang-13 | |
os: ubuntu-20.04 | |
compiler: clang | |
version: "13" | |
- name: ubuntu-22.04-clang-14 | |
os: ubuntu-22.04 | |
compiler: clang | |
version: "14" | |
- name: ubuntu-22.04-clang-15 | |
os: ubuntu-22.04 | |
compiler: clang | |
version: "15" | |
- name: mac-os-latest | |
os: macos-latest | |
CC: clang | |
CXX: clang++ | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: | | |
if [ "${{ runner.os }}" = "Linux" ]; then | |
# Workaround https://github.com/actions/runner-images/issues/8659 | |
echo "matrix.name=${{ matrix.name }}" | |
echo "matrix.os=${{ matrix.os }}" | |
wget -qO - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - | |
# Figure out which version of ubuntu is actually running | |
export $(cat /etc/os-release | grep UBUNTU_CODENAME) | |
# If clang is being used to compile, use the specified version, otherwise, use the default version | |
export CLANG_VERSION=$([ "${{ matrix.compiler }}" = "clang" ] && echo "${{ matrix.version }}" || echo $CLANG_DEFAULT ) | |
sudo add-apt-repository --yes --update \ | |
"deb http://apt.llvm.org/$UBUNTU_CODENAME/ llvm-toolchain-$UBUNTU_CODENAME-$CLANG_VERSION main" | |
sudo add-apt-repository --yes --update ppa:ubuntu-toolchain-r/test | |
sudo apt-get -y update | |
sudo apt-get install -y build-essential ninja-build #g++ #python-is-python3 | |
if [ "${{ matrix.compiler }}" = "gcc" ]; then | |
sudo apt-get install -y gcc-${{ matrix.version }} g++-${{ matrix.version }} g++-${{ matrix.version }}-multilib | |
#sudo update-alternatives --remove-all gcc | |
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${{ matrix.version }} ${{ matrix.version }}0 \ | |
--slave /usr/bin/g++ g++ /usr/bin/g++-${{ matrix.version }} \ | |
--slave /usr/bin/gcov gcov /usr/bin/gcov-${{ matrix.version }} | |
gcc --version | |
g++ --version | |
echo "CC=gcc-${{ matrix.version }}" >> $GITHUB_ENV | |
echo "CXX=g++-${{ matrix.version }}" >> $GITHUB_ENV | |
else | |
sudo apt-get install -y clang-${{ matrix.version }} g++-multilib | |
echo "CC=clang-${{ matrix.version }}" >> $GITHUB_ENV | |
echo "CXX=clang++-${{ matrix.version }}" >> $GITHUB_ENV | |
fi | |
# Always install and link clang-tidy as they will be used during the build | |
sudo apt-get install -y clang-format-$CLANG_VERSION clang-tidy-$CLANG_VERSION | |
sudo ln -fs /usr/bin/clang-format-$CLANG_VERSION /usr/bin/clang-format | |
ls -alh `which clang-format` | |
clang-format --version | |
sudo ln -fs /usr/bin/clang-tidy-$CLANG_VERSION /usr/bin/clang-tidy | |
ls -alh `which clang-tidy` | |
clang-tidy --version | |
elif [ "${{ runner.os }}" = "macOS" ]; then | |
brew install ninja | |
clang --version | |
clang++ --version | |
echo "CC=clang" >> $GITHUB_ENV | |
echo "CXX=clang++" >> $GITHUB_ENV | |
fi | |
shell: bash | |
# This must happen before the "Configure CMake" step otherwise the python version used to compile | |
# will be different than the one installed here. | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
cache: 'pip' | |
- run: pip install -r requirements.txt | |
- name: Configure CMake | |
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. | |
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type | |
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCFG_EXAMPLES=ON -DCFG_PYTHON_BINDINGS=ON -G Ninja | |
- name: Build | |
# Build your program with the given configuration | |
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} | |
- name: Test | |
working-directory: ${{github.workspace}}/build | |
# Execute tests defined by the CMake configuration. | |
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail | |
run: | | |
export TEST_DIR=env | |
ctest -C ${{env.BUILD_TYPE}} | |
${{github.workspace}}/build/src/include_file_test | |
for i in `seq 1 15`; do | |
${{github.workspace}}/build/src/config_build ${{github.workspace}}/examples/config_example$i.cfg | |
done | |
- name: Run python tests | |
run: | | |
pushd ${{github.workspace}}/build/python | |
EXAMPLES_DIR=${{github.workspace}}/examples python3 -m pytest ${{github.workspace}}/python | |
popd |