2020-06-18 14:06:03 -07:00
|
|
|
name: rusEFI console
|
2020-05-24 08:25:32 -07:00
|
|
|
|
|
|
|
on: [push,pull_request]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
2022-07-27 02:47:07 -07:00
|
|
|
- uses: actions/checkout@v3
|
2021-11-25 07:27:03 -08:00
|
|
|
with:
|
|
|
|
submodules: recursive
|
2021-11-06 21:46:18 -07:00
|
|
|
|
2022-07-28 01:00:13 -07:00
|
|
|
- uses: actions/setup-java@v3
|
2020-05-24 10:36:58 -07:00
|
|
|
with:
|
2022-07-28 01:00:13 -07:00
|
|
|
distribution: 'zulu'
|
2020-05-24 10:36:58 -07:00
|
|
|
java-version: '8'
|
2020-05-24 08:25:32 -07:00
|
|
|
|
2020-05-24 08:28:28 -07:00
|
|
|
- name: Test Compiler
|
|
|
|
run: javac -version
|
|
|
|
|
2020-07-17 21:13:15 -07:00
|
|
|
- name: Install Tools
|
2023-01-13 02:35:59 -08:00
|
|
|
run: |
|
|
|
|
sudo gem install apt-spy2 && sudo time apt-spy2 fix --commit
|
|
|
|
sudo apt-get -o Acquire::Retries=3 update
|
|
|
|
sudo apt-get install sshpass mtools
|
2020-07-17 21:13:15 -07:00
|
|
|
|
2022-08-31 17:53:17 -07:00
|
|
|
- name: Generate Configs, Enums & Live Documentation
|
2022-08-27 11:26:31 -07:00
|
|
|
working-directory: ./firmware/
|
2022-08-31 17:53:17 -07:00
|
|
|
run: ./gen_default_everything.sh
|
2022-08-29 18:00:29 -07:00
|
|
|
|
2021-06-24 22:07:36 -07:00
|
|
|
- name: Generate Java (Antlr)
|
2022-10-15 08:29:58 -07:00
|
|
|
working-directory: ./java_tools
|
2022-07-28 12:04:52 -07:00
|
|
|
run: ./gradlew :config_definition:generateGrammarSource
|
2021-06-24 22:07:36 -07:00
|
|
|
|
2022-02-28 20:50:25 -08:00
|
|
|
- name: Print GCC version
|
|
|
|
working-directory: .
|
|
|
|
run: gcc -v
|
|
|
|
|
2022-03-12 21:25:10 -08:00
|
|
|
- name: Build Native Unit Tests as shared library
|
2022-02-28 20:50:25 -08:00
|
|
|
working-directory: ./unit_tests/
|
2022-07-26 23:22:22 -07:00
|
|
|
# we have a unit test of JNI thus we need to build shared library
|
|
|
|
run: make -j4 SANITIZE=no build/lib_rusefi_test
|
2022-02-28 20:50:25 -08:00
|
|
|
|
2021-11-24 10:21:03 -08:00
|
|
|
- name: Test console
|
|
|
|
# at the moment 'jar' task does not depend on tests?! maybe because tests take some time?
|
2023-01-14 02:44:04 -08:00
|
|
|
working-directory: ./java_tools
|
|
|
|
run: ./gradlew test
|
2021-11-24 10:21:03 -08:00
|
|
|
|
2020-05-24 08:28:28 -07:00
|
|
|
- name: Build console
|
2020-05-24 08:25:32 -07:00
|
|
|
working-directory: ./java_console
|
2022-10-15 15:20:54 -07:00
|
|
|
run: ant jar
|
2020-07-07 21:41:16 -07:00
|
|
|
|
2020-07-17 20:44:58 -07:00
|
|
|
- name: Attach console junit results
|
2020-07-07 21:45:00 -07:00
|
|
|
if: always()
|
2022-07-27 10:10:58 -07:00
|
|
|
uses: actions/upload-artifact@v3
|
2020-07-07 21:41:16 -07:00
|
|
|
with:
|
|
|
|
name: console junit
|
2020-07-07 21:52:03 -07:00
|
|
|
path: ./java_console/build/*.txt
|
2020-07-17 20:44:58 -07:00
|
|
|
|
2022-08-15 17:59:07 -07:00
|
|
|
- name: Configuration Definition CI, without pushing new .jar
|
2022-10-15 10:22:07 -07:00
|
|
|
working-directory: ./java_tools
|
2022-08-15 17:59:07 -07:00
|
|
|
run: ./gradlew :config_definition:shadowJar
|
|
|
|
|
2022-10-15 10:22:07 -07:00
|
|
|
- name: Test everything java_tools gradle while we are here
|
|
|
|
working-directory: ./java_tools
|
2022-08-15 17:59:07 -07:00
|
|
|
run: ./gradlew test
|
|
|
|
|
|
|
|
- name: Configuration Definition and other tools CI, without pushing new .jars
|
2022-10-15 10:22:07 -07:00
|
|
|
working-directory: ./java_tools
|
2022-08-15 17:59:07 -07:00
|
|
|
run: ./gradlew shadowJar
|
|
|
|
|
2022-08-27 11:26:31 -07:00
|
|
|
# this job focuses of tool validation so we do not push fresh enums here
|
|
|
|
- name: Generate Enums using freshly compiled tool
|
2022-08-15 17:59:07 -07:00
|
|
|
working-directory: ./firmware/
|
|
|
|
run: ./gen_enum_to_string.sh
|
|
|
|
|
2020-07-17 21:13:15 -07:00
|
|
|
- name: Upload rusEFI server
|
2020-08-15 20:58:29 -07:00
|
|
|
working-directory: .
|
2021-12-22 17:31:44 -08:00
|
|
|
run: java_console/upload_file.sh ${{ secrets.RUSEFI_SSH_USER }} ${{ secrets.RUSEFI_SSH_PASS }} ${{ secrets.RUSEFI_SSH_SERVER }} build_server/autoupdate java_console_binary/rusefi_server.jar
|