1+ name : Test Build
2+
3+ on : [push, pull_request]
4+ # on:
5+ # push:
6+ # tags:
7+ # - '*'
8+
9+ jobs :
10+ build_and_upload :
11+ name : Build and upload
12+ strategy :
13+ fail-fast : false
14+ matrix :
15+ include :
16+ - os : ubuntu-latest
17+ artifact_name : libLabSoundBridge_android_arm64-v8a.so
18+ script : build_android.sh arm64-v8a
19+ - os : ubuntu-latest
20+ artifact_name : libLabSoundBridge_android_armeabi-v7a.so
21+ script : build_android.sh armeabi-v7a
22+ - os : ubuntu-latest
23+ artifact_name : libLabSoundBridge_android_x86_64.so
24+ script : build_android.sh x86_64
25+ - os : ubuntu-latest
26+ artifact_name : libLabSoundBridge_android_x86.so
27+ script : build_android.sh x86
28+ - os : macos-latest
29+ artifact_name : LabSoundBridge_ios.tar.gz
30+ script : build_ios.sh
31+ - os : ubuntu-latest
32+ artifact_name : libLabSoundBridge_linux_x64.so
33+ script : build_linux.sh
34+ # - os: macos-11
35+ # artifact_name: LabSoundBridge_macos_arm64.tar.gz
36+ # script: build_mac.sh
37+ - os : macos-latest
38+ artifact_name : LabSoundBridge_macos_x64.tar.gz
39+ script : build_mac.sh
40+ - os : windows-latest
41+ artifact_name : LabSoundBridge_windows_x64.dll
42+ script : build_windows.sh
43+ runs-on : ${{ matrix.os }}
44+ steps :
45+ - uses : actions/checkout@v2
46+ with :
47+ submodules : recursive
48+ - uses : nttld/setup-ndk@v1
49+ id : setup-ndk
50+ if : matrix.os == 'ubuntu-latest'
51+ with :
52+ ndk-version : r21e
53+ - name : Build
54+ run : bash tools/${{ matrix.script }}
55+ env :
56+ MACOS_CERTIFICATE : ${{ secrets.MACOS_CERTIFICATE }}
57+ MACOS_CERTIFICATE_PWD : ${{ secrets.MACOS_CERTIFICATE_PWD }}
58+ ANDROID_NDK_HOME : ${{ steps.setup-ndk.outputs.ndk-path }}
59+
60+ - uses : actions/upload-artifact@v2
61+ with :
62+ name : ${{ matrix.artifact_name }}
63+ path : ${{ matrix.artifact_name }}
64+
65+ - name : Upload binary
66+ uses : svenstaro/upload-release-action@v1-release
67+ with :
68+ repo_token : ${{ secrets.GITHUB_TOKEN }}
69+ file : ./${{ matrix.artifact_name }}
70+ asset_name : ${{ matrix.artifact_name }}
71+ tag : ${{ github.ref }}
0 commit comments