Skip to content

Commit

Permalink
improve workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
PonomarevDA committed Jun 29, 2024
1 parent d0ad8db commit b6f17a8
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 36 deletions.
21 changes: 12 additions & 9 deletions .github/workflows/cyphal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ on:
- '*'
jobs:
stm32f103:
runs-on: ubuntu-22.04
strategy:
matrix:
os: [ubuntu-22.04]
runs-on: ${{ matrix.os }}
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
Expand All @@ -18,24 +21,24 @@ jobs:

- name: Install dependencies
run: |
pip install -r requirements.txt
sudo apt-get install -y gcc-arm-none-eabi
python -m pip install -r requirements.txt
if [ "${{ runner.os }}" == "Linux" ]; then
sudo apt-get install -y gcc-arm-none-eabi
elif [ "${{ runner.os }}" == "Windows" ]; then
choco install -y gcc-arm-embedded make cmake
fi
shell: bash

- name: Build Cyphal binary
run: make cyphal

- name: Upload .bin file
if: matrix.os == 'ubuntu-22.04'
uses: actions/upload-artifact@v3
with:
name: cyphal_firmware.bin
path: build/obj/example.bin

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

sitl:
runs-on: ubuntu-22.04
timeout-minutes: 10
Expand Down
35 changes: 8 additions & 27 deletions .github/workflows/dronecan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
stm32f103:
strategy:
matrix:
os: [ubuntu-22.04]
os: [ubuntu-22.04, windows-latest]
runs-on: ${{ matrix.os }}
timeout-minutes: 10
steps:
Expand All @@ -21,8 +21,13 @@ jobs:

- name: Install dependencies
run: |
pip install -r requirements.txt
sudo apt-get install -y gcc-arm-none-eabi
python -m pip install -r requirements.txt
if [ "${{ runner.os }}" == "Linux" ]; then
sudo apt-get install -y gcc-arm-none-eabi
elif [ "${{ runner.os }}" == "Windows" ]; then
choco install -y gcc-arm-embedded make cmake
fi
shell: bash

- name: Build DroneCAN binary
run: make dronecan
Expand All @@ -34,30 +39,6 @@ jobs:
name: dronecan_firmware.bin
path: build/obj/example.bin

- name: Upload .elf file
if: matrix.os == 'ubuntu-22.04'
uses: actions/upload-artifact@v3
with:
name: dronecan_firmware.elf
path: build/obj/example.elf

stm32f103_windows:
runs-on: windows-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0

- name: Install Dependencies
run: |
choco install -y gcc-arm-embedded make 7zip cmake
python -m pip install -r requirements.txt
- name: Build DroneCAN binary
run: make dronecan

sitl:
runs-on: ubuntu-22.04
timeout-minutes: 10
Expand Down

0 comments on commit b6f17a8

Please sign in to comment.