From be722a23a94d15cb476c4ecba7adfebd1199defd Mon Sep 17 00:00:00 2001 From: xioxin Date: Sat, 12 Mar 2022 00:38:49 +0800 Subject: [PATCH] test action --- .github/workflows/test.yml | 71 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..ca5af7b --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,71 @@ +name: Test Build + +on: [push, pull_request] +# on: +# push: +# tags: +# - '*' + +jobs: + build_and_upload: + name: Build and upload + strategy: + fail-fast: false + matrix: + include: + - os: ubuntu-latest + artifact_name: libLabSoundBridge_android_arm64-v8a.so + script: build_android.sh arm64-v8a + - os: ubuntu-latest + artifact_name: libLabSoundBridge_android_armeabi-v7a.so + script: build_android.sh armeabi-v7a + - os: ubuntu-latest + artifact_name: libLabSoundBridge_android_x86_64.so + script: build_android.sh x86_64 + - os: ubuntu-latest + artifact_name: libLabSoundBridge_android_x86.so + script: build_android.sh x86 + - os: macos-latest + artifact_name: LabSoundBridge_ios.tar.gz + script: build_ios.sh + - os: ubuntu-latest + artifact_name: libLabSoundBridge_linux_x64.so + script: build_linux.sh + # - os: macos-11 + # artifact_name: LabSoundBridge_macos_arm64.tar.gz + # script: build_mac.sh + - os: macos-latest + artifact_name: LabSoundBridge_macos_x64.tar.gz + script: build_mac.sh + - os: windows-latest + artifact_name: LabSoundBridge_windows_x64.dll + script: build_windows.sh + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v2 + with: + submodules: recursive + - uses: nttld/setup-ndk@v1 + id: setup-ndk + if: matrix.os == 'ubuntu-latest' + with: + ndk-version: r21e + - name: Build + run: bash tools/${{ matrix.script }} + env: + MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }} + MACOS_CERTIFICATE_PWD: ${{ secrets.MACOS_CERTIFICATE_PWD }} + ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }} + + - uses: actions/upload-artifact@v2 + with: + name: ${{ matrix.artifact_name }} + path: ${{ matrix.artifact_name }} + + - name: Upload binary + uses: svenstaro/upload-release-action@v1-release + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: ./${{ matrix.artifact_name }} + asset_name: ${{ matrix.artifact_name }} + tag: ${{ github.ref }} \ No newline at end of file