-
Notifications
You must be signed in to change notification settings - Fork 6
134 lines (111 loc) · 4.38 KB
/
build-firmware-explicit.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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
name: Firmware at GHA
on:
push:
pull_request:
workflow_dispatch:
jobs:
build-firmware:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
# Build machines don't have arm-none-eabi gcc, so let's download it and put it on the path
- name: Download & Install GCC
if: ${{ env.skip != 'true' }}
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
run: |
ext/rusefi/firmware/provide_gcc.sh
echo "::add-path::`pwd`/gcc-arm-none-eabi/bin"
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '11'
- name: Test Compiler
run: javac -version
- name: Install Tools
run: |
sudo bash ext/rusefi/misc/actions/add-ubuntu-latest-apt-mirrors.sh
sudo apt-get install sshpass sshpass mtools
- name: Removing other .ini files since we will be uploading
working-directory: ext/rusefi/
run: rm -rf firmware/tunerstudio/generated/*.ini
- name: Gen Config
working-directory: ext/rusefi/firmware
run: |
bash gen_config_board.sh ../../.. paralela
- name: Config Status
working-directory: ext/rusefi
run: |
git status
- name: Push Config
run: |
mkdir -p generated
cp ext/rusefi/firmware/controllers/generated/rusefi_generated.h generated
cp ext/rusefi/firmware/controllers/generated/signature_paralela.h generated
cp ext/rusefi/firmware/tunerstudio/generated/rusefi_paralela.ini generated
git config --local user.email "[email protected]"
git config --local user.name "GitHub git update Action"
git add generated/*
git commit -am "GHA Automation Snapshot just for reference"
git status
- name: Connectors Status
run: |
git status
- name: Push Connectors
run: |
git add connectors/*
OUT=$(git commit -am "GHA Connectors Generated" 2>&1) || echo "commit failed, finding out why"
if echo "$OUT" | grep 'nothing to commit'; then
echo "Connectors: looks like nothing to commit"
exit 0
fi
- name: Push
uses: ad-m/github-push-action@master
with:
github_token: ${{ github.token }}
- name: Upload .ini files to server
working-directory: ext/rusefi/firmware/tunerstudio/generated
run: ../upload_ini.sh rusefi_paralela.ini ${{ secrets.RUSEFI_ONLINE_FTP_USER }} ${{ secrets.RUSEFI_ONLINE_FTP_PASS }} ${{ secrets.RUSEFI_FTP_SERVER }}
- name: Build Firmware
working-directory: ext/rusefi
run: bash misc/jenkins/compile_other_versions/compile.sh ../../.. paralela
- name: Upload build bin artifact
uses: actions/upload-artifact@v3
with:
name: rusefi.bin
path: ext/rusefi/firmware/deliver/rusefi*.bin
- name: Upload build hex artifact
uses: actions/upload-artifact@v3
with:
name: rusefi.hex
path: ext/rusefi/firmware/deliver/rusefi*.hex
- name: Upload build map artifact
uses: actions/upload-artifact@v3
with:
name: rusefi.map
path: ext/rusefi/firmware/deliver/rusefi*.map
- name: Build console
working-directory: ext/rusefi/
run: bash misc/jenkins/build_java_console.sh
- name: Set SSH variables
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
run: |
if [ "${{github.event_name}}" = "push" ] && [ "${{github.ref}}" = "refs/heads/master" ]; then
echo "Setting credentials..."
echo "RUSEFI_SSH_SERVER=${{secrets.RUSEFI_SSH_SERVER}}" >> $GITHUB_ENV
echo "RUSEFI_SSH_USER=${{secrets.RUSEFI_SSH_USER}}" >> $GITHUB_ENV
echo "RUSEFI_SSH_PASS=${{secrets.RUSEFI_SSH_PASS}}" >> $GITHUB_ENV
else
echo "NOT setting credentials: ${{github.event_name}} ${{github.ref}}"
fi
- name: Package and Upload Bundle
working-directory: ext/rusefi/
run: bash misc/jenkins/compile_other_versions/prepare_bundle.sh paralela rusefi_paralela.ini master
- name: Upload bundle artifact
uses: actions/upload-artifact@v3
with:
name: rusefi_bundle_paralela.zip
path: ext/rusefi/artifacts/rusefi_bundle*.zip