Skip to content

Add CI for MacOS

Add CI for MacOS #3

Workflow file for this run

name: MacOS Intel
# triggered events (push, pull_request) for the master branch
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
macos_Build:
name: Mac OS Intel Build
# The type of runner that the job will run on
runs-on: macos-latest
env:
MACOS_HPCKIT_URL: https://registrationcenter-download.intel.com/akdlm/IRC_NAS/c112cca6-12cf-4a0c-9e5e-d0d50d3b0f8b/m_RenderKit_p_2024.1.0.744_offline.dmg
CC: icx
FC: ifx
steps:
# Prepare for Intel cache restore
- name: Prepare for Intel cache restore
run: |
sudo mkdir -p /opt/intel
sudo chown $USER /opt/intel
# Cache Intel HPC Toolkit
- name: Cache Intel HPC Toolkit
id: cache-intel-hpc-toolkit
uses: actions/cache@v2
with:
path: /opt/intel/oneapi
key: install-${{ env.MACOS_HPCKIT_URL }}-all
# Install Intel HPC Toolkit
- name: Install Intel HPC Toolkit
if: steps.cache-intel-hpc-toolkit.outputs.cache-hit != 'true'
run: |
curl --output webimage.dmg --url "$MACOS_HPCKIT_URL" --retry 5 --retry-delay 5
hdiutil attach webimage.dmg
sudo /Volumes/$(basename $MACOS_HPCKIT_URL .dmg)/bootstrapper.app/Contents/MacOS/bootstrapper -s --action install --components=all --eula=accept --continue-with-optional-error=yes --log-dir=.
cat /opt/intel/oneapi/logs/installer.install.intel.oneapi.mac.hpckit.*
hdiutil detach /Volumes/$(basename "$MACOS_HPCKIT_URL" .dmg) -quiet
# Check location of installed Intel compilers
- name: Check compiler install
run: |
source /opt/intel/oneapi/setvars.sh
which icx
which ifx
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout repository
uses: actions/checkout@v2
# Test debug mode
- name: Test gf Debug
run: |
source /opt/intel/oneapi/setvars.sh
cd ref
rm -rf build
mkdir build
cd build
#export OMP_NUM_THREADS=4
export CC=icx
export FC=ifx
cmake -DCMAKE_BUILD_TYPE=debug -DENABLE_GPU=off ..
make VERBOSE=1
ulimit -s hard
ctest --output-on-failure
# Test release mode
- name: Test gf Release
run: |
source /opt/intel/oneapi/setvars.sh
cd ref
rm -rf build
mkdir build
cd build
#export OMP_NUM_THREADS=4
export CC=icx
export FC=ifx
cmake -DCMAKE_BUILD_TYPE=release -DENABLE_GPU=off ..
make VERBOSE=1
ulimit -s hard
ctest --output-on-failure