rusefi-1/.github/workflows/build-android.yaml

62 lines
1.9 KiB
YAML
Raw Normal View History

2021-07-24 13:23:03 -07:00
name: Android
2020-07-02 19:30:53 -07:00
on: [push,pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
2020-07-02 19:30:53 -07:00
with:
submodules: recursive
- uses: actions/setup-java@v3
2020-07-02 19:30:53 -07:00
with:
distribution: 'zulu'
2020-07-02 19:30:53 -07:00
java-version: '8'
- name: Test Compiler
run: javac -version
2022-03-12 21:25:10 -08:00
- name: Print GCC version
working-directory: .
run: gcc -v
- name: Build Native Unit Tests as shared library
working-directory: ./unit_tests/
# we have a unit test of JNI thus we need to build shared library
run: make -j4 SANITIZE=no build/lib_rusefi_test
2022-03-12 21:25:10 -08:00
2020-07-02 20:02:10 -07:00
- name: Build Android
env:
RUSEFI_ANDROID_KEYPASS: ${{ secrets.RUSEFI_ANDROID_KEYPASS }}
2020-07-02 19:30:53 -07:00
working-directory: ./android
run: |
if [ "${{github.event_name}}" == "push" ]; then
bash ./gradlew build
else
bash ./gradlew bundleDebug test
fi
- name: Upload APK - release
if: ${{ github.event_name == 'push' }}
uses: actions/upload-artifact@v3
with:
name: rusEFI-release
path: ./android/app/build/outputs/apk/release/rusEFI-release.apk
2020-07-02 20:02:10 -07:00
- name: Upload APK - unsigned
if: ${{ github.event_name != 'push' }}
uses: actions/upload-artifact@v3
2020-07-02 20:02:10 -07:00
with:
2020-07-02 20:10:25 -07:00
name: rusEFI-release-unsigned
path: ./android/app/build/outputs/bundle/debug/rusEFI-debug.aab
2020-08-15 20:58:29 -07:00
2020-08-15 21:02:38 -07:00
- name: Install Tools
run: sudo apt-get install sshpass
2020-08-15 21:02:38 -07:00
2020-08-15 20:58:29 -07:00
- name: Upload rusEFI Android application
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
2020-08-15 20:58:29 -07:00
working-directory: .
2021-12-22 17:25:28 -08:00
run: java_console/upload_file.sh ${{ secrets.RUSEFI_SSH_USER }} ${{ secrets.RUSEFI_SSH_PASS }} ${{ secrets.RUSEFI_SSH_SERVER }} build_server android/app/build/outputs/apk/release/rusEFI-release.apk