ci: adjust builds to also build the ARM binaries

This commit is contained in:
Tyler Wilding 2024-11-09 13:08:10 -05:00
parent baea81efff
commit 84e2b768e4
5 changed files with 41 additions and 10 deletions

View File

@ -52,11 +52,9 @@ jobs:
cmakePreset: "Release-macos-clang"
cachePrefix: ""
# Q4 2023 there will hopefully be native arm64 runners
# https://github.com/github/roadmap/issues/528
# build_macos_arm:
# name: "🍎 MacOS"
# uses: ./.github/workflows/macos-build-arm.yaml
# with:
# cmakePreset: "Release-macos-clang"
# cachePrefix: ""
build_macos_arm:
name: "🍎 MacOS"
uses: ./.github/workflows/macos-build-arm.yaml
with:
cmakePreset: "Release-macos-rosetta-clang"
cachePrefix: ""

View File

@ -52,7 +52,7 @@ jobs:
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: opengoal-macos-${{ inputs.cachePrefix }}
name: opengoal-macos-arm-${{ inputs.cachePrefix }}
if-no-files-found: error
path: |
./build/goalc/goalc

View File

@ -79,6 +79,17 @@ jobs:
uploadArtifacts: true
secrets: inherit
build_macos_arm:
needs:
- cut_release
name: "🍎 MacOS"
uses: ./.github/workflows/macos-build.yaml
with:
cmakePreset: "Release-macos-rosetta-clang-static"
cachePrefix: "static"
uploadArtifacts: true
secrets: inherit
# Upload the Artifacts
upload_artifacts:
if: github.repository == 'open-goal/jak-project'
@ -87,6 +98,7 @@ jobs:
- build_windows_clang
- build_linux_clang
- build_macos_intel
- build_macos_arm
name: "Upload Artifacts"
runs-on: ubuntu-latest
steps:
@ -124,7 +136,7 @@ jobs:
7z a -tzip ./ci-artifacts/final/opengoal-windows-${TAG_VAL}.zip ./ci-artifacts/windows/*
cp ./ci-artifacts/opengoal-windows-static/lsp.exe ./ci-artifacts/final/opengoal-lsp-windows-${TAG_VAL}.exe
- name: Prepare macOS Build Assets
- name: Prepare Intel macOS Build Assets
run: |
mkdir -p ./ci-artifacts/macos
./.github/scripts/releases/extract_build_unix.sh ./ci-artifacts/macos ./ci-artifacts/opengoal-macos-static ./
@ -135,6 +147,17 @@ jobs:
chmod +x ./ci-artifacts/opengoal-macos-static/lsp/lsp
cp ./ci-artifacts/opengoal-macos-static/lsp/lsp ./ci-artifacts/final/opengoal-lsp-macos-intel-${TAG_VAL}.bin
- name: Prepare ARM macOS Build Assets
run: |
mkdir -p ./ci-artifacts/macos-arm
./.github/scripts/releases/extract_build_unix.sh ./ci-artifacts/macos-arm ./ci-artifacts/opengoal-macos-arm-static ./
pushd ci-artifacts/macos-arm
TAG_VAL=${{ needs.cut_release.outputs.new_tag }}
tar czf ../final/opengoal-macos-arm-${TAG_VAL}.tar.gz .
popd
chmod +x ./ci-artifacts/opengoal-macos-arm-static/lsp/lsp
cp ./ci-artifacts/opengoal-macos-arm-static/lsp/lsp ./ci-artifacts/final/opengoal-lsp-macos-arm-${TAG_VAL}.bin
- name: Upload Assets
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@ -2,6 +2,7 @@
cmake_minimum_required(VERSION 3.10)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
project(jak)
include(CTest)

View File

@ -164,6 +164,15 @@
"description": "Build with Clang as Release without Debug Symbols",
"inherits": ["base-macos-release", "base-clang"]
},
{
"name": "Release-macos-rosetta-clang",
"displayName": "MacOS Release Rosetta (clang)",
"description": "Build with Clang as Release without Debug Symbols",
"inherits": ["base-macos-release", "base-clang"],
"cacheVariables": {
"BUILD_X86_ON_MACOS": "ON"
}
},
{
"name": "Release-macos-clang-static",
"displayName": "MacOS Static Release (clang)",