Skip to content

Initial commit

Initial commit #1

Workflow file for this run

name: MacOS
on:
push:
branches: [ "main" ]
paths:
- 'src/**'
- 'include/**'
- 'application/**'
- 'CMakeLists.txt'
- 'conanfile.py'
- 'cmake/**'
- '.github/workflows/macos.yml'
pull_request:
branches: [ "main" ]
paths:
- 'src/**'
- 'include/**'
- 'application/**'
- 'CMakeLists.txt'
- 'conanfile.py'
- 'cmake/**'
- '.github/workflows/macos.yml'
env:
CPM_SOURCE_CACHE: ${{ github.workspace }}/.cpm_modules
BUILD_TYPE: Release
jobs:
build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: install conan to system
run: |
brew update
brew install ccache
pipx install conan
conan --version
- name: create CPM cache
id: cache-cpm
uses: actions/cache@v4
with:
path: ${{env.CPM_SOURCE_CACHE}}
# Workaround for GitHub Actions bug: https://github.com/actions/runner-images/issues/13341
# hashFiles() broken on macOS runners as of 2024-11-23, using static key temporarily
key: ${{ runner.os }}-cpm-static-v1
- name: create Conan cache
id: cache-conan
uses: actions/cache@v4
with:
path: ~/.conan2
# Workaround for GitHub Actions bug: https://github.com/actions/runner-images/issues/13341
# hashFiles() broken on macOS runners as of 2024-11-23, using static key temporarily
key: ${{ runner.os }}-conan-static-v1
- if: ${{ steps.cache-conan.outputs.cache-hit != 'true' }}
name: Conan profile detect --force
run: conan profile detect --force
- name: Conan profile show
run: conan profile show
- name: install Conan dependencies
run: conan install . -s build_type=${{env.BUILD_TYPE}} -s compiler.cppstd=20 -of=${{github.workspace}}/build/application/default/debug -pr default -b=missing
- name: CMake configure
run: cmake -B ${{github.workspace}}/build/application/default/debug -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_LIBRARY=ON -DBUILD_APPLICATION=ON
- name: CMake build
run: cmake --build ${{github.workspace}}/build/application/default/debug --config ${{env.BUILD_TYPE}}