new build system, 111
full build wip troubleshoot fix env vars fix? fix??? unterminated quoted string.. troubleshoot aws upload test?
This commit is contained in:
parent
97a42e29b9
commit
1b00cfc372
5 changed files with 163 additions and 1 deletions
147
.github/workflows/deploy.yml
vendored
147
.github/workflows/deploy.yml
vendored
|
@ -1 +1,148 @@
|
|||
name: Publish Assets
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
pull_request:
|
||||
branches: [master]
|
||||
|
||||
jobs:
|
||||
build_arm64_aar:
|
||||
runs-on: ubuntu-latest
|
||||
container: lbry/android-base:python39
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: hacky copy # docker image runs ~ as /root, but github actions uses ~=/github/home
|
||||
run: |
|
||||
cp -r /root/.buildozer ~/.buildozer/
|
||||
- name: setup
|
||||
run: |
|
||||
export B_VERSION=$(cat $GITHUB_WORKSPACE/src/main/python/main.py | grep --color=never -oP '([0-9]+\.?)+')
|
||||
echo "NEXUS_SIGNING_KEYRING_FILE=$GITHUB_WORKSPACE/signing2.pgp" >> $GITHUB_ENV
|
||||
echo "BUILD_VERSION=${B_VERSION}" >> $GITHUB_ENV
|
||||
export PATH=/usr/bin:$PATH
|
||||
wget -q 'https://eu.crystax.net/download/crystax-ndk-10.3.2-linux-x86_64.tar.xz' -P ~/.buildozer/android/
|
||||
tar -xf ~/.buildozer/android/crystax-ndk-10.3.2-linux-x86_64.tar.xz -C ~/.buildozer/android/
|
||||
rm -rf ~/.buildozer/android/crystax-ndk-10.3.2/platforms/android-9
|
||||
ln -s ~/.buildozer/android/crystax-ndk-10.3.2/platforms/android-21 ~/.buildozer/android/crystax-ndk-10.3.2/platforms/android-9
|
||||
cp -f $GITHUB_WORKSPACE/scripts/build-target-python.sh ~/.buildozer/android/crystax-ndk-10.3.2/build/tools/build-target-python.sh
|
||||
cp -f $GITHUB_WORKSPACE/scripts/mangled-glibc-syscalls__arm64.h ~/.buildozer/android/crystax-ndk-10.3.2/platforms/android-21/arch-arm64/usr/include/crystax/bionic/libc/include/sys/mangled-glibc-syscalls.h
|
||||
cp -f $GITHUB_WORKSPACE/scripts/build-binary.mk ~/.buildozer/android/crystax-ndk-10.3.2/build/core/build-binary.mk
|
||||
rm -rf ~/.buildozer/android/crystax-ndk-10.3.2/sources/sqlite
|
||||
cp -Rf $GITHUB_WORKSPACE/scripts/crystax-sources/sqlite ~/.buildozer/android/crystax-ndk-10.3.2/sources/sqlite
|
||||
rm ~/.buildozer/android/crystax-ndk-10.3.2-linux-x86_64.tar.xz
|
||||
mv buildozer.spec.arm64.ci buildozer.spec
|
||||
chmod u+x ./build-release.sh
|
||||
- name: build release
|
||||
env:
|
||||
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
|
||||
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
|
||||
SONATYPE_STAGING_PROFILE_ID: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }}
|
||||
NEXUS_SIGNING_KEY_PASSWORD: ${{ secrets.NEXUS_SIGNING_KEY_PASSWORD }}
|
||||
NEXUS_SIGNING_KEY_ID: ${{ secrets.NEXUS_SIGNING_KEY_ID }}
|
||||
run: ./build-release.sh
|
||||
- name: debug bin
|
||||
run : ls -al ./bin
|
||||
- name: upload to build_lbry_io
|
||||
run : |
|
||||
pip install awscli
|
||||
export PR_NUMBER=${{ github.event.number }}
|
||||
|
||||
export BUILD_APK_FILENAME__64=lbrysdk-${{ env.BUILD_VERSION }}-arm64-v8a-release.aar
|
||||
aws s3 cp ./bin/${BUILD_APK_FILENAME__64} s3://build.lbry.io/android/sdk-build-${PR_NUMBER}_commit-${{ github.sha }}/${BUILD_APK_FILENAME__64}
|
||||
env:
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
|
||||
- name: github release
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
run: |
|
||||
pip install githubrelease
|
||||
export GITHUB_TOKEN=${{ github.token }}
|
||||
githubrelease release lbryio/lbry-android-sdk create ${{ github.ref_name }} --publish bin/${BUILD_APK_FILENAME__64}
|
||||
|
||||
build_arm_aar:
|
||||
runs-on: ubuntu-latest
|
||||
container: lbry/android-base:python39
|
||||
needs: [build_arm64_aar]
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: hacky copy # docker image runs ~ as /root, but github actions uses ~=/github/home
|
||||
run: |
|
||||
cp -r /root/.buildozer ~/.buildozer/
|
||||
- name: setup
|
||||
run: |
|
||||
export B_VERSION=$(cat $GITHUB_WORKSPACE/src/main/python/main.py | grep --color=never -oP '([0-9]+\.?)+')
|
||||
echo "BUILD_VERSION=${B_VERSION}" >> $GITHUB_ENV
|
||||
echo "NEXUS_SIGNING_KEYRING_FILE=$GITHUB_WORKSPACE/signing2.pgp" >> $GITHUB_ENV
|
||||
export PATH=/usr/bin:$PATH
|
||||
wget -q 'https://eu.crystax.net/download/crystax-ndk-10.3.2-linux-x86_64.tar.xz' -P ~/.buildozer/android/
|
||||
tar -xf ~/.buildozer/android/crystax-ndk-10.3.2-linux-x86_64.tar.xz -C ~/.buildozer/android/
|
||||
rm -rf ~/.buildozer/android/crystax-ndk-10.3.2/platforms/android-9
|
||||
ln -s ~/.buildozer/android/crystax-ndk-10.3.2/platforms/android-21 ~/.buildozer/android/crystax-ndk-10.3.2/platforms/android-9
|
||||
cp -f $GITHUB_WORKSPACE/p4a/pythonforandroid/bootstraps/lbry/build/templates/build.tmpl.gradle.arm $GITHUB_WORKSPACE/p4a/pythonforandroid/bootstraps/lbry/build/templates/build.tmpl.gradle
|
||||
cp -f $GITHUB_WORKSPACE/scripts/build-target-python.sh ~/.buildozer/android/crystax-ndk-10.3.2/build/tools/build-target-python.sh
|
||||
cp -f $GITHUB_WORKSPACE/scripts/mangled-glibc-syscalls.h ~/.buildozer/android/crystax-ndk-10.3.2/platforms/android-21/arch-arm/usr/include/crystax/bionic/libc/include/sys/mangled-glibc-syscalls.h
|
||||
cp -f $GITHUB_WORKSPACE/scripts/build-binary.mk ~/.buildozer/android/crystax-ndk-10.3.2/build/core/build-binary.mk
|
||||
rm -rf ~/.buildozer/android/crystax-ndk-10.3.2/sources/sqlite
|
||||
cp -Rf $GITHUB_WORKSPACE/scripts/crystax-sources/sqlite ~/.buildozer/android/crystax-ndk-10.3.2/sources/sqlite
|
||||
rm ~/.buildozer/android/crystax-ndk-10.3.2-linux-x86_64.tar.xz
|
||||
mv buildozer.spec.arm64.ci buildozer.spec
|
||||
chmod u+x ./build-release.sh
|
||||
- name: build release
|
||||
env:
|
||||
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
|
||||
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
|
||||
SONATYPE_STAGING_PROFILE_ID: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }}
|
||||
NEXUS_SIGNING_KEY_PASSWORD: ${{ secrets.NEXUS_SIGNING_KEY_PASSWORD }}
|
||||
NEXUS_SIGNING_KEY_ID: ${{ secrets.NEXUS_SIGNING_KEY_ID }}
|
||||
run: ./build-release.sh
|
||||
- name: upload to build_lbry_io
|
||||
run : |
|
||||
pip install awscli
|
||||
export PR_NUMBER=${{ github.event.number }}
|
||||
export BUILD_APK_FILENAME__32=lbrysdk-${{ env.BUILD_VERSION }}-armeabi-v7a-release.aar
|
||||
aws s3 cp bin/${BUILD_APK_FILENAME__32} s3://build.lbry.io/android/sdk-build-{$PR_NUMBER}_commit-${{ github.sha }}/${BUILD_APK_FILENAME__32}
|
||||
env:
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
|
||||
- name: github upload binary
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
uses: skx/github-action-publish-binaries@release-1.3
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
BUILD_VERSION: ${{ env.BUILD_VERSION }}
|
||||
with:
|
||||
args: bin/${BUILD_APK_FILENAME__32}
|
||||
# deploy_build_lbry_io:
|
||||
# runs-on: ubuntu-latest
|
||||
# container: lbry/android-base:python39
|
||||
# needs: [build_arm64_aar, build_arm_aar]
|
||||
# steps:
|
||||
# - name: dependencies
|
||||
# run: |
|
||||
# pip install awscli
|
||||
# export PR_NUMBER=${{ github.event.number }}
|
||||
# export BUILD_VERSION=$(cat $GITHUB_WORKSPACE/src/main/python/main.py | grep --color=never -oP '([0-9]+\.?)+')
|
||||
# export BUILD_APK_FILENAME__32=lbrysdk-${{ BUILD_VERSION }}-armeabi-v7a-release.aar
|
||||
# export BUILD_APK_FILENAME__64=lbrysdk-${{ BUILD_VERSION }}-arm64-v8a-release.aar
|
||||
# - name: upload
|
||||
# run: |
|
||||
# aws s3 cp bin/${{ BUILD_APK_FILENAME__64 }} s3://build.lbry.io/android/sdk-build-${{ PR_NUMBER }}_commit-${{ github.sha }}/${{ BUILD_APK_FILENAME__64 }}
|
||||
# aws s3 cp bin/${{ BUILD_APK_FILENAME__32 }} s3://build.lbry.io/android/sdk-build-${{ PR_NUMBER }}_commit-${{ github.sha }}/${{ BUILD_APK_FILENAME__32 }}
|
||||
|
||||
# release_aar:
|
||||
# runs-on: ubuntu-latest
|
||||
# container: python:latest
|
||||
# needs: [build_arm64_aar, build_arm_aar]
|
||||
# steps:
|
||||
# - name: dependencies
|
||||
# run: |
|
||||
# pip install awscli githubrelease
|
||||
# export BUILD_VERSION=$(cat $GITHUB_WORKSPACE/src/main/python/main.py | grep --color=never -oP '([0-9]+\.?)+')
|
||||
# export BUILD_APK_FILENAME__32=lbrysdk-${{ BUILD_VERSION }}-armeabi-v7a-release.aar
|
||||
# export BUILD_APK_FILENAME__64=lbrysdk-${{ BUILD_VERSION }}-arm64-v8a-release.aar
|
||||
# - name: release
|
||||
|
|
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -11,6 +11,7 @@ src/main/assets/index.android.bundle
|
|||
src/main/assets/index.android.bundle.meta
|
||||
*.log
|
||||
.vagrant
|
||||
.vscode
|
||||
|
||||
lbry-android.keystore
|
||||
p4a/pythonforandroid/bootstraps/lbry/build/templates/google-services.json
|
||||
|
|
14
BUILD.md
14
BUILD.md
|
@ -135,3 +135,17 @@ If you already installed `Android SDK` and `adb`
|
|||
Note: You need to have your device connected with USB debugging.
|
||||
|
||||
Once the bundler is ready, run the LBRY Browser app on your device and then shake the device violently until you see the React Native dev menu. You can enable "Live Reloading" and "Hot Reloading" from this menu, so any changes you make to the React Native code will be visible as you save. This will only reload React Native Javascript files. Native Java code needs to be redeployed by running the command `./deploy.sh`
|
||||
|
||||
## Update LBRY SDK Version
|
||||
|
||||
### Update the `requirements` section following files
|
||||
* buildozer.spec.arm.ci
|
||||
* buildozer.spec.arm64.ci
|
||||
* buildozer.spec.sample
|
||||
* buildozer.spec.vagrant
|
||||
|
||||
### Update LBRY_SDK_VERSION in `src/main/java/io/lbry/lbrysdk/LbrynetService.java`
|
||||
|
||||
### Update the version in `src/main/python/main.py`
|
||||
|
||||
## Github Actions CI
|
BIN
signing2.pgp
Normal file
BIN
signing2.pgp
Normal file
Binary file not shown.
|
@ -1,5 +1,5 @@
|
|||
# going forward, this should match sdk version
|
||||
__version__ = "0.102.0"
|
||||
__version__ = "0.111.0"
|
||||
|
||||
class ServiceApp(App):
|
||||
def build(self):
|
||||
|
|
Loading…
Reference in a new issue