-
Notifications
You must be signed in to change notification settings - Fork 535
230 lines (191 loc) · 10.7 KB
/
deploy.yml
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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
name: Build and and deploy firmware
on:
workflow_dispatch:
inputs:
target:
description: "Deployment target"
required: true
default: "dev"
type: choice
options:
- dev
- unstable-3.5
- stable-3.5
version:
description: "Version"
required: true
type: string
jobs:
build:
runs-on: ubuntu-22.04
steps:
- name: "Check out CANlib"
uses: actions/checkout@v3
with:
repository: "Duet3D/CANlib"
ref: "3.5-dev"
path: "./CANlib"
- name: "Check out CoreN2G"
uses: actions/checkout@v3
with:
repository: "Duet3D/CoreN2G"
ref: "3.5-dev"
path: "./CoreN2G"
- name: "Check out Duet3Bootloader"
uses: actions/checkout@v3
with:
repository: "Duet3D/Duet3Bootloader"
ref: "dev"
path: "./Duet3Bootloader"
- name: "Check out Duet3Expansion"
uses: actions/checkout@v3
with:
repository: "Duet3D/Duet3Expansion"
ref: "3.5-dev"
path: "./Duet3Expansion"
- name: "Check out DuetWiFiSocketServer"
uses: actions/checkout@v3
with:
repository: "Duet3D/DuetWiFiSocketServer"
ref: "dev"
path: "./DuetWiFiSocketServer"
- name: "Check out FreeRTOS"
uses: actions/checkout@v3
with:
repository: "Duet3D/FreeRTOS"
ref: "3.5-dev"
path: "./FreeRTOS"
- name: "Check out Qfplib-M0-full"
uses: actions/checkout@v3
with:
repository: "Duet3D/Qfplib-M0-full"
ref: "master"
path: "./Qfplib-M0-full"
- name: "Check out RepRapFirmware"
uses: actions/checkout@v3
with:
repository: "Duet3D/RepRapFirmware"
ref: "3.5-dev"
path: "./RepRapFirmware"
- name: "Check out RRFLibraries"
uses: actions/checkout@v3
with:
repository: "Duet3D/RRFLibraries"
ref: "3.5-dev"
path: "./RRFLibraries"
- name: "Prepare CrcAppender"
env:
GH_TOKEN: ${{ github.token }}
run: |
gh release download -R Duet3D/CrcAppender --pattern "CrcAppender-linux-x64"
chmod +x ./CrcAppender-linux-x64
sudo mv ./CrcAppender-linux-x64 /usr/bin/CrcAppender
- name: "Adjust versions"
run: |
sed -i "s/# define MAIN_VERSION.\+/# define MAIN_VERSION \"${{ inputs.version }}\"/g" ./RepRapFirmware/src/Version.h
sed -i "s/#define VERSION.\+/#define VERSION \"${{ inputs.version }}\"/g" ./Duet3Expansion/src/Version.h
- name: "Set up Eclipse-CDT"
run: |
sudo apt-get update -y
sudo apt-get install -y libarchive-tools default-jre
curl -L -O "https://pkg.duet3d.com/eclipse-cpp-2023-09-R-linux-gtk-x86_64.tar.gz"
sudo bsdtar -x -f ./eclipse-cpp-2023-09-R-linux-gtk-x86_64.tar.gz -C /opt
- name: "Set up ARM GCC"
run: |
curl -L -o ./arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi.tar.xz "https://developer.arm.com/-/media/Files/downloads/gnu/12.2.rel1/binrel/arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi.tar.xz?rev=7bd049b7a3034e64885fa1a71c12f91d&hash=732D909FA8F68C0E1D0D17D08E057619"
bsdtar -x -f ./arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi.tar.xz
- name: "Set up Eclipse workspace"
run: |
/opt/eclipse/eclipse --launcher.suppressErrors -nosplash -application org.eclipse.cdt.managedbuilder.core.headlessbuild -data ./workspace -E ArmGccPath=$GITHUB_WORKSPACE/arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi/bin -importAll ./
- name: "Build RepRapFirmware Duet2_SBC"
run: |
/opt/eclipse/eclipse --launcher.suppressErrors -nosplash -application org.eclipse.cdt.managedbuilder.core.headlessbuild -data ./workspace -E ArmGccPath=$GITHUB_WORKSPACE/arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi/bin -cleanBuild "RepRapFirmware/Duet2_SBC"
- name: "Build RepRapFirmare Duet3Mini5plus"
run: |
/opt/eclipse/eclipse --launcher.suppressErrors -nosplash -application org.eclipse.cdt.managedbuilder.core.headlessbuild -data ./workspace -E ArmGccPath=$GITHUB_WORKSPACE/arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi/bin -cleanBuild "RepRapFirmware/Duet3Mini5plus"
- name: "Build RepRapFirmare Duet3_MB6HC"
run: |
/opt/eclipse/eclipse --launcher.suppressErrors -nosplash -application org.eclipse.cdt.managedbuilder.core.headlessbuild -data ./workspace -E ArmGccPath=$GITHUB_WORKSPACE/arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi/bin -cleanBuild "RepRapFirmware/Duet3_MB6HC"
- name: "Build RepRapFirmare Duet3_MB6XD"
run: |
/opt/eclipse/eclipse --launcher.suppressErrors -nosplash -application org.eclipse.cdt.managedbuilder.core.headlessbuild -data ./workspace -E ArmGccPath=$GITHUB_WORKSPACE/arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi/bin -cleanBuild "RepRapFirmware/Duet3_MB6XD"
- name: "Build Duet3Bootloader Duet3_MB6HC"
run: |
/opt/eclipse/eclipse --launcher.suppressErrors -nosplash -application org.eclipse.cdt.managedbuilder.core.headlessbuild -data ./workspace -E ArmGccPath=$GITHUB_WORKSPACE/arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi/bin -cleanBuild "Duet3Bootloader/Duet3_MB6HC"
- name: "Build Duet3Bootloader Duet3_MB6XD"
run: |
/opt/eclipse/eclipse --launcher.suppressErrors -nosplash -application org.eclipse.cdt.managedbuilder.core.headlessbuild -data ./workspace -E ArmGccPath=$GITHUB_WORKSPACE/arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi/bin -cleanBuild "Duet3Bootloader/Duet3_MB6XD"
- name: "Build Duet3Bootloader Duet3_Mini5plus"
run: |
/opt/eclipse/eclipse --launcher.suppressErrors -nosplash -application org.eclipse.cdt.managedbuilder.core.headlessbuild -data ./workspace -E ArmGccPath=$GITHUB_WORKSPACE/arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi/bin -cleanBuild "Duet3Bootloader/Duet3_Mini5plus"
- name: "Build Duet3Bootloader SAMC21"
run: |
/opt/eclipse/eclipse --launcher.suppressErrors -nosplash -application org.eclipse.cdt.managedbuilder.core.headlessbuild -data ./workspace -E ArmGccPath=$GITHUB_WORKSPACE/arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi/bin -cleanBuild "Duet3Bootloader/SAMC21"
- name: "Build Duet3Bootloader SAME5x"
run: |
/opt/eclipse/eclipse --launcher.suppressErrors -nosplash -application org.eclipse.cdt.managedbuilder.core.headlessbuild -data ./workspace -E ArmGccPath=$GITHUB_WORKSPACE/arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi/bin -cleanBuild "Duet3Bootloader/SAME5x"
- name: "Build Duet3Bootloader SAMMYC21"
run: |
/opt/eclipse/eclipse --launcher.suppressErrors -nosplash -application org.eclipse.cdt.managedbuilder.core.headlessbuild -data ./workspace -E ArmGccPath=$GITHUB_WORKSPACE/arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi/bin -cleanBuild "Duet3Bootloader/SAMMYC21"
- name: "Build Duet3Expansion EXP1HCL"
run: |
/opt/eclipse/eclipse --launcher.suppressErrors -nosplash -application org.eclipse.cdt.managedbuilder.core.headlessbuild -data ./workspace -E ArmGccPath=$GITHUB_WORKSPACE/arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi/bin -cleanBuild "Duet3Expansion/EXP1HCL"
- name: "Build Duet3Expansion EXP1XD"
run: |
/opt/eclipse/eclipse --launcher.suppressErrors -nosplash -application org.eclipse.cdt.managedbuilder.core.headlessbuild -data ./workspace -E ArmGccPath=$GITHUB_WORKSPACE/arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi/bin -cleanBuild "Duet3Expansion/EXP1XD"
- name: "Build Duet3Expansion EXP3HC"
run: |
/opt/eclipse/eclipse --launcher.suppressErrors -nosplash -application org.eclipse.cdt.managedbuilder.core.headlessbuild -data ./workspace -E ArmGccPath=$GITHUB_WORKSPACE/arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi/bin -cleanBuild "Duet3Expansion/EXP3HC"
- name: "Build Duet3Expansion M23CL"
run: |
/opt/eclipse/eclipse --launcher.suppressErrors -nosplash -application org.eclipse.cdt.managedbuilder.core.headlessbuild -data ./workspace -E ArmGccPath=$GITHUB_WORKSPACE/arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi/bin -cleanBuild "Duet3Expansion/M23CL"
- name: "Build Duet3Expansion SAMMYC21"
run: |
/opt/eclipse/eclipse --launcher.suppressErrors -nosplash -application org.eclipse.cdt.managedbuilder.core.headlessbuild -data ./workspace -E ArmGccPath=$GITHUB_WORKSPACE/arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi/bin -cleanBuild "Duet3Expansion/SAMMYC21"
- name: "Build Duet3Expansion SZP"
run: |
/opt/eclipse/eclipse --launcher.suppressErrors -nosplash -application org.eclipse.cdt.managedbuilder.core.headlessbuild -data ./workspace -E ArmGccPath=$GITHUB_WORKSPACE/arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi/bin -cleanBuild "Duet3Expansion/SZP"
- name: "Build Duet3Expansion TOOL1LC"
run: |
/opt/eclipse/eclipse --launcher.suppressErrors -nosplash -application org.eclipse.cdt.managedbuilder.core.headlessbuild -data ./workspace -E ArmGccPath=$GITHUB_WORKSPACE/arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi/bin -cleanBuild "Duet3Expansion/TOOL1LC"
- name: "Build Duet3Expansion TOOL1RR"
run: |
/opt/eclipse/eclipse --launcher.suppressErrors -nosplash -application org.eclipse.cdt.managedbuilder.core.headlessbuild -data ./workspace -E ArmGccPath=$GITHUB_WORKSPACE/arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi/bin -cleanBuild "Duet3Expansion/TOOL1RR"
- name: "Arrange files"
run: |
mv ./RepRapFirmware/*/*.bin ./
mv ./RepRapFirmware/*/*.uf2 ./
mv ./RepRapFirmware/*/*.map ./
mv ./Duet3Bootloader/*/*.bin ./
mv ./Duet3Bootloader/*/*.map ./
mv ./Duet3Expansion/*/*.bin ./
mv ./Duet3Expansion/*/*.map ./
rm ./Duet3Firmware_Mini5plus.bin
- name: "Attach binaries"
uses: actions/upload-artifact@v3
with:
name: binaries
path: |
./*.bin
./*.uf2
- name: "Attach symbols"
uses: actions/upload-artifact@v3
with:
name: symbols
path: |
./*.map
- name: "Prepare files for upload"
run: |
mkdir files
mv ./*.bin ./files/
mv ./*.uf2 ./files/
- name: "Upload files to dev feed"
uses: Creepios/[email protected]
with:
host: pkg.duet3d.com
port: 22
username: ${{ secrets.PKG_SSH_USER }}
password: ${{ secrets.PKG_SSH_PASS }}
privateKey: ${{ secrets.PKG_SSH_KEY }}
localPath: ./files
remotePath: /var/rrf-pkg/dev