Skip to content

Commit b1594f9

Browse files
khancyrtridge
authored andcommitted
.github: move periph test out of copter file
1 parent f40a5b9 commit b1594f9

File tree

2 files changed

+110
-104
lines changed

2 files changed

+110
-104
lines changed

.github/workflows/test_sitl_copter.yml

Lines changed: 0 additions & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -218,107 +218,3 @@ jobs:
218218
name: BIN-files-for-${{matrix.config}}
219219
path: /__w/ardupilot/ardupilot/logs
220220
retention-days: 7
221-
222-
build-gcc-ap_periph:
223-
needs: build-gcc # don't try to launch the tests matrix if it doesn't build first, profit from caching for fast build
224-
runs-on: ubuntu-20.04
225-
container: khancyr/ardupilot-dev-base:latest
226-
steps:
227-
# git checkout the PR
228-
- uses: actions/checkout@v2
229-
with:
230-
submodules: 'recursive'
231-
# Put ccache into github cache for faster build
232-
- name: Prepare ccache timestamp
233-
id: ccache_cache_timestamp
234-
run: |
235-
NOW=$(date -u +"%F-%T")
236-
echo "::set-output name=timestamp::${NOW}"
237-
- name: ccache cache files
238-
uses: actions/cache@v2
239-
with:
240-
path: ~/.ccache
241-
key: ${{github.workflow}}-ccache-${{steps.ccache_cache_timestamp.outputs.timestamp}}
242-
restore-keys: ${{github.workflow}}-ccache- # restore ccache from either previous build on this branch or on master
243-
- name: setup ccache
244-
run: |
245-
mkdir -p ~/.ccache
246-
echo "base_dir = ${GITHUB_WORKSPACE}" > ~/.ccache/ccache.conf
247-
echo "compression = true" >> ~/.ccache/ccache.conf
248-
echo "compression_level = 6" >> ~/.ccache/ccache.conf
249-
echo "max_size = 400M" >> ~/.ccache/ccache.conf
250-
ccache -s
251-
ccache -z
252-
- name: install 32-bit libraries
253-
run: |
254-
dpkg --add-architecture i386
255-
apt-get update
256-
apt-get install -y gcc-multilib g++-multilib
257-
258-
- name: build sitl_periph_gps
259-
shell: bash
260-
run: |
261-
PATH="/github/home/.local/bin:$PATH"
262-
./waf configure --board sitl_periph_gps
263-
./waf build --target bin/AP_Periph
264-
ccache -s
265-
ccache -z
266-
267-
autotest-can:
268-
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
269-
runs-on: ubuntu-20.04
270-
container:
271-
image: khancyr/ardupilot-dev-base:latest
272-
options: --privileged
273-
strategy:
274-
fail-fast: false # don't cancel if a job from the matrix fails
275-
matrix:
276-
config: [
277-
sitltest-can,
278-
]
279-
280-
steps:
281-
# git checkout the PR
282-
- uses: actions/checkout@v2
283-
with:
284-
submodules: 'recursive'
285-
# Put ccache into github cache for faster build
286-
- name: Prepare ccache timestamp
287-
id: ccache_cache_timestamp
288-
run: |
289-
NOW=$(date -u +"%F-%T")
290-
echo "::set-output name=timestamp::${NOW}"
291-
- name: ccache cache files
292-
uses: actions/cache@v2
293-
with:
294-
path: ~/.ccache
295-
key: ${{github.workflow}}-ccache-${{steps.ccache_cache_timestamp.outputs.timestamp}}
296-
restore-keys: ${{github.workflow}}-ccache- # restore ccache from either previous build on this branch or on master
297-
- name: setup ccache
298-
run: |
299-
mkdir -p ~/.ccache
300-
echo "base_dir = ${GITHUB_WORKSPACE}" > ~/.ccache/ccache.conf
301-
echo "compression = true" >> ~/.ccache/ccache.conf
302-
echo "compression_level = 6" >> ~/.ccache/ccache.conf
303-
echo "max_size = 400M" >> ~/.ccache/ccache.conf
304-
ccache -s
305-
ccache -z
306-
- name: install 32-bit libraries
307-
run: |
308-
sudo dpkg --add-architecture i386
309-
sudo apt-get update
310-
sudo apt-get install -y gcc-multilib g++-multilib
311-
- name: setup can-utils
312-
run: |
313-
sudo apt-get update
314-
sudo apt-get -y install can-utils iproute2 linux-modules-extra-$(uname -r)
315-
sudo modprobe vcan
316-
sudo ip link add dev vcan0 type vcan
317-
sudo ip link set up vcan0
318-
- name: test ${{matrix.config}}
319-
env:
320-
CI_BUILD_TARGET: ${{matrix.config}}
321-
shell: bash
322-
run: |
323-
PATH="/github/home/.local/bin:$PATH"
324-
Tools/scripts/build_ci.sh
Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
name: test ap_periph
2+
3+
on: [push, pull_request]
4+
# paths:
5+
# - "*"
6+
# - "!README.md" <-- don't rebuild on doc change
7+
8+
jobs:
9+
build-gcc-ap_periph:
10+
runs-on: ubuntu-20.04
11+
container: khancyr/ardupilot-dev-base:latest
12+
steps:
13+
# git checkout the PR
14+
- uses: actions/checkout@v2
15+
with:
16+
submodules: 'recursive'
17+
# Put ccache into github cache for faster build
18+
- name: Prepare ccache timestamp
19+
id: ccache_cache_timestamp
20+
run: |
21+
NOW=$(date -u +"%F-%T")
22+
echo "::set-output name=timestamp::${NOW}"
23+
- name: ccache cache files
24+
uses: actions/cache@v2
25+
with:
26+
path: ~/.ccache
27+
key: ${{github.workflow}}-ccache-${{steps.ccache_cache_timestamp.outputs.timestamp}}
28+
restore-keys: ${{github.workflow}}-ccache- # restore ccache from either previous build on this branch or on master
29+
- name: setup ccache
30+
run: |
31+
mkdir -p ~/.ccache
32+
echo "base_dir = ${GITHUB_WORKSPACE}" > ~/.ccache/ccache.conf
33+
echo "compression = true" >> ~/.ccache/ccache.conf
34+
echo "compression_level = 6" >> ~/.ccache/ccache.conf
35+
echo "max_size = 400M" >> ~/.ccache/ccache.conf
36+
ccache -s
37+
ccache -z
38+
- name: install 32-bit libraries
39+
run: |
40+
dpkg --add-architecture i386
41+
apt-get update
42+
apt-get install -y gcc-multilib g++-multilib
43+
44+
- name: build sitl_periph_gps
45+
shell: bash
46+
run: |
47+
PATH="/github/home/.local/bin:$PATH"
48+
./waf configure --board sitl_periph_gps
49+
./waf build --target bin/AP_Periph
50+
ccache -s
51+
ccache -z
52+
53+
autotest-can:
54+
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
55+
runs-on: ubuntu-20.04
56+
container:
57+
image: khancyr/ardupilot-dev-base:latest
58+
options: --privileged
59+
strategy:
60+
fail-fast: false # don't cancel if a job from the matrix fails
61+
matrix:
62+
config: [
63+
sitltest-can,
64+
]
65+
66+
steps:
67+
# git checkout the PR
68+
- uses: actions/checkout@v2
69+
with:
70+
submodules: 'recursive'
71+
# Put ccache into github cache for faster build
72+
- name: Prepare ccache timestamp
73+
id: ccache_cache_timestamp
74+
run: |
75+
NOW=$(date -u +"%F-%T")
76+
echo "::set-output name=timestamp::${NOW}"
77+
- name: ccache cache files
78+
uses: actions/cache@v2
79+
with:
80+
path: ~/.ccache
81+
key: ${{github.workflow}}-ccache-${{steps.ccache_cache_timestamp.outputs.timestamp}}
82+
restore-keys: ${{github.workflow}}-ccache- # restore ccache from either previous build on this branch or on master
83+
- name: setup ccache
84+
run: |
85+
mkdir -p ~/.ccache
86+
echo "base_dir = ${GITHUB_WORKSPACE}" > ~/.ccache/ccache.conf
87+
echo "compression = true" >> ~/.ccache/ccache.conf
88+
echo "compression_level = 6" >> ~/.ccache/ccache.conf
89+
echo "max_size = 400M" >> ~/.ccache/ccache.conf
90+
ccache -s
91+
ccache -z
92+
- name: install 32-bit libraries
93+
run: |
94+
sudo dpkg --add-architecture i386
95+
sudo apt-get update
96+
sudo apt-get install -y gcc-multilib g++-multilib
97+
- name: setup can-utils
98+
run: |
99+
sudo apt-get update
100+
sudo apt-get -y install can-utils iproute2 linux-modules-extra-$(uname -r)
101+
sudo modprobe vcan
102+
sudo ip link add dev vcan0 type vcan
103+
sudo ip link set up vcan0
104+
- name: test ${{matrix.config}}
105+
env:
106+
CI_BUILD_TARGET: ${{matrix.config}}
107+
shell: bash
108+
run: |
109+
PATH="/github/home/.local/bin:$PATH"
110+
Tools/scripts/build_ci.sh

0 commit comments

Comments
 (0)