fix recent windows build and add ubuntu-20.04 support #35
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: dronecan_sitl | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- '*' | |
jobs: | |
sitl: | |
strategy: | |
matrix: | |
include: | |
- os: ubuntu-24.04 | |
- os: ubuntu-22.04 | |
- os: ubuntu-20.04 | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
fetch-depth: 0 | |
- name: Install dependencies | |
run: | | |
pip install -r requirements.txt | |
sudo apt-get install -y gcc-arm-none-eabi linux-modules-extra-$(uname -r) | |
- name: Setup GCC for Ubuntu 20.04 | |
if: matrix.os == 'ubuntu-20.04' | |
run: | | |
sudo apt update | |
sudo apt install -y gcc-10 g++-10 | |
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100 | |
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 100 | |
- name: Build SITL DroneCAN | |
run: make sitl_dronecan | |
- name: Run SITL for 5 seconds | |
run: timeout 5s make run || res=$?; if [[ $res -ne 124 && $res -ne 0 ]]; then exit $res; fi |