Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mac #13

Merged
merged 2 commits into from
Oct 1, 2024
Merged

Mac #13

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 17 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ jobs:

strategy:
matrix:
arch: ['arm64']
arch: ['arm64', 'arm64e']
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
Expand All @@ -170,11 +170,25 @@ jobs:
echo "tag result: $tag - $name"
echo "::set-output name=tag::$tag"
echo "::set-output name=name::$name"

- name: run-vcpkg

- name: Prepare Arm64e
if: matrix.arch == 'arm64e'
run: |
node tools/prepare-arm64e.js

- name: run-vcpkg arm64
if: matrix.arch == 'arm64'
uses: lukka/[email protected] # Option 2: specify 'latest' or 'latestrc' in the input version arguments:

- name: run-vcpkg arm64e
if: matrix.arch == 'arm64e'
uses: lukka/[email protected] # Option 2: specify 'latest' or 'latestrc' in the input version arguments:
with:
vcpkgGitURL: https://github.com/msojocs/vcpkg.git

- name: Build
env:
ACTION_OSX_ARCHITECTURES: ${{ matrix.arch }}
run: |
brew install ninja
tools/mac/ci.sh ${{ matrix.arch }} ${{ steps.tag.outputs.tag }}
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.MD
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## v1.1.2 / 2024-10-01

- feat: 添加Mac arm64e架构的支持。

## v1.1.1 / 2024-09-30

- fix: 修正Linux平台可能崩溃的问题。
Expand Down
5 changes: 4 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ project("yukihana_patch" VERSION 1.0.4)
if(APPLE)
message("MAC Processor: " ${CMAKE_SYSTEM_PROCESSOR})
set(CMAKE_OSX_ARCHITECTURES ${CMAKE_SYSTEM_PROCESSOR})
if("$ENV{ACTION_OSX_ARCHITECTURES}" STREQUAL "arm64e")
set(CMAKE_OSX_ARCHITECTURES "arm64e")
endif()
endif()
set(VCPKG_ROOT $ENV{VCPKG_ROOT})
message("VCPKG_ROOT: " ${VCPKG_ROOT})
Expand Down Expand Up @@ -35,4 +38,4 @@ find_package(spdlog CONFIG REQUIRED)
find_package(jsoncpp CONFIG REQUIRED)

add_subdirectory(./src)
add_subdirectory(./test)
add_subdirectory(./test)
9 changes: 9 additions & 0 deletions tools/prepare-arm64e.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const fs = require('fs')
const path = require('path')

const p = path.resolve(__dirname, '../vcpkg-configuration.json')
const cfg = JSON.parse(fs.readFileSync(p).toString())
cfg['default-registry'].repository = 'https://github.com/msojocs/vcpkg'
cfg['default-registry'].baseline = '47a484f679d92ce89f551d0e026adf291b9fc336'

fs.writeFileSync(p, JSON.stringify(cfg, null, 4))
Loading