Skip to content

linux

linux #67

Workflow file for this run

name: "linux"
on:
push:
branches: [ master ]
workflow_dispatch:
jobs:
build:
strategy:
matrix:
build_config: ['debug', 'release']
compiler: ['clang-18', 'gcc-13']
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: 'Automatic LLVM Install'
run: sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)"
- name: 'Install newer GCC'
run: sudo apt install gcc-13
- name: 'Set CXX Compiler'
id: set_compiler
run: |
if [ "${{ matrix.compiler }}" == "gcc-13" ]; then
echo "cxx_compiler=g++-13" >> $GITHUB_OUTPUT
elif [ "${{ matrix.compiler }}" == "clang-18" ]; then
echo "cxx_compiler=clang++-18" >> $GITHUB_OUTPUT
fi
- name: 'Configure psyc ${{ matrix.compiler }}_${{ matrix.build_config }}'
run: cmake --preset ci_${{ matrix.build_config }} -DCMAKE_CXX_COMPILER=${{ steps.set_compiler.outputs.cxx_compiler }} -DCMAKE_C_COMPILER=${{ matrix.compiler }}
working-directory: cpp
- name: 'Build psyc ${{ matrix.compiler }}_${{ matrix.build_config }}'
run: cmake --build ./build/ci_${{ matrix.build_config }} --target psyc
working-directory: cpp
- name: 'Psyc functional tests ${{ matrix.compiler }}_${{ matrix.build_config }}'
run: cmake --build ./build/ci_${{ matrix.build_config }} --target test
working-directory: cpp
- name: 'Upload psyc as artifact'
uses: actions/upload-artifact@v4
with:
name: psyc_${{ matrix.compiler }}_${{ matrix.build_config }}
path: ./cpp/build/ci_${{ matrix.build_config }}/psyc
run_tests:
strategy:
matrix:
build_config: ['debug', 'release']
compiler: ['clang-18', 'gcc-13']
runs-on: ubuntu-24.04
needs: build
steps:
- uses: actions/checkout@v4
- name: Retrieve psyc
uses: actions/download-artifact@v4
with:
name: psyc_${{ matrix.compiler }}_${{ matrix.build_config }}
- name: Prepare
shell: bash
run: sudo chmod +x psyc
- name: 'Run Samples'
uses: ./.github/actions/run_samples