|
9 | 9 |
|
10 | 10 | jobs: |
11 | 11 | build: |
12 | | - name: ${{ matrix.name }} |
| 12 | + name: ${{ startsWith(matrix.os, 'macos-') && 'macOS' || 'Linux' }}-NDK-${{ matrix.ndk }} |
13 | 13 | runs-on: ${{ matrix.os }} |
14 | 14 | # don't run pull requests from local branches twice |
15 | 15 | if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository |
16 | 16 |
|
17 | 17 | strategy: |
18 | 18 | fail-fast: false |
19 | 19 | matrix: |
20 | | - include: |
21 | | - - name: macOS |
22 | | - os: macos-latest |
23 | | - android-dir: Library/Android |
24 | | - - name: Linux |
25 | | - os: ubuntu-latest |
26 | | - android-dir: Android |
| 20 | + os: [ macos-latest, ubuntu-latest ] |
| 21 | + ndk: [ r25c, r26d, r27c ] |
| 22 | + |
| 23 | + env: |
| 24 | + ANDROID_DIR: ${{ startsWith(matrix.os, 'macos-') && 'Library/Android' || 'Android' }} |
27 | 25 |
|
28 | 26 | steps: |
29 | 27 | - uses: actions/checkout@v3 |
| 28 | + |
| 29 | + - uses: nttld/setup-ndk@v1 |
| 30 | + id: setup-ndk |
| 31 | + with: |
| 32 | + ndk-version: ${{ matrix.ndk }} |
| 33 | + link-to-sdk: true |
30 | 34 |
|
31 | 35 | - name: Install packages |
32 | 36 | run: | |
@@ -54,17 +58,17 @@ jobs: |
54 | 58 | env: |
55 | 59 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
56 | 60 | run: | |
57 | | - ./build.sh --ndk $ANDROID_NDK_LATEST_HOME --dist-root HOME/${{matrix.android-dir}}/GNUstep |
| 61 | + ./build.sh --ndk $ANDROID_HOME/ndk/${{steps.setup-ndk.outputs.ndk-full-version}} --dist-root HOME/${{env.ANDROID_DIR}}/GNUstep |
58 | 62 |
|
59 | 63 | - name: Package build |
60 | 64 | run: | |
61 | | - tar -a -cf GNUstep-Android-${{matrix.name}}.tar.xz -C$HOME/${{matrix.android-dir}} GNUstep |
| 65 | + tar -a -cf GNUstep-Android-NDK-${{matrix.ndk}}-${{runner.os}}.tar.xz -C$HOME/${{env.ANDROID_DIR}} GNUstep |
62 | 66 |
|
63 | 67 | - name: Upload build artifact |
64 | 68 | uses: actions/upload-artifact@v4 |
65 | 69 | with: |
66 | | - path: GNUstep-Android-${{matrix.name}}.tar.xz |
67 | | - name: GNUstep-Android-${{matrix.name}} |
| 70 | + path: GNUstep-Android-NDK-${{matrix.ndk}}-${{runner.os}}.tar.xz |
| 71 | + name: GNUstep-Android-NDK-${{matrix.ndk}}-${{runner.os}} |
68 | 72 |
|
69 | 73 | prerelease: |
70 | 74 | needs: build |
|
0 commit comments