Skip to content

Some minor cleanups #25

Some minor cleanups

Some minor cleanups #25

on:
push:
branches:
- main
paths:
- controller/application/**
name: Publish controller
jobs:
build:
runs-on: ubuntu-24.04
strategy:
matrix:
target:
- name: linux
platform: x86_64-unknown-linux-gnu
extension: ""
- name: windows
platform: x86_64-pc-windows-gnu
extension: ".exe"
feature:
- name: wasm-drivers
file-name: wasm
steps:
- uses: josStorer/get-current-time@v2
id: current-time
with:
format: DD-MM-YYYY-hh-mm-ss
utcOffset: "+02:00"
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set Rust Toolchain
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target.platform }}
- name: Install Protobuf and MinGW (for Windows build)
run: |
sudo apt update
sudo apt install protobuf-compiler gcc-mingw-w64 -y
- name: Build Controller
working-directory: controller/
run: cargo build -p controller --release --target ${{ matrix.target.platform }} --features ${{ matrix.feature.name }}
- name: Copy Executable
if: success()
run: |
mv controller/target/${{ matrix.target.platform }}/release/controller${{ matrix.target.extension }} controller-${{ matrix.target.name }}-${{ matrix.feature.file-name }}${{ matrix.target.extension }}
- name: Upload file
if: success()
uses: appleboy/discord-action@master
with:
webhook_id: ${{ secrets.WEBHOOK_ID }}
webhook_token: ${{ secrets.WEBHOOK_TOKEN }}
message: Build finished for ${{ matrix.target.name }} [${{ steps.current-time.outputs.readableTime }}]
file: ./controller-${{ matrix.target.name }}-${{ matrix.feature.file-name }}${{ matrix.target.extension }}