Skip to content

Commit 539d460

Browse files
committed
[CI] Add mac build step
1 parent fa6b547 commit 539d460

File tree

2 files changed

+62
-14
lines changed

2 files changed

+62
-14
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: vcpkg-export
2+
inputs:
3+
export-type:
4+
description: 'Either raw or 7zip'
5+
required: true
6+
output-name:
7+
required: true
8+
runs:
9+
using: 'composite'
10+
steps:
11+
- name: Export installed vcpkg packages
12+
run: >
13+
vcpkg export
14+
--x-all-installed
15+
--raw
16+
--output-dir ${{ github.workspace }}
17+
--output ${{ inputs.output-name }}
18+
if: ${{ inputs.export-type == 'raw' }}
19+
- name: Export installed vcpkg packages
20+
run: >
21+
vcpkg export
22+
--x-all-installed
23+
--7zip
24+
--output-dir ${{ github.workspace }}
25+
--output ${{ inputs.output-name }}
26+
if: ${{ inputs.export-type == '7zip' }}

.github/workflows/build.yaml

Lines changed: 36 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,26 @@ env:
99
VCPKG_REVISION: 137197a8f85e6c6cf1843ef024af7d9c28bb0bde
1010

1111
jobs:
12+
macos:
13+
runs-on: macos-latest
14+
env:
15+
triplet: arm64-osx
16+
steps:
17+
- uses: actions/checkout@v4
18+
- uses: ./.github/actions/vcpkg-setup
19+
- name: Install vcpkg packages
20+
run: vcpkg install --overlay-ports=ports --overlay-triplets=triplets --triplet ${{ env.triplet }}
21+
- uses: ./.github/actions/vcpkg-export
22+
with:
23+
output-name: vcpkg-${{ env.triplet }}-${{ github.sha }}
24+
export-type: 7zip
25+
26+
- name: Store exported vcpkg packages
27+
uses: actions/upload-artifact@v4
28+
with:
29+
name: vcpkg-${{ env.triplet }}-${{ github.sha }}
30+
path: ${{ github.workspace }}/vcpkg-${{ env.triplet }}-${{ github.sha }}.7z
31+
1232
static-windows:
1333
strategy:
1434
fail-fast: true
@@ -39,13 +59,10 @@ jobs:
3959
run: >
4060
vcpkg install --overlay-ports=ports --overlay-triplets=triplets --host-triplet ${{ matrix.msvc_version.triplet }} --triplet ${{ matrix.msvc_version.triplet }}
4161
42-
- name: Export installed vcpkg packages
43-
run: >
44-
vcpkg export
45-
--x-all-installed
46-
--raw
47-
--output-dir ${{ github.workspace }}
48-
--output intermediate
62+
- uses: ./.github/actions/vcpkg-export
63+
with:
64+
output-name: intermediate
65+
export-type: raw
4966

5067
- name: Move pdb files
5168
working-directory: '${{ github.workspace }}/intermediate'
@@ -105,13 +122,10 @@ jobs:
105122
run: >
106123
vcpkg install --overlay-ports=ports --overlay-triplets=triplets --host-triplet ${{ matrix.msvc_version.triplet }} --triplet ${{ matrix.msvc_version.triplet }}
107124
108-
- name: Export installed vcpkg packages
109-
run: >
110-
vcpkg export
111-
--x-all-installed
112-
--raw
113-
--output-dir ${{ github.workspace }}
114-
--output intermediate
125+
- uses: ./.github/actions/vcpkg-export
126+
with:
127+
output-name: intermediate
128+
export-type: raw
115129

116130
- name: Move pdb files
117131
working-directory: '${{ github.workspace }}/intermediate'
@@ -160,6 +174,7 @@ jobs:
160174
upload-deps:
161175
needs:
162176
- dynamic-windows
177+
- macos
163178

164179
runs-on: ubuntu-latest
165180

@@ -188,6 +203,7 @@ jobs:
188203
mv vcpkg-x64-*-${{ github.sha }}/vcpkg-x64-windows-2022-${{ github.sha }}.7z vcpkg-x64-windows-2022-${{ env.file }}.7z
189204
mv vcpkg-x64-*-${{ github.sha }}/vcpkg-x64-windows-2019-pdb-${{ github.sha }}.7z vcpkg-x64-windows-2019-pdb-${{ env.file }}.7z
190205
mv vcpkg-x64-*-${{ github.sha }}/vcpkg-x64-windows-2022-pdb-${{ github.sha }}.7z vcpkg-x64-windows-2022-pdb-${{ env.file }}.7z
206+
mv vcpkg-arm64-osx-${{ github.sha }}/vcpkg-arm64-osx-${{ github.sha }}.7z vcpkg-arm64-osx-${{ env.file }}.7z
191207
192208
- name: Release
193209
if: startsWith(github.ref, 'refs/tags/')
@@ -254,6 +270,11 @@ jobs:
254270
file-pattern: vcpkg-x64-windows-*-${{ env.file }}
255271
subdirectory: windows
256272

273+
- uses: ./.github/actions/manifest-setup
274+
with:
275+
file-pattern: vcpkg-arm64-osx-*-${{ env.file }}
276+
subdirectory: macos
277+
257278
- name: Generate commit message
258279
env:
259280
GH_TOKEN: ${{ github.token }}
@@ -271,6 +292,7 @@ jobs:
271292
run: |
272293
git checkout -b vcpkg-${{ github.sha }}
273294
git add windows/vcpkg-*-manifest.txt
295+
git add macos/vcpkg-*-manifest.txt
274296
git commit -F commit_message.txt
275297
276298
- name: Verify commit to openmw-deps repository

0 commit comments

Comments
 (0)