Skip to content

Commit

Permalink
test action
Browse files Browse the repository at this point in the history
  • Loading branch information
xioxin committed Mar 11, 2022
1 parent 97147d7 commit be722a2
Showing 1 changed file with 71 additions and 0 deletions.
71 changes: 71 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -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 }}

0 comments on commit be722a2

Please sign in to comment.