-
Notifications
You must be signed in to change notification settings - Fork 1.1k
57 lines (48 loc) · 1.52 KB
/
macos.yml
File metadata and controls
57 lines (48 loc) · 1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Reusable MacOS workflow
on:
workflow_call:
inputs:
build-type:
default: RelWithDebInfo
type: string
image:
description: MacOS Runner image
required: true
type: string
jobs:
MacOS:
name: ${{ inputs.image }}
runs-on: ${{ inputs.image }}
steps:
- uses: actions/checkout@v6
- run: echo "CMAKE_BUILD_TYPE=${{ inputs.build-type }}" >> $GITHUB_ENV
- run: echo "MACOS_AMD64=true" >> $GITHUB_ENV
if: ${{ inputs.image == 'macos-15-intel' }}
- run: echo "DMG_IDENTIFIER=x86_64" >> $GITHUB_ENV
if: ${{ inputs.image == 'macos-15-intel' }}
- run: echo "DMG_IDENTIFIER=arm64" >> $GITHUB_ENV
if: ${{ inputs.image != 'macos-15-intel' }}
- name: Install Building Dependencies
run: CI/before_install.macos.sh
- name: Prime ccache
uses: hendrikmuhs/ccache-action@v1.2.22
with:
key: ${{ inputs.image }}-${{ inputs.build-type }}
max-size: 1000M
- name: Configure
run: CI/before_script.macos.sh -C
- name: Build
run: CI/macos/build.sh
- name: Store dmg
uses: actions/upload-artifact@v6
with:
name: openmw-macos-dmg-${{ env.DMG_IDENTIFIER }}-${{ github.sha }}
path: |
${{ github.workspace }}/build/OpenMW-*.dmg
- name: Create prerelease
if: ${{ inputs.build-type == 'Release' }}
uses: softprops/action-gh-release@v2
with:
files: ${{ github.workspace }}/build/OpenMW-*.dmg
prerelease: true
draft: true