mirror of https://github.com/ArduPilot/ardupilot
.github: migrate all chibios build to Github Actions
This commit is contained in:
parent
7eea13f86f
commit
c2a7e3be58
|
@ -8,17 +8,27 @@ on: [push, pull_request]
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
container: khancyr/ardupilot-dev-chibios:latest
|
container: khancyr/ardupilot-dev-${{ matrix.toolchain }}:latest
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false # don't cancel if a job from the matrix fails
|
fail-fast: false # don't cancel if a job from the matrix fails
|
||||||
matrix:
|
matrix:
|
||||||
gcc: [9]
|
|
||||||
config: [
|
config: [
|
||||||
stm32f7,
|
stm32f7,
|
||||||
stm32h7,
|
stm32h7,
|
||||||
fmuv2-plane,
|
fmuv2-plane,
|
||||||
periph-build,
|
periph-build,
|
||||||
|
iofirmware,
|
||||||
|
CubeOrange-bootloader,
|
||||||
|
revo-bootloader
|
||||||
]
|
]
|
||||||
|
toolchain: [
|
||||||
|
chibios, # GCC-6
|
||||||
|
chibios-clang,
|
||||||
|
]
|
||||||
|
gcc: [6, 9]
|
||||||
|
exclude:
|
||||||
|
- gcc: 9
|
||||||
|
toolchain: chibios-clang
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
# git checkout the PR
|
# git checkout the PR
|
||||||
|
@ -35,8 +45,8 @@ jobs:
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: ~/.ccache
|
path: ~/.ccache
|
||||||
key: ${{github.workflow}}-ccache-${{matrix.config}}-${{matrix.gcc}}-${{steps.ccache_cache_timestamp.outputs.timestamp}}
|
key: ${{github.workflow}}-ccache-${{matrix.config}}-${{ matrix.toolchain }}-${{ matrix.gcc }}-${{steps.ccache_cache_timestamp.outputs.timestamp}}
|
||||||
restore-keys: ${{github.workflow}}-ccache- # restore ccache from either previous build on this branch or on master
|
restore-keys: ${{github.workflow}}-ccache-${{matrix.config}}-${{ matrix.toolchain }}-${{ matrix.gcc }} # restore ccache from either previous build on this branch or on master
|
||||||
- name: setup ccache
|
- name: setup ccache
|
||||||
run: |
|
run: |
|
||||||
mkdir -p ~/.ccache
|
mkdir -p ~/.ccache
|
||||||
|
@ -46,25 +56,17 @@ jobs:
|
||||||
echo "max_size = 400M" >> ~/.ccache/ccache.conf
|
echo "max_size = 400M" >> ~/.ccache/ccache.conf
|
||||||
ccache -s
|
ccache -s
|
||||||
ccache -z
|
ccache -z
|
||||||
- name: test ${{matrix.config}} gcc-${{matrix.gcc}}
|
- name: test ${{matrix.config}} ${{ matrix.toolchain }} gcc-${{matrix.gcc}}
|
||||||
env:
|
env:
|
||||||
CI_BUILD_TARGET: ${{matrix.config}}
|
CI_BUILD_TARGET: ${{matrix.config}}
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
if [[ ${{ matrix.toolchain }} = "chibios-clang" ]]; then
|
||||||
|
export CC=clang-7
|
||||||
|
export CXX=clang++-7
|
||||||
|
fi
|
||||||
PATH="/usr/lib/ccache:/opt/gcc-arm-none-eabi-${{matrix.gcc}}/bin:$PATH"
|
PATH="/usr/lib/ccache:/opt/gcc-arm-none-eabi-${{matrix.gcc}}/bin:$PATH"
|
||||||
PATH="/github/home/.local/bin:$PATH"
|
PATH="/github/home/.local/bin:$PATH"
|
||||||
Tools/scripts/build_ci.sh
|
Tools/scripts/build_ci.sh
|
||||||
|
ccache -s
|
||||||
- name: Archive buildlog artifacts
|
ccache -z
|
||||||
uses: actions/upload-artifact@v2
|
|
||||||
with:
|
|
||||||
name: buildlogs-for-${{matrix.config}}
|
|
||||||
path: /tmp/buildlogs
|
|
||||||
retention-days: 14
|
|
||||||
|
|
||||||
- name: Archive .bin artifacts
|
|
||||||
uses: actions/upload-artifact@v2
|
|
||||||
with:
|
|
||||||
name: BIN-files-for-${{matrix.config}}
|
|
||||||
path: /__w/ardupilot/ardupilot/logs
|
|
||||||
retention-days: 7
|
|
||||||
|
|
24
.travis.yml
24
.travis.yml
|
@ -50,25 +50,5 @@ matrix:
|
||||||
include:
|
include:
|
||||||
- if: type != cron
|
- if: type != cron
|
||||||
compiler: "gcc"
|
compiler: "gcc"
|
||||||
env: CI_BUILD_TARGET="stm32f7 stm32h7 fmuv2-plane"
|
env: CI_BUILD_TARGET="navigator"
|
||||||
name: stm32f7 stm32h7 fmuv2-plane
|
name: navigator
|
||||||
- if: type != cron
|
|
||||||
compiler: "clang"
|
|
||||||
env: CI_BUILD_TARGET="stm32f7 stm32h7 fmuv2-plane"
|
|
||||||
name: stm32f7-clang stm32h7-clang fmuv2-plane-clang
|
|
||||||
- if: type != cron
|
|
||||||
compiler: "gcc"
|
|
||||||
env: CI_BUILD_TARGET="navigator periph-build"
|
|
||||||
name: navigator periph-build
|
|
||||||
- if: type != cron
|
|
||||||
compiler: "clang"
|
|
||||||
env: CI_BUILD_TARGET="periph-build"
|
|
||||||
name: periph-build-clang
|
|
||||||
- if: type != cron
|
|
||||||
compiler: "gcc"
|
|
||||||
env: CI_BUILD_TARGET="revo-bootloader CubeOrange-bootloader iofirmware"
|
|
||||||
name: revo-bootloader CubeOrange-bootloader iofirmware
|
|
||||||
- if: type != cron
|
|
||||||
compiler: "clang"
|
|
||||||
env: CI_BUILD_TARGET="revo-bootloader CubeOrange-bootloader iofirmware"
|
|
||||||
name: revo-bootloader-clang CubeOrange-bootloader-clang iofirmware-clang
|
|
||||||
|
|
Loading…
Reference in New Issue