osb/.github/workflows/build_macos.yml

93 lines
2.2 KiB
YAML
Raw Normal View History

2024-02-18 12:55:01 +00:00
name: macOS
on:
push:
branches:
- "*"
tags:
- "*"
pull_request:
branches:
- "*"
jobs:
build-intel:
name: OpenStarbound macOS x86_64
runs-on: macos-13
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
2024-03-08 09:09:27 +00:00
- name: Hire a Ninja
run: brew install ninja
2024-02-18 12:55:01 +00:00
2024-03-08 09:09:27 +00:00
- name: sccache
uses: hendrikmuhs/ccache-action@v1.2
with:
variant: sccache
key: ${{ github.job }}-Intel-${{ runner.os }}
max-size: 2500M
2024-02-18 12:55:01 +00:00
2024-03-08 09:09:27 +00:00
- name: vcpkg
uses: lukka/run-vcpkg@v11
id: runvcpkg
with:
vcpkgJsonGlob: '**/source/vcpkg.json'
vcpkgConfigurationJsonGlob: '**/source/vcpkg-configuration.json'
2024-02-18 12:55:01 +00:00
2024-03-08 09:09:27 +00:00
- name: Run CMake
uses: lukka/run-cmake@v10
with:
cmakeListsTxtPath: '${{ github.workspace }}/source/CMakeLists.txt'
configurePreset: 'macos-release'
buildPreset: 'macos-release'
testPreset: 'macos-release'
2024-02-18 12:55:01 +00:00
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: OpenStarbound-Dev-macOS-Intel
path: dist/*
build-arm:
name: OpenStarbound macOS arm64
runs-on: macos-14
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
2024-03-08 09:09:27 +00:00
- name: Hire a Ninja
run: brew install ninja
2024-02-18 12:55:01 +00:00
2024-03-08 09:09:27 +00:00
- name: sccache
uses: hendrikmuhs/ccache-action@v1.2
with:
variant: sccache
key: ${{ github.job }}-ARM-${{ runner.os }}
max-size: 2500M
2024-02-18 12:55:01 +00:00
2024-03-08 09:09:27 +00:00
- name: vcpkg
uses: lukka/run-vcpkg@v11
id: runvcpkg
with:
vcpkgJsonGlob: '**/source/vcpkg.json'
vcpkgConfigurationJsonGlob: '**/source/vcpkg-configuration.json'
2024-02-18 12:55:01 +00:00
2024-03-08 09:09:27 +00:00
- name: Run CMake
uses: lukka/run-cmake@v10
with:
cmakeListsTxtPath: '${{ github.workspace }}/source/CMakeLists.txt'
configurePreset: 'macos-arm-release'
buildPreset: 'macos-arm-release'
testPreset: 'macos-arm-release'
2024-02-18 12:55:01 +00:00
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: OpenStarbound-Dev-macOS-Silicon
path: dist/*