74 lines
2.4 KiB
YAML
74 lines
2.4 KiB
YAML
name: Android
|
|
|
|
#on: [push,pull_request]
|
|
on: [workflow_dispatch]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Checkout Submodules
|
|
run: |
|
|
git submodule update --init --depth=1 unit_tests/googletest
|
|
git submodule update --init --depth=1 firmware/libfirmware
|
|
git submodule update --init --depth=1 firmware/ext/lua
|
|
git submodule update --init --depth=1 firmware/controllers/lua/luaaa
|
|
git submodule update --init --depth=1 firmware/controllers/can/wideband_firmware
|
|
|
|
- uses: actions/setup-java@v4
|
|
with:
|
|
distribution: 'zulu'
|
|
java-version: '17'
|
|
|
|
- name: Install Tools
|
|
run: |
|
|
sudo bash misc/actions/add-ubuntu-latest-apt-mirrors.sh
|
|
sudo apt-get install mtools
|
|
|
|
- name: Generate Configs, Enums & Live Documentation
|
|
working-directory: ./firmware/
|
|
run: ./gen_default_everything.sh
|
|
|
|
- name: Test Java Compiler
|
|
run: javac -version
|
|
|
|
- name: Print GCC version
|
|
working-directory: .
|
|
run: gcc -v
|
|
|
|
- name: Build Android
|
|
env:
|
|
RUSEFI_ANDROID_KEYPASS: ${{ secrets.RUSEFI_ANDROID_KEYPASS }}
|
|
working-directory: ./android
|
|
run: |
|
|
if [ "${{github.repository}}" == "rusefi/rusefi" && "${{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@v4
|
|
with:
|
|
name: rusEFI-release
|
|
path: ./android/app/build/outputs/apk/release/rusEFI-release.apk
|
|
|
|
- name: Upload APK - unsigned
|
|
if: ${{ github.event_name != 'push' }}
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: rusEFI-release-unsigned
|
|
path: ./android/app/build/outputs/bundle/debug/rusEFI-debug.aab
|
|
|
|
- name: Install Tools
|
|
run: sudo apt-get install sshpass
|
|
|
|
- name: Upload rusEFI Android application
|
|
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
|
|
working-directory: .
|
|
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
|