Skip to content

Commit ecb0b72

Browse files
committed
CI: build for all recent NDK versions
1 parent 4094d39 commit ecb0b72

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

.github/workflows/ci.yml

+14-12
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,26 @@ on:
99

1010
jobs:
1111
build:
12-
name: ${{ matrix.name }}
12+
name: ${{ startsWith(matrix.os, 'macos-') && 'macOS' || 'Linux' }}-${{ matrix.ndk }}
1313
runs-on: ${{ matrix.os }}
1414
# don't run pull requests from local branches twice
1515
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository
1616

1717
strategy:
1818
fail-fast: false
1919
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' }}
2725

2826
steps:
2927
- uses: actions/checkout@v3
28+
29+
- uses: nttld/setup-ndk@v1
30+
with:
31+
ndk-version: ${{ matrix.ndk }}
3032

3133
- name: Install packages
3234
run: |
@@ -54,17 +56,17 @@ jobs:
5456
env:
5557
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5658
run: |
57-
./build.sh --ndk $ANDROID_NDK_LATEST_HOME --dist-root HOME/${{matrix.android-dir}}/GNUstep
59+
./build.sh --ndk ${{ steps.setup-ndk.outputs.ndk-path }} --dist-root HOME/${{env.ANDROID_DIR}}/GNUstep
5860
5961
- name: Package build
6062
run: |
61-
tar -a -cf GNUstep-Android-${{matrix.name}}.tar.xz -C$HOME/${{matrix.android-dir}} GNUstep
63+
tar -a -cf GNUstep-Android-${{runner.os}}-${{matrix.ndk}}.tar.xz -C$HOME/${{env.ANDROID_DIR}} GNUstep
6264
6365
- name: Upload build artifact
6466
uses: actions/upload-artifact@v4
6567
with:
66-
path: GNUstep-Android-${{matrix.name}}.tar.xz
67-
name: GNUstep-Android-${{matrix.name}}
68+
path: GNUstep-Android-${{runner.os}}-${{matrix.ndk}}.tar.xz
69+
name: GNUstep-Android-${{runner.os}}-${{matrix.ndk}}
6870

6971
prerelease:
7072
needs: build

0 commit comments

Comments
 (0)