2020-11-12 15:43:08 -04:00
|
|
|
name: test ap_periph
|
|
|
|
|
2020-12-15 13:02:54 -04:00
|
|
|
on: [push, pull_request, workflow_dispatch]
|
2020-11-12 15:43:08 -04:00
|
|
|
# paths:
|
|
|
|
# - "*"
|
|
|
|
# - "!README.md" <-- don't rebuild on doc change
|
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
|
2021-01-05 17:42:06 -04:00
|
|
|
container: ardupilot/ardupilot-dev-base:latest
|
2020-11-12 15:43:08 -04:00
|
|
|
steps:
|
|
|
|
# git checkout the PR
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
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")
|
|
|
|
echo "::set-output name=timestamp::${NOW}"
|
|
|
|
- name: ccache cache files
|
|
|
|
uses: actions/cache@v2
|
|
|
|
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: |
|
|
|
|
mkdir -p ~/.ccache
|
|
|
|
echo "base_dir = ${GITHUB_WORKSPACE}" > ~/.ccache/ccache.conf
|
|
|
|
echo "compression = true" >> ~/.ccache/ccache.conf
|
|
|
|
echo "compression_level = 6" >> ~/.ccache/ccache.conf
|
|
|
|
echo "max_size = 400M" >> ~/.ccache/ccache.conf
|
|
|
|
ccache -s
|
|
|
|
ccache -z
|
|
|
|
- name: install 32-bit libraries
|
|
|
|
run: |
|
|
|
|
dpkg --add-architecture i386
|
|
|
|
apt-get update
|
|
|
|
apt-get install -y gcc-multilib g++-multilib
|
|
|
|
|
2021-09-30 08:33:19 -03:00
|
|
|
- name: run canard dsdlc generator test
|
|
|
|
run: |
|
|
|
|
PATH="/github/home/.local/bin:$PATH"
|
2021-10-12 09:04:03 -03:00
|
|
|
python modules/canard_dsdlc/canard_dsdlc.py -O dsdlc_generated libraries/AP_UAVCAN/dsdl/ardupilot modules/pyuavcan/uavcan/dsdl_files/uavcan --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: |
|
|
|
|
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:
|
2021-01-05 17:42:06 -04:00
|
|
|
image: ardupilot/ardupilot-dev-base: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
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
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")
|
|
|
|
echo "::set-output name=timestamp::${NOW}"
|
|
|
|
- name: ccache cache files
|
|
|
|
uses: actions/cache@v2
|
|
|
|
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: |
|
|
|
|
mkdir -p ~/.ccache
|
|
|
|
echo "base_dir = ${GITHUB_WORKSPACE}" > ~/.ccache/ccache.conf
|
|
|
|
echo "compression = true" >> ~/.ccache/ccache.conf
|
|
|
|
echo "compression_level = 6" >> ~/.ccache/ccache.conf
|
|
|
|
echo "max_size = 400M" >> ~/.ccache/ccache.conf
|
|
|
|
ccache -s
|
|
|
|
ccache -z
|
|
|
|
- name: install 32-bit libraries
|
|
|
|
run: |
|
|
|
|
sudo dpkg --add-architecture i386
|
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get install -y gcc-multilib g++-multilib
|
|
|
|
- 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: |
|
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
|