Skip to content

Build and and deploy firmware to dev #38

Build and and deploy firmware to dev

Build and and deploy firmware to dev #38

Workflow file for this run

name: Build and and deploy firmware to dev
on:
workflow_dispatch:
inputs:
version:
description: "Version"
required: true
type: string
jobs:
build:
runs-on: ubuntu-24.04
steps:
- name: "Check out CANlib"
uses: actions/checkout@v5
with:
repository: "Duet3D/CANlib"
ref: "3.6-dev"
path: "./CANlib"
- name: "Check out CoreN2G"
uses: actions/checkout@v5
with:
repository: "Duet3D/CoreN2G"
ref: "3.6-dev"
path: "./CoreN2G"
- name: "Check out FreeRTOS"
uses: actions/checkout@v5
with:
repository: "Duet3D/FreeRTOS"
ref: "3.5-dev"
path: "./FreeRTOS"
- name: "Check out LibTinyusb"
uses: actions/checkout@v5
with:
repository: "Duet3D/LibTinyusb"
ref: "master"
path: "./LibTinyusb"
submodules: "recursive"
- name: "Check out RepRapFirmware"
uses: actions/checkout@v5
with:
repository: "Duet3D/RepRapFirmware"
ref: "3.6-dev"
path: "./RepRapFirmware"
- name: "Check out RRFLibraries"
uses: actions/checkout@v5
with:
repository: "Duet3D/RRFLibraries"
ref: "3.5-dev"
path: "./RRFLibraries"
- name: "Check out WiFiSocketServerRTOS"
uses: actions/checkout@v5
with:
repository: "Duet3D/WiFiSocketServerRTOS"
ref: "main"
path: "./WiFiSocketServerRTOS"
- 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
- 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-2025-09-R-linux-gtk-x86_64.tar.gz"
sudo bsdtar -x -f ./eclipse-cpp-2025-09-R-linux-gtk-x86_64.tar.gz -C /opt
- name: "Set up ARM GCC"
run: |
curl -L -o ./arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi.tar.xz "https://developer.arm.com/-/media/Files/downloads/gnu/13.2.Rel1/binrel/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi.tar.xz?rev=e434b9ea4afc4ed7998329566b764309&hash=CA590209F5774EE1C96E6450E14A3E26"
bsdtar -x -f ./arm-gnu-toolchain-13.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-13.2.Rel1-x86_64-arm-none-eabi/bin -importAll ./
- name: "Build RepRapFirmware Duet2"
run: |
/opt/eclipse/eclipse --launcher.suppressErrors -nosplash -application org.eclipse.cdt.managedbuilder.core.headlessbuild -data ./workspace -E ArmGccPath=$GITHUB_WORKSPACE/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi/bin -cleanBuild "RepRapFirmware/Duet2"
- 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-13.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-13.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-13.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-13.2.Rel1-x86_64-arm-none-eabi/bin -cleanBuild "RepRapFirmware/Duet3_MB6XD"
- name: "Arrange files"
run: |
mv ./RepRapFirmware/*/*.bin ./
mv ./RepRapFirmware/*/*.uf2 ./
mv ./RepRapFirmware/*/*.map ./
rm ./Duet3Firmware_Mini5plus.bin
- name: "Attach binaries"
uses: actions/upload-artifact@v4
with:
name: binaries
path: |
./*.bin
./*.uf2
- name: "Attach symbols"
uses: actions/upload-artifact@v4
with:
name: symbols
path: |
./*.map
- name: "Prepare files for upload"
run: |
rm Duet2CombinedFirmware.bin
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