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

74 lines
2.4 KiB
YAML
Raw Normal View History

2021-07-24 13:23:03 -07:00
name: Android
2020-07-02 19:30:53 -07:00
2023-11-25 17:36:24 -08:00
#on: [push,pull_request]
on: [workflow_dispatch]
2020-07-02 19:30:53 -07:00
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
2020-07-02 19:30:53 -07:00
with:
distribution: 'zulu'
2023-06-17 20:32:21 -07:00
java-version: '11'
2020-07-02 19:30:53 -07:00
2022-08-27 11:51:41 -07:00
- name: Install Tools
run: |
2023-02-25 15:07:31 -08:00
sudo bash misc/actions/add-ubuntu-latest-apt-mirrors.sh
sudo apt-get install mtools
2022-08-27 11:51:41 -07:00
- name: Generate Configs, Enums & Live Documentation
2022-08-27 11:26:31 -07:00
working-directory: ./firmware/
run: ./gen_default_everything.sh
2022-08-27 11:26:31 -07:00
2023-11-04 06:15:17 -07:00
- name: Test Java Compiler
2020-07-02 19:30:53 -07:00
run: javac -version
2022-03-12 21:25:10 -08:00
- name: Print GCC version
working-directory: .
run: gcc -v
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: |
2023-09-27 20:39:42 -07:00
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
2020-07-02 20:02:10 -07:00
- name: Upload APK - unsigned
if: ${{ github.event_name != 'push' }}
uses: actions/upload-artifact@v4
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