Skip to content

Commit

Permalink
Update actions
Browse files Browse the repository at this point in the history
  • Loading branch information
jing332 committed Aug 11, 2024
1 parent e300c0b commit 6ad9d99
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 19 deletions.
9 changes: 9 additions & 0 deletions .github/scripts/build_gojni.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

cd $GITHUB_WORKSPACE/lib-gojni/tts-server-lib

go install golang.org/x/mobile/cmd/gomobile
gomobile init
go get golang.org/x/mobile/bind
gomobile bind -ldflags "-s -w" -v -androidapi=21
mv -f *.aar ../libs
9 changes: 3 additions & 6 deletions .github/workflows/debug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,9 @@ jobs:

- name: Build tts-server-lib
run: |
cd tts-server-lib
go install golang.org/x/mobile/cmd/gomobile@latest
gomobile init
go get golang.org/x/mobile/bind
gomobile bind -ldflags "-s -w" -v -androidapi=19
cp -f *.aar $GITHUB_WORKSPACE/app/libs
cd $$GITHUB_WORKSPACE/.github/scripts
chmod +x *.sh
./build_gojni.sh
- uses: actions/upload-artifact@v3.1.0
with:
Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,9 @@ jobs:

- name: Build tts-server-lib
run: |
cd tts-server-lib
go install golang.org/x/mobile/cmd/gomobile
gomobile init
go get golang.org/x/mobile/bind
gomobile bind -ldflags "-s -w" -v -androidapi=21
cp -f *.aar $GITHUB_WORKSPACE/app/libs
cd $$GITHUB_WORKSPACE/.github/scripts
chmod +x *.sh
./build_gojni.sh
- uses: actions/upload-artifact@v3.1.0
with:
Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,9 @@ jobs:

- name: Build tts-server-lib
run: |
cd tts-server-lib
go install golang.org/x/mobile/cmd/gomobile
gomobile init
go get golang.org/x/mobile/bind
gomobile bind -ldflags "-s -w" -v -androidapi=21
cp -f *.aar $GITHUB_WORKSPACE/app/libs
cd $$GITHUB_WORKSPACE/.github/scripts
chmod +x *.sh
./build_gojni.sh
- uses: actions/upload-artifact@v3.1.0
with:
Expand Down
2 changes: 1 addition & 1 deletion lib-gojni/tts-server-lib/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -e

gomobile bind -v -androidapi=19
gomobile bind -v -androidapi=21

echo "Moving files to ../libs"
mv tts_server_lib.aar ../libs
Expand Down

0 comments on commit 6ad9d99

Please sign in to comment.