From ce0392a153d94e2b0e9d5a4565d5010c5d0ecae5 Mon Sep 17 00:00:00 2001 From: David Bauer Date: Mon, 1 Apr 2024 16:54:00 -0700 Subject: [PATCH] Separate arch builds for macos --- .github/workflows/macos.yml | 50 ++++++++++++++++++++++++++++++++++--- 1 file changed, 47 insertions(+), 3 deletions(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index db04dfd..65a879d 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -12,9 +12,9 @@ env: TBB_VERSION: 2021.11.0 jobs: - linux: + macos-arm64: env: - PACKAGE_NAME: stage-macos-universal + PACKAGE_NAME: stage-macos-arm64 runs-on: macos-13 @@ -41,7 +41,51 @@ jobs: cmake $GITHUB_WORKSPACE -DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/install/${PACKAGE_NAME} -DCMAKE_BUILD_TYPE=$BUILD_TYPE - -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" + -DCMAKE_OSX_ARCHITECTURES="arm64" + -DSTAGE_LOGGING_OFF=ON + -DBUILD_SHARED_LIBS=ON + -DTBB_DIR=${{github.workspace}}/dependencies/oneapi-tbb-${TBB_VERSION}/lib/cmake/tbb/ + + - name: Build + working-directory: ${{github.workspace}}/build + run: cmake --build . -j --target install + + - name: Upload + uses: actions/upload-artifact@v4 + with: + name: ${{env.PACKAGE_NAME}} + path: ${{github.workspace}}/install + + macos-x86_64: + env: + PACKAGE_NAME: stage-macos-x86_64 + + runs-on: macos-13 + + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Setup Env + run: | + mkdir -p ${{github.workspace}}/dependencies + mkdir -p ${{github.workspace}}/build + mkdir -p ${{github.workspace}}/install/${PACKAGE_NAME} + + - name: Download TBB + working-directory: ${{github.workspace}}/dependencies + run: | + arch -x86_64 brew update + arch -x86_64 brew install tbb + + - name: Configure + working-directory: ${{github.workspace}}/build + run: > + cmake $GITHUB_WORKSPACE + -DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/install/${PACKAGE_NAME} + -DCMAKE_BUILD_TYPE=$BUILD_TYPE + -DCMAKE_OSX_ARCHITECTURES="x86_64" -DSTAGE_LOGGING_OFF=ON -DBUILD_SHARED_LIBS=ON -DTBB_DIR=${{github.workspace}}/dependencies/oneapi-tbb-${TBB_VERSION}/lib/cmake/tbb/