2020-11-12 15:43:08 -04:00
|
|
|
name: test ap_periph
|
|
|
|
|
2022-10-18 11:21:53 -03:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
paths-ignore: # ignore vehicle only changes
|
|
|
|
- 'AntennaTracker/**'
|
|
|
|
- 'ArduPlane/**'
|
|
|
|
- 'ArduSub/**'
|
|
|
|
- 'Rover/**'
|
|
|
|
- 'Blimp/**'
|
|
|
|
- 'ArduCopter/**'
|
|
|
|
|
|
|
|
pull_request:
|
|
|
|
paths-ignore: # ignore vehicle only changes
|
|
|
|
- 'AntennaTracker/**'
|
|
|
|
- 'ArduPlane/**'
|
|
|
|
- 'ArduSub/**'
|
|
|
|
- 'Rover/**'
|
|
|
|
- 'Blimp/**'
|
|
|
|
- 'ArduCopter/**'
|
|
|
|
|
|
|
|
workflow_dispatch:
|
|
|
|
|
2021-06-23 04:42:11 -03:00
|
|
|
concurrency:
|
|
|
|
group: ci-${{github.workflow}}-${{ github.ref }}
|
|
|
|
cancel-in-progress: true
|
2020-11-12 15:43:08 -04:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build-gcc-ap_periph:
|
|
|
|
runs-on: ubuntu-20.04
|
2023-02-03 14:09:06 -04:00
|
|
|
container: ardupilot/ardupilot-dev-periph:latest
|
2020-11-12 15:43:08 -04:00
|
|
|
steps:
|
|
|
|
# git checkout the PR
|
2022-12-09 07:47:48 -04:00
|
|
|
- uses: actions/checkout@v3
|
2020-11-12 15:43:08 -04:00
|
|
|
with:
|
|
|
|
submodules: 'recursive'
|
|
|
|
# Put ccache into github cache for faster build
|
|
|
|
- name: Prepare ccache timestamp
|
|
|
|
id: ccache_cache_timestamp
|
|
|
|
run: |
|
|
|
|
NOW=$(date -u +"%F-%T")
|
2023-02-03 04:59:53 -04:00
|
|
|
echo "timestamp=${NOW}" >> $GITHUB_OUTPUT
|
2020-11-12 15:43:08 -04:00
|
|
|
- name: ccache cache files
|
2022-12-09 07:47:48 -04:00
|
|
|
uses: actions/cache@v3
|
2020-11-12 15:43:08 -04:00
|
|
|
with:
|
|
|
|
path: ~/.ccache
|
|
|
|
key: ${{github.workflow}}-ccache-${{steps.ccache_cache_timestamp.outputs.timestamp}}
|
|
|
|
restore-keys: ${{github.workflow}}-ccache- # restore ccache from either previous build on this branch or on master
|
|
|
|
- name: setup ccache
|
|
|
|
run: |
|
2022-02-22 01:23:32 -04:00
|
|
|
. .github/workflows/ccache.env
|
2020-11-12 15:43:08 -04:00
|
|
|
|
2021-11-11 07:15:54 -04:00
|
|
|
- name: run dronecan dsdlc generator test
|
2021-09-30 08:33:19 -03:00
|
|
|
run: |
|
|
|
|
PATH="/github/home/.local/bin:$PATH"
|
2021-12-05 05:29:26 -04:00
|
|
|
python modules/DroneCAN/dronecan_dsdlc/dronecan_dsdlc.py -O dsdlc_generated modules/DroneCAN/DSDL/uavcan modules/DroneCAN/DSDL/dronecan modules/DroneCAN/DSDL/com --run-test
|
2021-09-30 08:33:19 -03:00
|
|
|
|
2020-11-12 15:43:08 -04:00
|
|
|
- name: build sitl_periph_gps
|
|
|
|
shell: bash
|
|
|
|
run: |
|
2023-02-03 13:45:49 -04:00
|
|
|
git config --global --add safe.directory ${GITHUB_WORKSPACE}
|
2020-11-12 15:43:08 -04:00
|
|
|
PATH="/github/home/.local/bin:$PATH"
|
|
|
|
./waf configure --board sitl_periph_gps
|
|
|
|
./waf build --target bin/AP_Periph
|
|
|
|
ccache -s
|
|
|
|
ccache -z
|
|
|
|
|
|
|
|
autotest-can:
|
|
|
|
needs: build-gcc-ap_periph # don't try to launch the tests matrix if it doesn't build first, profit from caching for fast build
|
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
container:
|
2023-02-03 14:09:06 -04:00
|
|
|
image: ardupilot/ardupilot-dev-periph:latest
|
2020-11-12 15:43:08 -04:00
|
|
|
options: --privileged
|
|
|
|
strategy:
|
|
|
|
fail-fast: false # don't cancel if a job from the matrix fails
|
|
|
|
matrix:
|
|
|
|
config: [
|
|
|
|
sitltest-can,
|
|
|
|
]
|
|
|
|
|
|
|
|
steps:
|
|
|
|
# git checkout the PR
|
2022-12-09 07:47:48 -04:00
|
|
|
- uses: actions/checkout@v3
|
2020-11-12 15:43:08 -04:00
|
|
|
with:
|
|
|
|
submodules: 'recursive'
|
|
|
|
# Put ccache into github cache for faster build
|
|
|
|
- name: Prepare ccache timestamp
|
|
|
|
id: ccache_cache_timestamp
|
|
|
|
run: |
|
|
|
|
NOW=$(date -u +"%F-%T")
|
2023-02-03 04:59:53 -04:00
|
|
|
echo "timestamp=${NOW}" >> $GITHUB_OUTPUT
|
2020-11-12 15:43:08 -04:00
|
|
|
- name: ccache cache files
|
2022-12-09 07:47:48 -04:00
|
|
|
uses: actions/cache@v3
|
2020-11-12 15:43:08 -04:00
|
|
|
with:
|
|
|
|
path: ~/.ccache
|
|
|
|
key: ${{github.workflow}}-ccache-${{steps.ccache_cache_timestamp.outputs.timestamp}}
|
|
|
|
restore-keys: ${{github.workflow}}-ccache- # restore ccache from either previous build on this branch or on master
|
|
|
|
- name: setup ccache
|
|
|
|
run: |
|
2022-02-22 01:23:32 -04:00
|
|
|
. .github/workflows/ccache.env
|
2020-11-12 15:43:08 -04:00
|
|
|
- name: setup can-utils
|
|
|
|
run: |
|
2020-12-17 07:28:54 -04:00
|
|
|
kernel_ver=`uname -r`
|
2021-07-29 13:31:38 -03:00
|
|
|
if [ "$kernel_ver" = "5.4.0-1032-azure" ] || [ "$kernel_ver" = "5.11.4-051104-generic" ]; then echo "Unsupported Kernel $kernel_ver" && exit 0; fi;
|
2020-11-12 15:43:08 -04:00
|
|
|
sudo apt-get update
|
2020-12-17 07:28:26 -04:00
|
|
|
sudo apt-get -y install can-utils iproute2 linux-modules-extra-$(uname -r)
|
2020-11-12 15:43:08 -04:00
|
|
|
sudo modprobe vcan
|
|
|
|
sudo ip link add dev vcan0 type vcan
|
|
|
|
sudo ip link set up vcan0
|
|
|
|
- name: test ${{matrix.config}}
|
|
|
|
env:
|
|
|
|
CI_BUILD_TARGET: ${{matrix.config}}
|
|
|
|
shell: bash
|
|
|
|
run: |
|
2023-02-03 13:45:49 -04:00
|
|
|
git config --global --add safe.directory ${GITHUB_WORKSPACE}
|
2020-12-17 07:28:54 -04:00
|
|
|
kernel_ver=`uname -r`
|
2021-07-29 13:31:38 -03:00
|
|
|
if [ "$kernel_ver" = "5.4.0-1032-azure" ] || [ "$kernel_ver" = "5.11.4-051104-generic" ]; then echo "Unsupported Kernel $kernel_ver" && exit 0; fi;
|
2020-11-12 15:43:08 -04:00
|
|
|
PATH="/github/home/.local/bin:$PATH"
|
|
|
|
Tools/scripts/build_ci.sh
|