Skip to content

Commit

Permalink
[Spinal][GA] Refactor of workflow file.
Browse files Browse the repository at this point in the history
  • Loading branch information
sugihara-16 committed Nov 3, 2024
1 parent 682dacd commit 57a8331
Showing 1 changed file with 8 additions and 19 deletions.
27 changes: 8 additions & 19 deletions .github/workflows/spinal_build.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
name: Build STM32 Project
name: Build Spinal Firmware
on : [push, pull_request, workflow_dispatch]

# on:
# pull_request:
# branches:
# - main
# push:
# branches:
# - main

# # enable manual triggering
# workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -24,8 +13,8 @@ jobs:
with:
# submodules too
submodules: recursive

- name: Install ROS packages with rosdep
- name: Install ROS packages with rosdep # Setup Github ws as a catkin ws
run: |
source /opt/ros/noetic/setup.bash
rm /etc/ros/rosdep/sources.list.d/20-default.list
Expand All @@ -36,15 +25,17 @@ jobs:
cd ~/catkin_ws
rosdep install -y -r --from-paths src --ignore-src --rosdistro noetic
shell: bash
- name: Build ROS Package

- name: Build Spinal as ROS Package # Build Spinal to generate ROS libraries
run: |
source /opt/ros/noetic/setup.bash
cd ~/catkin_ws
catkin config --cmake-args -Dcatkin_DIR=/opt/ros/noetic/share/catkin/cmake
catkin build spinal
source devel/setup.bash
shell: bash
- name: Build project

- name: Build Spinal as STM32CubeIDE project # Build Spinal firmware with STM32CubeIDE
run: |
/opt/st/stm32cubeide_1.8.0/stm32cubeide -nosplash \
-application org.eclipse.cdt.managedbuilder.core.headlessbuild \
Expand All @@ -54,10 +45,8 @@ jobs:
-vmargs -Dorg.eclipse.cdt.core.build.parallel=true \
-Dorg.eclipse.cdt.core.build.parallel.threads=12
- name: Upload artifacts
- name: Upload artifacts # Upload required files for flash.
uses: actions/upload-artifact@v4
with:
name: spinal.artifacts
# The output artifacts are spinal.elf, spinal.map, etc.
# Use a wildcard pattern to get them all
path: aerial_robot_nerve/spinal/mcu_project/boards/stm32H7/STM32CubeIDE/Debug/spinal.*

0 comments on commit 57a8331

Please sign in to comment.