From 4534360eb1963fd731db73768e6415e6711c8b5f Mon Sep 17 00:00:00 2001 From: Yunze Xu Date: Sun, 18 May 2025 16:17:28 +0800 Subject: [PATCH 1/2] ci: release macOS arm64 binary --- .github/workflows/release.yaml | 56 ++++++++++++++++++++++++++++++++++ .gitmodules | 3 ++ vcpkg | 2 +- 3 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/release.yaml create mode 100644 .gitmodules diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..565c398 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,56 @@ +# Copyright 2025 Yunze Xu +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: Release + +on: + push: + tags: + - 'v*' + # TODO: delete the following line after the CI passes + pull_request: + branches: + - main + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + + release-osx-arm64: + name: Build binary on macOS arm64 + runs-on: macos-14 + timeout-minutes: 60 + + steps: + - name: checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + submodules: recursive + + - name: build + run: | + echo "Building for macOS..." + mkdir -p build + cmake -B build + cmake --build build + cp ./build/snctl-cpp . + + - name: upload + uses: actions/upload-artifact@master + with: + name: macos-14-arm64.zip + path: snctl-cpp diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..a0a57f3 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "vcpkg"] + path = vcpkg + url = https://github.com/microsoft/vcpkg.git diff --git a/vcpkg b/vcpkg index 760bfd0..f26ec39 160000 --- a/vcpkg +++ b/vcpkg @@ -1 +1 @@ -Subproject commit 760bfd0c8d7c89ec640aec4df89418b7c2745605 +Subproject commit f26ec398c25c4980f33a50391f00a75f7ad62ef7 From 371c09c925dd36faf1c88a066437cb5f5f2983db Mon Sep 17 00:00:00 2001 From: Yunze Xu Date: Sun, 18 May 2025 16:28:02 +0800 Subject: [PATCH 2/2] fix --- .github/workflows/release.yaml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 565c398..ed6227d 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -18,10 +18,6 @@ on: push: tags: - 'v*' - # TODO: delete the following line after the CI passes - pull_request: - branches: - - main concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -52,5 +48,5 @@ jobs: - name: upload uses: actions/upload-artifact@master with: - name: macos-14-arm64.zip + name: snctl-cpp-macos-14-arm64 path: snctl-cpp