From a14e21dff6215be618a6d25e4baaa094470ecedd Mon Sep 17 00:00:00 2001 From: "5684185+vsariola@users.noreply.github.com" <5684185+vsariola@users.noreply.github.com> Date: Sun, 5 May 2024 13:19:25 +0300 Subject: [PATCH] ci: macos-latest is now arm64 and breaks, use macos-12 for now --- .github/workflows/binaries.yml | 2 +- .github/workflows/tests.yml | 2 +- CMakeLists.txt | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/binaries.yml b/.github/workflows/binaries.yml index f4629ec..c247088 100644 --- a/.github/workflows/binaries.yml +++ b/.github/workflows/binaries.yml @@ -92,7 +92,7 @@ jobs: asmnasm: /Users/runner/nasm/nasm output: sointu-compile params: cmd/sointu-compile/main.go - - os: macos-latest + - os: macos-12 # this is intel still asmnasm: /Users/runner/nasm/nasm output: sointu-track-native params: -tags=native cmd/sointu-track/main.go diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e25bd02..2af11c6 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -25,7 +25,7 @@ jobs: asmnasm: C:\Users\runneradmin\nasm\nasm gotests: yes cgo_ldflags: - - os: macos-latest + - os: macos-12 # this is intel still asmnasm: /Users/runner/nasm/nasm gotests: yes cgo_ldflags: # -Wl,-no_pie diff --git a/CMakeLists.txt b/CMakeLists.txt index 1e29ae0..6f06f6f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -26,6 +26,8 @@ endif() IF(APPLE) set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-no_pie") + # https://stackoverflow.com/questions/69803659/what-is-the-proper-way-to-build-for-macos-x86-64-using-cmake-on-apple-m1-arm + set(CMAKE_OSX_ARCHITECTURES "x86_64" CACHE INTERNAL "" FORCE) endif() find_program(GO NAMES go)