MacOS ARM support <3 #19
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CMake MacOS Build | |
on: [push, pull_request, workflow_dispatch] | |
env: | |
BUILD_TYPE: Release | |
jobs: | |
macos-build: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: 'true' | |
- name: Restore artifacts, or run vcpkg, build and cache artifacts | |
uses: lukka/run-vcpkg@v7 | |
id: runvcpkg | |
with: | |
vcpkgArguments: 'zlib:arm64-osx nlohmann-json:arm64-osx openssl:arm64-osx cpp-httplib[openssl]:arm64-osx curl:arm64-osx' | |
vcpkgDirectory: '${{ runner.workspace }}/b/vcpkg' | |
vcpkgGitCommitId: '40616a5e954f7be1077ef37db3fbddbd5dcd1ca6' | |
- name: Create Build Environment | |
run: cmake -E make_directory ${{github.workspace}}/build-macos | |
- name: Configure CMake | |
shell: bash | |
working-directory: ${{github.workspace}}/build-macos | |
run: | | |
cmake $GITHUB_WORKSPACE \ | |
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \ | |
-DCMAKE_TOOLCHAIN_FILE='${{ runner.workspace }}/b/vcpkg/scripts/buildsystems/vcpkg.cmake' \ | |
-DCMAKE_OSX_ARCHITECTURES=arm64 | |
- name: Build | |
working-directory: ${{github.workspace}}/build-macos | |
shell: bash | |
run: cmake --build . --config $BUILD_TYPE | |
- name: Archive artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: BeamMP-Launcher | |
path: ${{github.workspace}}/build-macos/BeamMP-Launcher |