|
64 | 64 | arch: x86_64 |
65 | 65 | container: registry.gitlab.steamos.cloud/steamrt/sniper/sdk:latest |
66 | 66 | setup_env: gcc14 |
| 67 | + - os: macos-latest |
| 68 | + platform: osx-arm64 |
| 69 | + arch: arm64 |
| 70 | + container: null |
| 71 | + setup_env: clang |
67 | 72 | runs-on: ${{ matrix.os }} |
68 | 73 | container: ${{ matrix.container }} |
69 | 74 | steps: |
|
88 | 93 | ln -sf /usr/bin/gcc-14 /usr/bin/gcc && ln -sf /usr/bin/g++-14 /usr/bin/g++ |
89 | 94 | # for ACT add nodejs |
90 | 95 |
|
| 96 | + # macOS-specific setup |
| 97 | + - name: Setup macOS build environment |
| 98 | + if: matrix.setup_env == 'clang' |
| 99 | + shell: bash -el {0} |
| 100 | + run: | |
| 101 | + # Install ninja via homebrew if not present |
| 102 | + brew list ninja &>/dev/null || brew install ninja |
| 103 | +
|
91 | 104 | - name: Setup CMake |
92 | | - if: matrix.setup_env == 'msvc' |
| 105 | + if: matrix.setup_env == 'msvc' || matrix.setup_env == 'clang' |
93 | 106 | uses: lukka/get-cmake@latest |
94 | 107 |
|
95 | 108 | - name: Cache build dependencies |
@@ -145,6 +158,8 @@ jobs: |
145 | 158 | platform: win-64 |
146 | 159 | - os: ubuntu-latest |
147 | 160 | platform: linux-64 |
| 161 | + - os: macos-latest |
| 162 | + platform: osx-arm64 |
148 | 163 | runs-on: ${{ matrix.os }} |
149 | 164 | outputs: |
150 | 165 | url: ${{ steps.release.outputs.url }} |
@@ -185,8 +200,8 @@ jobs: |
185 | 200 | version="${version#v}" # Remove leading 'v' |
186 | 201 | sed "s/REPLACE_VERSION/$version/g" "conda/meta.yaml.example" > "conda/meta.yaml" |
187 | 202 |
|
188 | | - # Ensure build.sh is executable on Linux |
189 | | - if [[ "$RUNNER_OS" == "Linux" ]]; then |
| 203 | + # Ensure build.sh is executable on Unix systems |
| 204 | + if [[ "$RUNNER_OS" == "Linux" ]] || [[ "$RUNNER_OS" == "macOS" ]]; then |
190 | 205 | chmod +x "conda/build.sh" |
191 | 206 | fi |
192 | 207 |
|
@@ -266,18 +281,20 @@ jobs: |
266 | 281 | env: |
267 | 282 | GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
268 | 283 | run: | |
269 | | - mkdir -p build/repo/{linux-64,win-64,noarch} |
| 284 | + mkdir -p build/repo/{linux-64,win-64,osx-arm64,noarch} |
270 | 285 | gh api /repos/${{ github.repository }}/releases?per_page=10 \ |
271 | 286 | | jq -r '.[] | .assets[] | .browser_download_url' \ |
272 | 287 | | grep -E "(\.tar\.bz2|\.conda)$" > urls.txt |
273 | 288 | |
274 | 289 | # separate by platform |
275 | 290 | grep linux-64 urls.txt > linux.txt || true |
276 | 291 | grep win-64 urls.txt > win.txt || true |
| 292 | + grep osx-arm64 urls.txt > osx.txt || true |
277 | 293 | grep -v -E "(linux-64|win-64)" urls.txt > noarch.txt || true |
278 | 294 |
|
279 | 295 | [ -s linux.txt ] && aria2c -x4 -s4 -j4 -i linux.txt -d build/repo/linux-64/ --continue |
280 | 296 | [ -s win.txt ] && aria2c -x4 -s4 -j4 -i win.txt -d build/repo/win-64/ --continue |
| 297 | + [ -s osx.txt ] && aria2c -x4 -s4 -j4 -i osx.txt -d build/repo/osx-arm64/ --continue |
281 | 298 | [ -s noarch.txt ]&& aria2c -x4 -s4 -j4 -i noarch.txt -d build/repo/noarch/ --continue |
282 | 299 |
|
283 | 300 | - name: Download conda packages |
@@ -354,6 +371,7 @@ jobs: |
354 | 371 | <div class="platforms"> |
355 | 372 | <a href="linux-64/" class="platform-link">🐧 Linux (64-bit)</a> |
356 | 373 | <a href="win-64/" class="platform-link">🪟 Windows (64-bit)</a> |
| 374 | + <a href="osx-arm64/" class="platform-link">🍎 macOS (ARM64)</a> |
357 | 375 | <a href="noarch/" class="platform-link">📦 NoArch</a> |
358 | 376 | </div> |
359 | 377 | </div> |
|
0 commit comments