Skip to content

fix some minor errors #86

fix some minor errors

fix some minor errors #86

# This starter workflow is for a CMake project running on multiple platforms. There is a different starter workflow if you just want a single platform.
# See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-single-platform.yml
name: CMake on multiple platforms
on:
push:
branches: [ "master", "dev" ]
pull_request:
branches: [ "master" ]
jobs:
build:
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: true
matrix:
os: [macos-latest, windows-latest]
build_type: [Release]
include:
- os: windows-latest
c_compiler: cl
cpp_compiler: cl
- os: macos-latest
c_compiler: clang
cpp_compiler: clang++
steps:
- uses: actions/checkout@v4
- name: Checkout submodules
run: git submodule update --init --recursive
- name: Install Intel MKL (Windows)
if: runner.os == 'Windows'
shell: cmd
run: |
curl.exe --output %TEMP%\webimage.exe --url https://registrationcenter-download.intel.com/akdlm/IRC_NAS/1f18901e-877d-469d-a41a-a10f11b39336/intel-oneapi-base-toolkit-2025.3.0.372_offline.exe --retry 5 --retry-delay 5
start /b /wait %TEMP%\webimage.exe -s -x -f webimage_extracted --log extract.log
del %TEMP%\webimage.exe
webimage_extracted\bootstrapper.exe -s --action install --components=intel.oneapi.win.mkl.devel --eula=accept -p=NEED_VS2017_INTEGRATION=0 -p=NEED_VS2019_INTEGRATION=0 -p=NEED_VS2022_INTEGRATION=0 --log-dir=.
rd /s/q "webimage_extracted"
- name: Configure CMake
run: |
cmake -B Build -DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
- name: Build
# Build your program with the given configuration. Note that --config is needed because the default Windows generator is a multi-config generator (Visual Studio generator).
run: |
cmake --build Build --config ${{ matrix.build_type }}
#- name: Test
# working-directory: ${{ steps.strings.outputs.build-output-dir }}
# Execute tests defined by the CMake configuration. Note that --build-config is needed because the default Windows generator is a multi-config generator (Visual Studio generator).
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
# run: ctest --build-config ${{ matrix.build_type }}
- name: Upload a Build Artifact
uses: actions/upload-artifact@v4
with:
name: Grainflow-${{ matrix.os }}
path: ./externals/*
retention-days: 0
compression-level: 6
overwrite: true
include-hidden-files: false
merge:
runs-on: macos-latest
needs: [build]
steps:
- name: Checkout
uses: actions/checkout@v2.3.4
- name: download-win-externals
uses: actions/download-artifact@v4
with:
name: Grainflow-windows-latest
path: ./externals
- name: download-mac-externals
uses: actions/download-artifact@v4
with:
name: Grainflow-macos-latest
path: ./externals
- name: Make-MaxPack
run: |
python3 create_release.py pack
- name: Upload-MaxPack
uses: actions/upload-artifact@v4
with:
name: GrainflowPackage
path: ./grainflow.maxpack