Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Ardupilot
GitHub Repository: Ardupilot/ardupilot
Path: blob/master/.github/workflows/test_environment.yml
6346 views
1
name: test environment setup
2
on:
3
schedule:
4
- cron: '0 0 * * 6' # every saturday at midnight
5
workflow_dispatch:
6
push:
7
paths:
8
- '.github/workflows/test_environment.yml'
9
- 'Tools/environment_install/**'
10
11
pull_request:
12
paths:
13
- '.github/workflows/test_environment.yml'
14
- 'Tools/environment_install/**'
15
16
17
concurrency:
18
group: ci-${{github.workflow}}-${{ github.ref }}
19
cancel-in-progress: true
20
21
jobs:
22
build:
23
runs-on: ubuntu-22.04
24
container:
25
image: ${{matrix.os}}:${{matrix.name}}
26
options: --privileged
27
strategy:
28
fail-fast: false # don't cancel if a job from the matrix fails
29
matrix:
30
include:
31
- os: ubuntu
32
name: focal
33
- os: ubuntu
34
name: jammy
35
- os: ubuntu
36
name: noble
37
- os: archlinux
38
name: latest
39
- os: debian
40
name: trixie
41
- os: debian
42
name: bookworm
43
- os: debian
44
name: bullseye
45
steps:
46
- name: Install Git
47
timeout-minutes: 30
48
env:
49
DEBIAN_FRONTEND: noninteractive
50
TZ: Europe/Paris
51
shell: 'script -q -e -c "bash {0}"'
52
run: |
53
case ${{matrix.os}} in
54
*"ubuntu"*)
55
apt-get update && apt-get install --no-install-recommends -qy \
56
lsb-release \
57
sudo \
58
software-properties-common
59
add-apt-repository ppa:git-core/ppa -y
60
apt-get update && apt-get install --no-install-recommends -qy git
61
;;
62
*"debian"*)
63
apt-get update && apt-get install --no-install-recommends -qy \
64
lsb-release \
65
sudo \
66
git \
67
ca-certificates
68
;;
69
*"archlinux"*)
70
pacman -Syu --noconfirm --needed git sudo
71
;;
72
esac
73
74
# git checkout the PR
75
- uses: actions/checkout@v6
76
with:
77
submodules: 'recursive'
78
- name: test install environment ${{matrix.os}}.${{matrix.name}}
79
timeout-minutes: 60
80
env:
81
DISABLE_MAVNATIVE: True
82
DEBIAN_FRONTEND: noninteractive
83
TZ: Europe/Paris
84
SKIP_AP_GIT_CHECK: 1
85
shell: 'script -q -e -c "bash {0}"'
86
run: |
87
PATH="/github/home/.local/bin:$PATH"
88
ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
89
sed -i 's/\$EUID/\$ID/' Tools/environment_install/install-prereqs-ubuntu.sh
90
sed -i 's/sudo usermod/\#sudo usermod/' Tools/environment_install/install-prereqs-ubuntu.sh
91
sed -i 's/sudo usermod/\#sudo usermod/' Tools/environment_install/install-prereqs-arch.sh
92
case ${{matrix.os}} in
93
*"ubuntu"*)
94
echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
95
Tools/environment_install/install-prereqs-ubuntu.sh -qy
96
;;
97
*"debian"*)
98
Tools/environment_install/install-prereqs-ubuntu.sh -qy
99
;;
100
*"archlinux"*)
101
cp /etc/skel/.bashrc /root
102
cp /etc/skel/.bashrc /github/home
103
git config --global --add safe.directory ${GITHUB_WORKSPACE}
104
Tools/environment_install/install-prereqs-arch.sh -qy
105
;;
106
esac
107
108
- name: test build SITL ${{matrix.os}}.${{matrix.name}}
109
env:
110
DISABLE_MAVNATIVE: True
111
DEBIAN_FRONTEND: noninteractive
112
TZ: Europe/Paris
113
shell: 'script -q -e -c "bash {0}"'
114
run: |
115
git config --global --add safe.directory ${GITHUB_WORKSPACE}
116
source ~/.bashrc
117
source $HOME/venv-ardupilot/bin/activate || true
118
git config --global --add safe.directory /__w/ardupilot/ardupilot
119
./waf configure
120
./waf rover
121
122
- name: test build Chibios ${{matrix.os}}.${{matrix.name}}
123
if: matrix.os != 'alpine'
124
env:
125
DISABLE_MAVNATIVE: True
126
DEBIAN_FRONTEND: noninteractive
127
TZ: Europe/Paris
128
shell: 'script -q -e -c "bash {0}"'
129
run: |
130
git config --global --add safe.directory ${GITHUB_WORKSPACE}
131
source ~/.bashrc
132
source $HOME/venv-ardupilot/bin/activate || true
133
case ${{matrix.os}} in
134
*"archlinux"*)
135
export PATH=/opt/gcc-arm-none-eabi-10-2020-q4-major/bin:$PATH
136
export PATH=/__w/ardupilot/ardupilot/ardupilot/Tools/autotest:$PATH
137
;;
138
esac
139
git config --global --add safe.directory /__w/ardupilot/ardupilot
140
./waf configure --board CubeOrange
141
./waf plane
142
143
build-alpine: # special case for alpine as it doesn't have bash by default
144
runs-on: ubuntu-22.04
145
container:
146
image: alpine:latest
147
options: --privileged
148
steps:
149
- name: Install Git
150
timeout-minutes: 30
151
env:
152
DEBIAN_FRONTEND: noninteractive
153
TZ: Europe/Paris
154
run: |
155
apk update && apk add --no-cache git
156
- uses: actions/checkout@v6
157
with:
158
submodules: 'recursive'
159
- name: test install environment alpine
160
timeout-minutes: 60
161
env:
162
DISABLE_MAVNATIVE: True
163
TZ: Europe/Paris
164
SKIP_AP_GIT_CHECK: 1
165
run: |
166
PATH="/github/home/.local/bin:$PATH"
167
Tools/environment_install/install-prereqs-alpine.sh
168
- name: test build SITL alpine
169
env:
170
DISABLE_MAVNATIVE: True
171
TZ: Europe/Paris
172
run: |
173
git config --global --add safe.directory ${GITHUB_WORKSPACE}
174
git config --global --add safe.directory /__w/ardupilot/ardupilot
175
./waf configure
176
./waf rover
177