mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-29 02:07:39 +08:00
CI: Download the NDK libs
Now I can finally push all these changes, as the CI should also run and we're ready to try out the new version of the app which uses libgit2 instead of jgit. Hopefully no user will notice anything different.
This commit is contained in:
@ -5,6 +5,9 @@ jobs:
|
||||
- image: vhanda/flutter-android:latest
|
||||
steps:
|
||||
- checkout
|
||||
- run:
|
||||
name: Get NDK Libraries
|
||||
command: ./scripts/install_ndk_libs.sh
|
||||
- run:
|
||||
name: Test
|
||||
command: flutter test
|
||||
|
23
scripts/install_ndk_libs.sh
Executable file
23
scripts/install_ndk_libs.sh
Executable file
@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eux
|
||||
|
||||
cd "$(dirname "$0")"/../android/app
|
||||
|
||||
BUILD_NUM=$(curl -s 'https://circleci.com/api/v1.1/project/github/GitJournal/ndk-libraries?limit=1&offset=0&filter=succeeded' | jq .[0] | jq -r .build_num)
|
||||
echo "CircleCI Buld Number: $BUILD_NUM"
|
||||
|
||||
URL=$(curl -s https://circleci.com/api/v1.1/project/github/GitJournal/ndk-libraries/$BUILD_NUM/artifacts | grep -o 'https://[^"]*libs.tar')
|
||||
|
||||
echo "Downloading $URL"
|
||||
|
||||
curl "$URL" -o "libs.tar"
|
||||
rm -rf libs
|
||||
tar xf libs.tar
|
||||
mv libs ci_libs
|
||||
mkdir libs
|
||||
cp -r ci_libs/openssl-lib/* libs/
|
||||
cp -r ci_libs/libssh2/* libs/
|
||||
cp -r ci_libs/libgit2/* libs/
|
||||
rm -rf ci_libs
|
||||
rm libs.tar
|
Reference in New Issue
Block a user