From 20864e0bdf5c65be55ca4fab2a3a4585428be8fb Mon Sep 17 00:00:00 2001 From: Mykola Hohsadze Date: Sun, 25 Aug 2024 23:28:42 +0300 Subject: [PATCH 1/4] Add CI MacOS Arm64 support --- .github/workflows/aarch64_macos_bazel.yml | 35 ++++++++++++++++++ .github/workflows/aarch64_macos_cmake.yml | 43 +++++++++++++++++++++++ 2 files changed, 78 insertions(+) create mode 100644 .github/workflows/aarch64_macos_bazel.yml create mode 100644 .github/workflows/aarch64_macos_cmake.yml diff --git a/.github/workflows/aarch64_macos_bazel.yml b/.github/workflows/aarch64_macos_bazel.yml new file mode 100644 index 00000000..7fb5c9c6 --- /dev/null +++ b/.github/workflows/aarch64_macos_bazel.yml @@ -0,0 +1,35 @@ +name: AArch64 MacOS Bazel + +on: + push: + pull_request: + schedule: + # min hours day(month) month day(week) + - cron: '0 0 7,22 * *' + +jobs: + # Building using the github runner environement directly. + bazel: + runs-on: macos-latest + steps: + - name: Check out repository code + uses: actions/checkout@v3 + - name: Install Bazel + run: | + brew update + brew unlink bazelisk + brew install bazel + - name: Check Bazel + run: bazel version + - name: Build + run: > + bazel build + -c opt + --subcommands=true + ... + - name: Test + run: > + bazel test + -c opt + --test_output=errors + ... diff --git a/.github/workflows/aarch64_macos_cmake.yml b/.github/workflows/aarch64_macos_cmake.yml new file mode 100644 index 00000000..cb8ac7f6 --- /dev/null +++ b/.github/workflows/aarch64_macos_cmake.yml @@ -0,0 +1,43 @@ +name: AArch64 MacOS CMake + +on: + push: + pull_request: + schedule: + # min hours day(month) month day(week) + - cron: '0 0 7,22 * *' + +jobs: + # Building using the github runner environement directly. + xcode: + runs-on: macos-latest + env: + CTEST_OUTPUT_ON_FAILURE: 1 + steps: + - uses: actions/checkout@v2 + - name: Check cmake + run: cmake --version + - name: Configure + run: cmake -S. -Bbuild -G "Xcode" -DCMAKE_CONFIGURATION_TYPES=Release + - name: Build + run: cmake --build build --config Release --target ALL_BUILD -v + - name: Test + run: cmake --build build --config Release --target RUN_TESTS -v + - name: Install + run: cmake --build build --config Release --target install -v + make: + runs-on: macos-latest + env: + CTEST_OUTPUT_ON_FAILURE: 1 + steps: + - uses: actions/checkout@v2 + - name: Check cmake + run: cmake --version + - name: Configure + run: cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release + - name: Build + run: cmake --build build --target all -v + - name: Test + run: cmake --build build --target test -v + - name: Install + run: cmake --build build --target install -v From f2b84811236c1c3457397ba1f525544a7148c2cb Mon Sep 17 00:00:00 2001 From: Mykola Hohsadze Date: Mon, 26 Aug 2024 03:41:55 +0300 Subject: [PATCH 2/4] Update CMAKE_INSTALL_PREFIX --- .github/workflows/aarch64_macos_cmake.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/aarch64_macos_cmake.yml b/.github/workflows/aarch64_macos_cmake.yml index cb8ac7f6..c4eb03a1 100644 --- a/.github/workflows/aarch64_macos_cmake.yml +++ b/.github/workflows/aarch64_macos_cmake.yml @@ -18,7 +18,7 @@ jobs: - name: Check cmake run: cmake --version - name: Configure - run: cmake -S. -Bbuild -G "Xcode" -DCMAKE_CONFIGURATION_TYPES=Release + run: cmake -S. -Bbuild -G "Xcode" -DCMAKE_CONFIGURATION_TYPES=Release -DCMAKE_INSTALL_PREFIX:PATH=destination - name: Build run: cmake --build build --config Release --target ALL_BUILD -v - name: Test @@ -34,7 +34,7 @@ jobs: - name: Check cmake run: cmake --version - name: Configure - run: cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release + run: cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=destination - name: Build run: cmake --build build --target all -v - name: Test From 77aab3bed0c6d491a5b0a4bc41437d54f25a3c6d Mon Sep 17 00:00:00 2001 From: Mykola Hohsadze Date: Tue, 27 Aug 2024 21:35:11 +0300 Subject: [PATCH 3/4] Rename aarch64 to arm64 for macos github workflows --- .../{aarch64_macos_bazel.yml => arm64_macos_bazel.yml} | 3 ++- .../{aarch64_macos_cmake.yml => arm64_macos_cmake.yml} | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) rename .github/workflows/{aarch64_macos_bazel.yml => arm64_macos_bazel.yml} (90%) rename .github/workflows/{aarch64_macos_cmake.yml => arm64_macos_cmake.yml} (94%) diff --git a/.github/workflows/aarch64_macos_bazel.yml b/.github/workflows/arm64_macos_bazel.yml similarity index 90% rename from .github/workflows/aarch64_macos_bazel.yml rename to .github/workflows/arm64_macos_bazel.yml index 7fb5c9c6..051c9e7f 100644 --- a/.github/workflows/aarch64_macos_bazel.yml +++ b/.github/workflows/arm64_macos_bazel.yml @@ -1,4 +1,5 @@ -name: AArch64 MacOS Bazel +# ref: https://github.com/actions/runner-images +name: Arm64 MacOS Bazel on: push: diff --git a/.github/workflows/aarch64_macos_cmake.yml b/.github/workflows/arm64_macos_cmake.yml similarity index 94% rename from .github/workflows/aarch64_macos_cmake.yml rename to .github/workflows/arm64_macos_cmake.yml index c4eb03a1..214bd202 100644 --- a/.github/workflows/aarch64_macos_cmake.yml +++ b/.github/workflows/arm64_macos_cmake.yml @@ -1,4 +1,5 @@ -name: AArch64 MacOS CMake +# ref: https://github.com/actions/runner-images +name: Arm64 MacOS CMake on: push: From 2194feaf54131af010e0f8ddb99d22dfbf81462b Mon Sep 17 00:00:00 2001 From: Mykola Hohsadze Date: Thu, 29 Aug 2024 01:59:58 +0300 Subject: [PATCH 4/4] Add comment after macos-latest --- .github/workflows/arm64_macos_bazel.yml | 2 +- .github/workflows/arm64_macos_cmake.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/arm64_macos_bazel.yml b/.github/workflows/arm64_macos_bazel.yml index 051c9e7f..b8b3dd99 100644 --- a/.github/workflows/arm64_macos_bazel.yml +++ b/.github/workflows/arm64_macos_bazel.yml @@ -11,7 +11,7 @@ on: jobs: # Building using the github runner environement directly. bazel: - runs-on: macos-latest + runs-on: macos-latest # Using M1 processors, ref: https://github.com/actions/runner-images steps: - name: Check out repository code uses: actions/checkout@v3 diff --git a/.github/workflows/arm64_macos_cmake.yml b/.github/workflows/arm64_macos_cmake.yml index 214bd202..5d19ab94 100644 --- a/.github/workflows/arm64_macos_cmake.yml +++ b/.github/workflows/arm64_macos_cmake.yml @@ -11,7 +11,7 @@ on: jobs: # Building using the github runner environement directly. xcode: - runs-on: macos-latest + runs-on: macos-latest # Using M1 processors, ref: https://github.com/actions/runner-images env: CTEST_OUTPUT_ON_FAILURE: 1 steps: @@ -27,7 +27,7 @@ jobs: - name: Install run: cmake --build build --config Release --target install -v make: - runs-on: macos-latest + runs-on: macos-latest # Using M1 processors, ref: https://github.com/actions/runner-images env: CTEST_OUTPUT_ON_FAILURE: 1 steps: