|
|
|
@ -6,9 +6,16 @@ on: [push, pull_request]
@@ -6,9 +6,16 @@ on: [push, pull_request]
|
|
|
|
|
# - "!README.md" <-- don't rebuild on doc change |
|
|
|
|
|
|
|
|
|
jobs: |
|
|
|
|
build-gcc: |
|
|
|
|
build: |
|
|
|
|
runs-on: ubuntu-20.04 |
|
|
|
|
container: khancyr/ardupilot-dev-base:latest |
|
|
|
|
container: khancyr/ardupilot-dev-${{ matrix.toolchain }}:latest |
|
|
|
|
strategy: |
|
|
|
|
fail-fast: false # don't cancel if a job from the matrix fails |
|
|
|
|
matrix: |
|
|
|
|
toolchain: [ |
|
|
|
|
base, # GCC |
|
|
|
|
clang, |
|
|
|
|
] |
|
|
|
|
steps: |
|
|
|
|
# git checkout the PR |
|
|
|
|
- uses: actions/checkout@v2 |
|
|
|
@ -24,8 +31,8 @@ jobs:
@@ -24,8 +31,8 @@ jobs:
|
|
|
|
|
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 |
|
|
|
|
key: ${{github.workflow}}-ccache-${{ matrix.toolchain }}-${{steps.ccache_cache_timestamp.outputs.timestamp}} |
|
|
|
|
restore-keys: ${{github.workflow}}-ccache-${{ matrix.toolchain }}- # restore ccache from either previous build on this branch or on master |
|
|
|
|
- name: setup ccache |
|
|
|
|
run: | |
|
|
|
|
mkdir -p ~/.ccache |
|
|
|
@ -35,57 +42,21 @@ jobs:
@@ -35,57 +42,21 @@ jobs:
|
|
|
|
|
echo "max_size = 400M" >> ~/.ccache/ccache.conf |
|
|
|
|
ccache -s |
|
|
|
|
ccache -z |
|
|
|
|
- name: build copter |
|
|
|
|
- name: build copter ${{ matrix.toolchain }} |
|
|
|
|
shell: bash |
|
|
|
|
run: | |
|
|
|
|
if [[ ${{ matrix.toolchain }} = "clang" ]]; then |
|
|
|
|
export CC=clang-7 |
|
|
|
|
export CXX=clang++-7 |
|
|
|
|
fi |
|
|
|
|
PATH="/github/home/.local/bin:$PATH" |
|
|
|
|
./waf configure --board sitl |
|
|
|
|
./waf build --target bin/arducopter |
|
|
|
|
ccache -s |
|
|
|
|
ccache -z |
|
|
|
|
|
|
|
|
|
build-clang: |
|
|
|
|
runs-on: ubuntu-20.04 |
|
|
|
|
container: khancyr/ardupilot-dev-clang:latest |
|
|
|
|
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-clang-${{steps.ccache_cache_timestamp.outputs.timestamp}} |
|
|
|
|
restore-keys: ${{github.workflow}}-ccache-clang- # 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: build copter |
|
|
|
|
shell: bash |
|
|
|
|
run: | |
|
|
|
|
export CC=clang-7 |
|
|
|
|
export CXX=clang++-7 |
|
|
|
|
PATH="/github/home/.local/bin:$PATH" |
|
|
|
|
./waf configure --board sitl --board sitl |
|
|
|
|
./waf build --target bin/arducopter |
|
|
|
|
ccache -s |
|
|
|
|
ccache -z |
|
|
|
|
|
|
|
|
|
autotest: |
|
|
|
|
needs: build-gcc # don't try to launch the tests matrix if it doesn't build first, profit from caching for fast build |
|
|
|
|
needs: build # 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: khancyr/ardupilot-dev-base:latest |
|
|
|
|
strategy: |
|
|
|
@ -116,8 +87,8 @@ jobs:
@@ -116,8 +87,8 @@ jobs:
|
|
|
|
|
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 |
|
|
|
|
key: ${{github.workflow}}-ccache-base-${{steps.ccache_cache_timestamp.outputs.timestamp}} |
|
|
|
|
restore-keys: ${{github.workflow}}-ccache-base- # restore ccache from either previous build on this branch or on master |
|
|
|
|
- name: setup ccache |
|
|
|
|
run: | |
|
|
|
|
mkdir -p ~/.ccache |
|
|
|
@ -151,7 +122,7 @@ jobs:
@@ -151,7 +122,7 @@ jobs:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
build-gcc-heli: |
|
|
|
|
needs: build-gcc # don't try to launch the tests matrix if it doesn't build first, profit from caching for fast build |
|
|
|
|
needs: build # 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: khancyr/ardupilot-dev-base:latest |
|
|
|
|
steps: |
|
|
|
@ -169,8 +140,8 @@ jobs:
@@ -169,8 +140,8 @@ jobs:
|
|
|
|
|
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 |
|
|
|
|
key: ${{github.workflow}}-ccache-base-${{steps.ccache_cache_timestamp.outputs.timestamp}} |
|
|
|
|
restore-keys: ${{github.workflow}}-ccache-base- # restore ccache from either previous build on this branch or on master |
|
|
|
|
- name: setup ccache |
|
|
|
|
run: | |
|
|
|
|
mkdir -p ~/.ccache |
|
|
|
@ -215,8 +186,8 @@ jobs:
@@ -215,8 +186,8 @@ jobs:
|
|
|
|
|
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 |
|
|
|
|
key: ${{github.workflow}}-ccache-base-${{steps.ccache_cache_timestamp.outputs.timestamp}} |
|
|
|
|
restore-keys: ${{github.workflow}}-ccache-base- # restore ccache from either previous build on this branch or on master |
|
|
|
|
- name: setup ccache |
|
|
|
|
run: | |
|
|
|
|
mkdir -p ~/.ccache |
|
|
|
|