Skip to content

Commit f3a67d8

Browse files
committed
GitHub: Added MacOS build to CI.
1 parent 6b625da commit f3a67d8

File tree

1 file changed

+50
-2
lines changed

1 file changed

+50
-2
lines changed

.github/workflows/build.yaml

Lines changed: 50 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ jobs:
2828
- name: Install Dependencies
2929
run: |
3030
sudo apt-get update -q
31-
sudo apt-get install -q -y ${{ matrix.cc }} make tar wget
32-
wget -O premake5.tar.gz ${{ env.PREMAKE_INSTALL_URL }}
31+
sudo apt-get install -q -y ${{ matrix.cc }} curl make tar
32+
curl -Lo premake5.tar.gz ${{ env.PREMAKE_INSTALL_URL }}
3333
tar -xf ./premake5.tar.gz
3434
- name: Generate Project Files
3535
run: |
@@ -54,6 +54,54 @@ jobs:
5454
name: ${{ env.ARTIFACT_NAME }}
5555
path: artifact
5656
if-no-files-found: error
57+
58+
macosx:
59+
runs-on: macos-latest
60+
strategy:
61+
matrix:
62+
arch: [ arm64 ]
63+
cc: [ clang ]
64+
config: [ debug ]
65+
66+
env:
67+
PREMAKE_INSTALL_URL: https://github.com/premake/premake-core/releases/download/v5.0.0-beta7/premake-5.0.0-beta7-macosx.tar.gz
68+
ARTIFACT_NAME: pulsar-macosx_${{ matrix.arch }}-${{ matrix.cc }}_${{ matrix.config }}
69+
ARTIFACT_UPLOAD: ${{ matrix.config == 'debug' && 'yes' || 'no' }}
70+
71+
steps:
72+
- name: Checkout
73+
uses: actions/checkout@v4
74+
with:
75+
submodules: recursive
76+
- name: Install Dependencies
77+
run: |
78+
brew install make
79+
curl -Lo premake5.tar.gz ${{ env.PREMAKE_INSTALL_URL }}
80+
gtar -xf ./premake5.tar.gz
81+
- name: Generate Project Files
82+
run: |
83+
./premake5 --arch=${{ matrix.arch }} --cc=${{ matrix.cc }} gmake
84+
- name: Build
85+
run: |
86+
make -j config?=${{ matrix.config }} pulsar pulsar-lsp pulsar-tools
87+
- name: Prepare Artifact
88+
if: env.ARTIFACT_UPLOAD == 'yes'
89+
env:
90+
PREMAKE_BUILD: macosx_${{ matrix.arch }}/${{ matrix.config == 'debug' && 'Debug' || 'Release' }}
91+
run: |
92+
mkdir -p artifact/${{ env.ARTIFACT_NAME }}/
93+
cp LICENSE.md artifact/${{ env.ARTIFACT_NAME }}/
94+
cp -R resources/** artifact/${{ env.ARTIFACT_NAME }}/
95+
cp build/pulsar-lsp/${{ env.PREMAKE_BUILD }}/pulsar-lsp artifact/${{ env.ARTIFACT_NAME }}/
96+
cp build/pulsar-tools/${{ env.PREMAKE_BUILD }}/pulsar-tools artifact/${{ env.ARTIFACT_NAME }}/
97+
- name: Upload Artifact
98+
if: env.ARTIFACT_UPLOAD == 'yes'
99+
uses: actions/upload-artifact@v4
100+
with:
101+
name: ${{ env.ARTIFACT_NAME }}
102+
path: artifact
103+
if-no-files-found: error
104+
57105
windows:
58106
runs-on: windows-latest
59107
strategy:

0 commit comments

Comments
 (0)