Skip to content

upgraded workflow

upgraded workflow #9

Workflow file for this run

on:
push:
env:
CLANG_VERSION: "20.1.8"
MSVC_VERSION: "19.44.35214"
VERBOSE: 1
jobs:
CI:
runs-on: ${{ matrix.os }}
strategy:
# Set fail-fast to false to ensure that feedback is delivered for all matrix combinations. Consider changing this to true when your workflow is stable.
fail-fast: false
matrix:
os:
- ubuntu-latest
- windows-latest
build_type:
- Release
compiler:
- clang
- msvc
generator:
- "Ninja"
exclude:
- os: ubuntu-latest
compiler: msvc
steps:
- name: Setup Cpp
uses: aminya/setup-cpp@v1
with:
compiler: ${{matrix.compiler}}
conan: true
cmake: true
ninja: true
vcvarsall: false
clangtidy: true
cppcheck: true
ccache: false
- name: Checkout
uses: actions/checkout@v3
- name: Set env profile
shell: bash
run: |
os="${{ matrix.os}}"
system="${os%%-*}"
[[ "$system" == "ubuntu" ]] && system="linux"
echo "PROFILE=profiles/${system}-${{ matrix.compiler }}" >> "$GITHUB_ENV"
- name: Install
run: conan install . -pr:a=${{env.PROFILE}} -s build_type=${{ matrix.build_type }} --build=missing
- name: Build
run: conan build . -pr:a=${{env.PROFILE}} -s build_type=${{ matrix.build_type }} --build=missing
- name: Set env preset and build folder
shell: bash
run: echo "PRESET=$(cmake --list-presets | tail -n 1 | awk '{print $1}' | tr -d '"')" >> "$GITHUB_ENV"
- name: Test
run: ctest --preset ${{env.PRESET}}
- name: Package
run: cpack --preset ${{env.PRESET}} -B ${{ github.workspace }}/packages
- name: Upload Artifact
uses: actions/upload-artifact@v4.6.2
with:
name: ${{matrix.os}}-${{matrix.compiler}}
path: ./packages/*.*
if-no-files-found: error