ci: use new versions of gcc + clang #170
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
name: CI | ||
on: [pull_request, workflow_dispatch] | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
jobs: | ||
tests: | ||
name: "ubuntu-latest" | ||
timeout-minutes: 60 | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
sys: | ||
- { compiler: 'gcc', version: '9'} | ||
- { compiler: 'gcc', version: '10'} | ||
- { compiler: 'gcc', version: '11'} | ||
- { compiler: 'gcc', version: '12'} | ||
- { compiler: 'gcc', version: '13'} | ||
- { compiler: 'gcc', version: '14'} | ||
- { compiler: 'clang', version: '11'} | ||
- { compiler: 'clang', version: '12'} | ||
- { compiler: 'clang', version: '13'} | ||
- { compiler: 'clang', version: '14'} | ||
- { compiler: 'clang', version: '15'} | ||
- { compiler: 'clang', version: '16'} | ||
- { compiler: 'clang', version: '17'} | ||
- { compiler: 'clang', version: '18'} | ||
steps: | ||
- name: Set up Homebrew | ||
id: set-up-homebrew | ||
uses: Homebrew/actions/setup-homebrew@master | ||
- name: "Checkout HPCombi repo . . ." | ||
uses: actions/checkout@v3 | ||
- name: "Setup compiler (gcc, version >= 12) . . ." | ||
if: ${{ matrix.sys.compiler == 'gcc' && fromJSON(matrix.sys.version) >= fromJSON('12')}} | ||
run: | | ||
GCC_VERSION=${{ matrix.sys.version }} | ||
sudo apt-get --yes update | ||
sudo apt-get install gcc-$GCC_VERSION | ||
CC=gcc-$GCC_VERSION | ||
echo "CC=$CC" >> $GITHUB_ENV | ||
CXX=g++-$GCC_VERSION | ||
echo "CXX=$CXX" >> $GITHUB_ENV | ||
- name: "Setup compiler (gcc, version < 12) . . ." | ||
if: ${{ matrix.sys.compiler == 'gcc' && fromJSON(matrix.sys.version) < fromJSON('12')}} | ||
run: | | ||
GCC_VERSION=${{ matrix.sys.version }} | ||
brew install gcc@$GCC_VERSION | ||
CC=gcc-$GCC_VERSION | ||
echo "CC=$CC" >> $GITHUB_ENV | ||
CXX=g++-$GCC_VERSION | ||
echo "CXX=$CXX" >> $GITHUB_ENV | ||
- name: "Setup compiler (clang, version >= 16) . . ." | ||
if: ${{ matrix.sys.compiler == 'clang' && fromJSON(matrix.sys.version) >= fromJSON("16")}} | ||
Check failure on line 57 in .github/workflows/runtests.yml GitHub Actions / CIInvalid workflow file
|
||
run: | | ||
LLVM_VERSION=${{ matrix.sys.version }} | ||
sudo apt-get --yes update | ||
sudo apt-get install --yes clang++-$LLVM_VERSION | ||
CC=clang-$LLVM_VERSION | ||
echo "CC=$CC" >> $GITHUB_ENV | ||
CXX=clang++-$LLVM_VERSION | ||
echo "CXX=$CXX" >> $GITHUB_ENV | ||
- name: "Setup compiler (clang, version < 16) . . ." | ||
if: ${{ matrix.sys.compiler == 'clang' && fromJSON(matrix.sys.version) < fromJSON("16")}} | ||
run: | | ||
LLVM_VERSION=${{ matrix.sys.version }} | ||
brew install llvm@$LLVM_VERSION | ||
echo "CXX=$CXX" >> $GITHUB_ENV | ||
CC=clang-$LLVM_VERSION | ||
echo "CC=$CC" >> $GITHUB_ENV | ||
CXX=clang++-$LLVM_VERSION | ||
echo "CXX=$CXX" >> $GITHUB_ENV | ||
- name: "Install dependencies . . ." | ||
run: | | ||
sudo apt-get install --yes ccache | ||
- name: "Configure the HPCombi build . . ." | ||
env: | ||
CC: ${{ env.CC }} | ||
CXX: ${{ env.CXX }} | ||
run: | | ||
mkdir build | ||
cd build | ||
cmake -DBUILD_TESTING=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=$CC -DCMAKE_CXX_COMPILER=$CXX .. | ||
- name: "Build HPCombi . . ." | ||
run: | | ||
cd build/tests | ||
make -j4 | ||
- name: "Run HPCombi tests . . ." | ||
run: | | ||
cd build/tests | ||
./test_all |