Skip to content

Commit

Permalink
archive artifacts (.bin and .elf) in workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
PonomarevDA committed Nov 1, 2023
1 parent 5814c88 commit 7afdb51
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 10 deletions.
30 changes: 20 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
name: build

on: [push]
jobs:
build_cyphal:
Expand All @@ -8,38 +7,49 @@ jobs:
steps:
- uses: actions/checkout@v3
with:
path: 'repository'
submodules: recursive
fetch-depth: 0

- name: Install dependencies
run: ./repository/scripts/tools/install_for_ubuntu.sh --yes
run: ./scripts/tools/install_for_ubuntu.sh --yes

- run: make generate_dsdl
- run: make cyphal

- name: Archive .bin file
uses: actions/upload-artifact@v3
with:
name: cyphal_firmware.bin
path: build/obj/cyphal_example.bin

- name: Archive .elf file
uses: actions/upload-artifact@v3
with:
name: cyphal_firmware.elf
path: build/obj/cyphal_example.elf

- run: cd repository && make generate_dsdl
- run: cd repository && make cyphal

build_dronecan:
runs-on: ubuntu-22.04
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
with:
path: 'repository'
token: ${{ secrets.ACCESS_TOKEN }}
submodules: recursive
fetch-depth: 0

- uses: actions/checkout@v3
with:
repository: RaccoonlabDev/libsqcan
path: 'repository/Libs/libsqcan'
path: 'Libs/libsqcan'
token: ${{ secrets.ACCESS_TOKEN }}
fetch-depth: 0

- name: Checkout libsqcan
run: cd repository/Libs/libsqcan && git checkout dd10256
run: cd Libs/libsqcan && git checkout dd10256

- name: Install dependencies
run: ./repository/scripts/tools/install_for_ubuntu.sh --yes
run: ./scripts/tools/install_for_ubuntu.sh --yes

- run: cd repository && make dronecan
- run: make dronecan
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -131,4 +131,5 @@ add_custom_command(TARGET ${EXECUTABLE}
POST_BUILD
COMMAND arm-none-eabi-objcopy -O ihex ${EXECUTABLE} ${PROJECT_NAME}.hex
COMMAND arm-none-eabi-objcopy -O binary ${EXECUTABLE} ${PROJECT_NAME}.bin
COMMAND arm-none-eabi-objcopy -I binary -O elf32-little ${EXECUTABLE} ${PROJECT_NAME}.elf
)

0 comments on commit 7afdb51

Please sign in to comment.