Skip to content

macOS

macOS #125

Workflow file for this run

name: macOS
on:
workflow_run:
workflows: [Build Dependencies on macOS]
types:
- completed
env:
BUILD_TYPE: Debug
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-examples:
runs-on: macos-latest
steps:
- name: Checkout ViennaPS
uses: actions/checkout@v3
# ViennaLS
- name: Checkout ViennaLS
uses: actions/checkout@v3
with:
repository: ${{github.repository_owner}}/ViennaLS
path: ./viennals
- name: Setup Cache for Build Dependencies
uses: actions/cache@v3
id: viennals-dependency-cache
with:
key: viennals-dependency-cache-${{ runner.os }}-${{env.BUILD_TYPE}}-${{ hashFiles( './viennals/external/upstream/**CMakeLists.txt' ) }}
path: |
${{github.workspace}}/viennals/dependencies/Source
${{github.workspace}}/viennals/dependencies/Build
${{github.workspace}}/viennals/dependencies/Install
- name: Configure ViennaLS
working-directory: ${{github.workspace}}/viennals
run: |
cmake -B ./build \
-D CMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \
-D CMAKE_INSTALL_PREFIX=${{github.workspace}}/viennals/install \
-D OpenMP_C_FLAGS="-Xpreprocessor -fopenmp -I$(brew --prefix libomp)/include" \
-D OpenMP_CXX_FLAGS="-Xpreprocessor -fopenmp -I$(brew --prefix libomp)/include" \
-D OpenMP_C_LIB_NAMES="omp" \
-D OpenMP_CXX_LIB_NAMES="omp" \
-D OpenMP_omp_LIBRARY="$(brew --prefix libomp)/lib/libomp.a"
- name: Build ViennaLS
if: ${{steps.cache-check.outputs.cache-hit == false}}
run: cmake --build ${{github.workspace}}/viennals/build
- name: Install ViennaLS
run: cmake --install ${{github.workspace}}/viennals/build
# ViennaRay
- name: Checkout ViennaRay
uses: actions/checkout@v3
with:
repository: ${{github.repository_owner}}/ViennaRay
path: ./viennaray
- name: Restore ViennaRay build cache
uses: actions/cache@v3
id: viennaray-dependency-cache
with:
key: viennaray-dependency-cache-${{ runner.os }}-${{env.BUILD_TYPE}}-${{ hashFiles( './viennaray/external/upstream/**CMakeLists.txt' ) }}
path: |
${{github.workspace}}/viennaray/dependencies/Install
- name: Configure ViennaRay
working-directory: ${{github.workspace}}/viennaray
run: |
cmake -B ./build \
-D CMAKE_BUILD_TYPE=${{env.build_type}} \
-D CMAKE_INSTALL_PREFIX=${{github.workspace}}/viennaray/install \
-D OpenMP_C_FLAGS="-Xpreprocessor -fopenmp -I$(brew --prefix libomp)/include" \
-D OpenMP_CXX_FLAGS="-Xpreprocessor -fopenmp -I$(brew --prefix libomp)/include" \
-D OpenMP_C_LIB_NAMES="omp" \
-D OpenMP_CXX_LIB_NAMES="omp" \
-D OpenMP_omp_LIBRARY="$(brew --prefix libomp)/lib/libomp.a"
- name: Build ViennaRay
run: cmake --build ${{github.workspace}}/viennaray/build
- name: Install ViennaRay
run: cmake --install ${{github.workspace}}/viennaray/build
# ViennaPS
- name: Configure CMake
run: |
cmake -B ./build \
-D ViennaLS_DIR=${{github.workspace}}/viennals/install/lib/cmake/ViennaLS/ \
-D ViennaRay_DIR=${{github.workspace}}/viennaray/install/lib/cmake/ViennaRay/ \
-D OpenMP_C_FLAGS="-Xpreprocessor -fopenmp -I$(brew --prefix libomp)/include" \
-D OpenMP_CXX_FLAGS="-Xpreprocessor -fopenmp -I$(brew --prefix libomp)/include" \
-D OpenMP_C_LIB_NAMES="omp" \
-D OpenMP_CXX_LIB_NAMES="omp" \
-D OpenMP_omp_LIBRARY="$(brew --prefix libomp)/lib/libomp.a" \
-D VIENNAPS_BUILD_EXAMPLES=ON \
-D VIENNAPS_BUILD_APPLICATION=ON
- name: Build Examples
run: cmake --build ./build --target buildExamples
- name: Build application
run: cmake --build ./build --target buildApplication
- name: Run
working-directory: ${{github.workspace}}/build/Examples/InterpolationDemo
run: ./InterpolationDemo