build: more arm64 tests on macos (#39)

This commit is contained in:
6arelyFuture 2023-06-25 15:18:37 +02:00 committed by GitHub
parent 02335285e6
commit d8f265f284
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 1 deletions

View File

@ -134,11 +134,14 @@ jobs:
- Release - Release
arch: arch:
- x64 - x64
- arm64
include: include:
- configuration: Release - configuration: Release
config: release config: release
- arch: x64 - arch: x64
platform: x64 platform: x64
- arch: arm64
platform: arm64
steps: steps:
- name: Check out files - name: Check out files
uses: actions/checkout@v3.5.3 uses: actions/checkout@v3.5.3

View File

@ -57,6 +57,10 @@ function libtomcrypt.project()
filter "platforms:x64" filter "platforms:x64"
buildoptions "-march=native" buildoptions "-march=native"
filter {} filter {}
filter "platforms:arm64"
buildoptions "-mcpu=apple-m1"
filter {}
end end
warnings "Off" warnings "Off"

View File

@ -39,7 +39,7 @@ targetdir "%{wks.location}/bin/%{cfg.platform}/%{cfg.buildcfg}"
configurations {"Debug", "Release"} configurations {"Debug", "Release"}
if os.istarget("darwin") then if os.istarget("darwin") then
platforms {"x64"} platforms {"x64", "arm64"}
else else
platforms {"x86", "x64", "arm64"} platforms {"x86", "x64", "arm64"}
end end
@ -79,6 +79,13 @@ if os.istarget("linux") or os.istarget("darwin") then
linkoptions "-pthread" linkoptions "-pthread"
end end
if os.istarget("darwin") then
filter "platforms:arm64"
buildoptions "-arch arm64"
linkoptions "-arch arm64"
filter {}
end
if os.getenv("CI") then if os.getenv("CI") then
defines "CI" defines "CI"
end end