Skip to content

ci: use multiple versions of gcc #47

ci: use multiple versions of gcc

ci: use multiple versions of gcc #47

Workflow file for this run

name: CI
on: [pull_request, push, workflow_dispatch]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
tests:
name: "ubuntu-latest | g++"
timeout-minutes: 60
runs-on: ubuntu-latest
strategy:
matrix:
sys:
- { compiler: 'gcc', version: '6'}
- { compiler: 'gcc', version: '7'}
- { compiler: 'gcc', version: '8'}
- { compiler: 'gcc', version: '9'}
- { compiler: 'gcc', version: '10'}
- { compiler: 'gcc', version: '11'}
# - { compiler: 'clang', version: '8'}
# - { compiler: 'clang', version: '10'}
# - { compiler: 'clang', version: '12'}
# - { compiler: 'clang', version: '13'}
# - { compiler: 'clang', version: '14'}
steps:
- name: "Checkout HPCombi repo . . ."
uses: actions/checkout@v3
if: ${{ matrix.sys.compiler == 'gcc' }}
run: |

Check failure on line 31 in .github/workflows/runtests.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/runtests.yml

Invalid workflow file

You have an error in your yaml syntax on line 31
GCC_VERSION=${{ matrix.sys.version }}
if [[ $GCC_VERSION == '6' || $GCC_VERSION == '7' || $GCC_VERSION == '8' ]]; then
sudo apt-get update
sudo apt-get --no-install-suggests --no-install-recommends install g++-$GCC_VERSION
fi
CC=gcc-$GCC_VERSION
echo "CC=$CC" >> $GITHUB_ENV
CXX=g++-$GCC_VERSION
echo "CXX=$CXX" >> $GITHUB_ENV
- name: "Install dependencies . . ."
run: |
sudo apt-get --yes update
sudo apt-get install --yes ccache
sudo apt-get install --yes libbenchmark-dev
- name: "Build HPCombi tests . . ."
env:
CC: ${{ env.CC }}
CXX: ${{ env.CXX }}
run: |
mkdir build
cd build
cmake .. -DBUILD_TESTS=ON \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_COMPILER=$CC \
-DCMAKE_CXX_COMPILER=$CXX \
..
cd tests
make -j4
- name: "Run HPCombi tests . . ."
./test_all