forked from rusefi/rusefi
-
Notifications
You must be signed in to change notification settings - Fork 0
97 lines (77 loc) · 3.27 KB
/
build-rusEFI-console.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
name: rusEFI console
on: [push,pull_request]
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
git submodule update --init --depth=1 java_console/luaformatter
git submodule update --init --depth=1 java_console/peak-can-basic
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '11'
- name: Test Compiler
run: javac -version
- name: Install Tools
run: |
sudo bash misc/actions/add-ubuntu-latest-apt-mirrors.sh
sudo apt-get install sshpass mtools
- name: Build Config Definition Base and Enum to String
working-directory: ./java_tools/
run: |
./gradlew :config_definition_base:shadowJar
./gradlew :enum_to_string:shadowJar
- name: Generate Enums & Live Documentation
working-directory: ./firmware/
run: ./gen_live_documentation.sh
- name: Print GCC version
run: gcc -v
- name: Test console
# at the moment 'jar' task does not depend on tests?! maybe because tests take some time?
working-directory: ./java_tools
run: ./gradlew test
- name: Publish Gradle Test Report
uses: mikepenz/action-junit-report@v4
if: success() || failure() # always run even if the previous step fails
with:
report_paths: '**/build/test-results/test/TEST-*.xml'
detailed_summary: true
- name: Attach Gradle junit results
if: always()
uses: actions/upload-artifact@v4
with:
name: gradle junit
path: '**/build/test-results/test/TEST-*.xml'
- name: Build console
working-directory: ./java_tools
run: ./gradlew :ui:shadowJar
- name: Attach Ant console junit results
if: always()
uses: actions/upload-artifact@v4
with:
name: console junit
path: ./java_console/build/*.txt
- name: Configuration Definition CI, without pushing new .jar
working-directory: ./java_tools
run: ./gradlew :config_definition:shadowJar
- name: Test everything java_tools gradle while we are here
working-directory: ./java_tools
run: ./gradlew test
- name: Configuration Definition and other tools CI, without pushing new .jars
working-directory: ./java_tools
run: ./gradlew shadowJar
# this job focuses of tool validation so we do not push fresh enums here
- name: Generate Enums using freshly compiled tool
working-directory: ./firmware/
run: ./gen_enum_to_string.sh
- name: Upload rusEFI server
working-directory: .
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