forked from esp8266/Arduino
-
Notifications
You must be signed in to change notification settings - Fork 0
167 lines (147 loc) · 4.78 KB
/
ci.yml
File metadata and controls
167 lines (147 loc) · 4.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
name: CI
on:
push:
branches:
- master
- ai/fix-issue-1
pull_request:
branches:
- master
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build & Test
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
include:
# PlatformIO builds
- job_name: PlatformIO (even)
script: tests/platformio.sh
build_parity: even
- job_name: PlatformIO (odd)
script: tests/platformio.sh
build_parity: odd
# Arduino builds
- job_name: Arduino Build (even)
script: tests/build.sh
build_parity: even
- job_name: Arduino Build (odd)
script: tests/build.sh
build_parity: odd
# Debug builds
- job_name: Debug Build (even)
script: tests/debug.sh
build_parity: even
- job_name: Debug Build (odd)
script: tests/debug.sh
build_parity: odd
# IPv6 builds
- job_name: IPv6 Build (even)
script: tests/build6.sh
build_parity: even
- job_name: IPv6 Build (odd)
script: tests/build6.sh
build_parity: odd
# lwIP-v1.4 builds
- job_name: lwIP-v1.4 Build (even)
script: tests/build1.sh
build_parity: even
- job_name: lwIP-v1.4 Build (odd)
script: tests/build1.sh
build_parity: odd
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: false
- name: Set environment variables
run: |
echo "TRAVIS_BUILD_DIR=$GITHUB_WORKSPACE" >> $GITHUB_ENV
echo "CC=gcc-7" >> $GITHUB_ENV
echo "CXX=g++-7" >> $GITHUB_ENV
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y g++-7 gcc-7 arduino valgrind lcov
# Install xtensa toolchain
wget -q https://github.com/esp8266/Arduino/releases/download/2.5.2/xtensa-lx106-elf-linux64-1.22.0-98.txz
tar -xf xtensa-lx106-elf-linux64-1.22.0-98.txz -C ~/
echo "$HOME/xtensa-lx106-elf/bin" >> $GITHUB_PATH
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Install Python dependencies
run: |
pip install --user -U platformio
pip install --user -r doc/requirements.txt 2>/dev/null || true
- name: Prepare PlatformIO (for PlatformIO jobs)
if: contains(matrix.script, 'platformio')
run: |
pip install --user -U https://github.com/platformio/platformio/archive/develop.zip
platformio platform install "https://github.com/platformio/platform-espressif8266.git#feature/stage"
sed -i 's|https://github.com/esp8266/Arduino.git|*|' ~/.platformio/platforms/espressif8266/platform.json
ln -s $GITHUB_WORKSPACE ~/.platformio/packages/framework-arduinoespressif8266
pio lib install "ArduinoJson@^6.11.0"
- name: Make scripts executable
run: |
chmod +x tests/*.sh
chmod +x tests/ci/*.sh
- name: Run test script
run: |
export BUILD_PARITY=${{ matrix.build_parity }}
${{ matrix.script }}
host-tests:
name: Host Tests
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: false
- name: Set environment variables
run: |
echo "TRAVIS_BUILD_DIR=$GITHUB_WORKSPACE" >> $GITHUB_ENV
echo "CC=gcc-7" >> $GITHUB_ENV
echo "CXX=g++-7" >> $GITHUB_ENV
- name: Install dependencies
run: sudo apt-get install -y valgrind lcov
- name: Run host tests
run: |
chmod +x tests/ci/host_test.sh
tests/ci/host_test.sh
mock-test:
name: Mock Trivial Test
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: false
- name: Set environment variables
run: |
echo "TRAVIS_BUILD_DIR=$GITHUB_WORKSPACE" >> $GITHUB_ENV
echo "CC=gcc-7" >> $GITHUB_ENV
echo "CXX=g++-7" >> $GITHUB_ENV
- name: Run mock test
run: |
chmod +x tests/buildm.sh
tests/buildm.sh
build-boards:
name: Build Boards
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: false
- name: Set environment variables
run: echo "TRAVIS_BUILD_DIR=$GITHUB_WORKSPACE" >> $GITHUB_ENV
- name: Build boards
run: |
chmod +x tests/ci/build_boards.sh
tests/ci/build_boards.sh