ubuntu build fix #930
Workflow file for this run
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
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
build: | ||
strategy: | ||
matrix: | ||
cxx_standard: [11, 14, 17] | ||
build_type: ["Release", "Debug"] | ||
configuration: [ | ||
{"UBUNTU_VERSION":"16.04", "TOOLCHAIN_VERSION":"4.9"}, | ||
{"UBUNTU_VERSION":"18.04", "TOOLCHAIN_VERSION":"4.8"}, | ||
{"UBUNTU_VERSION":"18.04", "TOOLCHAIN_VERSION":"5"}, | ||
{"UBUNTU_VERSION":"18.04", "TOOLCHAIN_VERSION":"6"}, | ||
{"UBUNTU_VERSION":"18.04", "TOOLCHAIN_VERSION":"7"}, | ||
{"UBUNTU_VERSION":"18.04", "TOOLCHAIN_VERSION":"8"}, | ||
{"UBUNTU_VERSION":"20.04", "TOOLCHAIN_VERSION":"7"}, | ||
{"UBUNTU_VERSION":"20.04", "TOOLCHAIN_VERSION":"8"}, | ||
{"UBUNTU_VERSION":"20.04", "TOOLCHAIN_VERSION":"9"}, | ||
{"UBUNTU_VERSION":"20.04", "TOOLCHAIN_VERSION":"10"}, | ||
{"UBUNTU_VERSION":"22.04", "TOOLCHAIN_VERSION":"9"}, | ||
{"UBUNTU_VERSION":"22.04", "TOOLCHAIN_VERSION":"10"}, | ||
{"UBUNTU_VERSION":"22.04", "TOOLCHAIN_VERSION":"11"}, | ||
{"UBUNTU_VERSION":"22.04", "TOOLCHAIN_VERSION":"12"} | ||
] | ||
exclude: | ||
- cxx_standard: 17 | ||
configuration: {"UBUNTU_VERSION":"18.04", "TOOLCHAIN_VERSION":"4.8"} | ||
- cxx_standard: 17 | ||
configuration: {"UBUNTU_VERSION":"16.04", "TOOLCHAIN_VERSION":"4.9"} | ||
runs-on: ubuntu-latest | ||
container: | ||
image: ubuntu:${{matrix.configuration.UBUNTU_VERSION}} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install system dependencies | ||
env: | ||
DEBIAN_FRONTEND: noninteractive | ||
run: | | ||
apt update && apt-get install -y \ | ||
software-properties-common ca-certificates \ | ||
ninja-build make \ | ||
zlib1g-dev wget curl | ||
- name: Setup PIP Ubuntu 16.04 | ||
if: {{ matrix.configuration.UBUNTU_VERSION == '16.04'}} | ||
Check failure on line 55 in .github/workflows/ubuntu_gcc.yaml GitHub Actions / .github/workflows/ubuntu_gcc.yamlInvalid workflow file
|
||
run: | | ||
curl -O https://bootstrap.pypa.io/pip/3.5/get-pip.py | ||
python3 get-pip.py | ||
python3 -m pip install --upgrade "pip < 19.2" | ||
python3 -m pip install --no-cache-dir conan==1.59 cmake | ||
- name: Setup PIP | ||
if: {{ matrix.configuration.UBUNTU_VERSION != '16.04'}} | ||
run: | | ||
python3 -m pip install --upgrade pip | ||
python3 -m pip install --no-cache-dir conan==1.59 cmake | ||
- name: Setup Compilator | ||
run: | | ||
add-apt-repository ppa:ubuntu-toolchain-r/test | ||
bash ./docker/gcc/pyinstall.sh $(cat /etc/os-release | grep -a UBUNTU_CODENAME | sed -e 's/UBUNTU_CODENAME=//g') | ||
- name: Install compiler | ||
run: | | ||
apt update && apt-get install -y gcc-${{matrix.configuration.TOOLCHAIN_VERSION}} g++-${{matrix.configuration.TOOLCHAIN_VERSION}} | ||
update-alternatives \ | ||
--install /usr/bin/gcc gcc /usr/bin/gcc-${{matrix.configuration.TOOLCHAIN_VERSION}} 90 \ | ||
--slave /usr/bin/g++ g++ /usr/bin/g++-${{matrix.configuration.TOOLCHAIN_VERSION}} \ | ||
--slave /usr/bin/gcov gcov /usr/bin/gcov-${{matrix.configuration.TOOLCHAIN_VERSION}} | ||
update-alternatives --config gcc | ||
- name: Configure CMake | ||
env: | ||
CC: gcc-${{matrix.configuration.TOOLCHAIN_VERSION}} | ||
CXX: g++-${{matrix.configuration.TOOLCHAIN_VERSION}} | ||
BUILD_TYPE: ${{matrix.build_type}} | ||
CXX_STANDARD: ${{matrix.cxx_standard}} | ||
run: | | ||
mkdir -p build | ||
cmake -B build -GNinja \ | ||
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \ | ||
-DCMAKE_CXX_STANDARD=${CXX_STANDARD} \ | ||
-DCMAKE_C_COMPILER=${CC} \ | ||
-DCMAKE_CXX_COMPILER=${CXX} \ | ||
-DALLOW_EXAMPLES=ON \ | ||
-DALLOW_TESTS=ON \ | ||
-DENABLE_TESTS_MEASUREMENTS=ON \ | ||
-DALLOW_BENCHMARK=ON \ | ||
-DEXCEPTIONS_DISABLE=ON \ | ||
-DRTTI_DISABLE=ON | ||
- name: Build | ||
run: cmake --build build | ||
- name: Test | ||
working-directory: build | ||
run: ctest --rerun-failed --output-on-failure | ||
- name: Analyze dependencies | ||
working-directory: build | ||
run: ldd bin/dataflow |