Skip to content

test with g++11

test with g++11 #7

##############################################################################
# GitHub Actions Workflow to test building MeshPolygonization with GCC
#
# Copyright (C) 2022 Liangliang Nan <liangliang.nan@gmail.com>
#
# Licensed under GNU LGPL.3, see LICENCE file
##############################################################################
name: test-build-gcc
on: [push, pull_request]
jobs:
build:
name: Build with ${{ matrix.compiler }}
strategy:
fail-fast: false
matrix:
compiler: [g++-7, g++-8, g++-9, g++-10, g++-11]
runs-on: ubuntu-20.04
steps:
- name: Check out the repository
uses: actions/checkout@v2
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential cmake \
libglu1-mesa-dev freeglut3-dev mesa-common-dev \
libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev
- name: Install GCC version ${{ matrix.compiler }}
run: |
sudo apt-get install -y ${MATRIX_COMPILER_PACKAGE}
if ! command -v ${{ matrix.compiler }}; then
echo "Error: ${{ matrix.compiler }} not installed"; exit 1;
fi
env:
MATRIX_COMPILER_PACKAGE: |
$(if [[ "${{ matrix.compiler }}" == "g++-11" ]]; then echo "gcc-11 g++-11"; else echo "${{ matrix.compiler }}"; fi)
- name: Configure and build with CMake
run: |
mkdir -p build && cd build
cmake -DCMAKE_CXX_COMPILER=${{ matrix.compiler }} -DCMAKE_BUILD_TYPE=Release ..
make