-
Notifications
You must be signed in to change notification settings - Fork 471
165 lines (153 loc) · 6.47 KB
/
pr-or-master-push.yml
File metadata and controls
165 lines (153 loc) · 6.47 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
# Run whenever a PR is generated or updated.
# Most jobs check out the code, ensure Python3 is installed, and for build
# tests the ESP8266 toolchain is cached when possible to speed up execution.
name: ESP8266Audio
on:
push:
branches:
- master
pull_request:
permissions:
contents: read
pull-requests: write
jobs:
build-rp2040:
name: Build RP2040
runs-on: ubuntu-latest
strategy:
matrix:
shift: [1-, 2-, 3-, 4-, 5-]
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install Arduino-CLI, RP2040 core, this library
run: |
wget --quiet https://downloads.arduino.cc/arduino-cli/nightly/arduino-cli_nightly-latest_Linux_64bit.tar.gz
tar xf arduino-cli_nightly-latest_Linux_64bit.tar.gz
./arduino-cli config init
./arduino-cli config add board_manager.additional_urls https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json
./arduino-cli config set library.enable_unsafe_install true
./arduino-cli core update-index
./arduino-cli core install rp2040:rp2040
mkdir -p ~/Arduino/libraries
cp -a /home/runner/work/ESP8266Audio/ESP8266Audio ~/Arduino/libraries/.
- name: Build examples RP2040
run: |
./tests/build-ci.sh rp2040 ${{matrix.shift}} "rp2040:rp2040:rpipicow:flash=2097152_262144,freq=200,opt=Small,os=none,profile=Disabled,rtti=Disabled,stackprotect=Disabled,exceptions=Disabled,dbgport=Disabled,dbglvl=None,usbstack=picosdk,wificountry=worldwide,ipbtstack=ipv4only,uploadmethod=default"
build-esp8266:
name: Build all examples on Arduino-ESP8266 latest release
runs-on: ubuntu-latest
strategy:
matrix:
shift: [1-, 2-, 3-, 4-, 5-]
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install Arduino-CLI, ESP8266 core, this library
run: |
wget --quiet https://downloads.arduino.cc/arduino-cli/nightly/arduino-cli_nightly-latest_Linux_64bit.tar.gz
tar xf arduino-cli_nightly-latest_Linux_64bit.tar.gz
./arduino-cli config init
mkdir -p ~/Arduino/libraries
cp -a /home/runner/work/ESP8266Audio/ESP8266Audio ~/Arduino/libraries/.
mkdir -p ~/Arduino/hardware/esp8266com
cd ~/Arduino/hardware/esp8266com
git clone https://github.com/esp8266/Arduino.git esp8266
cd esp8266
git submodule update --init --recursive
cd tools
./get.py -q
- name: Build examples ESP8266
run: |
./tests/build-ci.sh esp8266 ${{matrix.shift}} "esp8266com:esp8266:d1_mini:xtal=80,vt=flash,exception=disabled,stacksmash=disabled,ssl=all,mmu=3232,non32xfer=fast,eesz=4M2M,ip=lm2f,dbg=Disabled,lvl=None____,optim=Smallest,wipe=none,baud=921600,iramfloat=no"
build-esp32:
name: Build all examples on Arduino-ESP32 latest release
runs-on: ubuntu-latest
strategy:
matrix:
shift: [1-, 2-, 3-, 4-, 5-]
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install Arduino-CLI, ESP32 core, this library
run: |
wget --quiet https://downloads.arduino.cc/arduino-cli/nightly/arduino-cli_nightly-latest_Linux_64bit.tar.gz
tar xf arduino-cli_nightly-latest_Linux_64bit.tar.gz
./arduino-cli config init
./arduino-cli config add board_manager.additional_urls https://espressif.github.io/arduino-esp32/package_esp32_index.json
./arduino-cli config set library.enable_unsafe_install true
./arduino-cli core update-index
./arduino-cli core install esp32:esp32
mkdir -p ~/Arduino/libraries
cp -a /home/runner/work/ESP8266Audio/ESP8266Audio ~/Arduino/libraries/.
- name: Build examples ESP32C6
run: |
./tests/build-ci.sh esp32c6 ${{matrix.shift}} "esp32:esp32:esp32c6:PartitionScheme=huge_app"
# Run host test suite under valgrind for runtime checking of code.
host-tests:
name: Host tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Run host tests
env:
TRAVIS_BUILD_DIR: ${{ github.workspace }}
TRAVIS_TAG: ${{ github.ref }}
run: |
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install valgrind lcov gcc-multilib g++-multilib libc6-dbg:i386
cd ./tests/host/
make
valgrind --leak-check=full --track-origins=yes -v --error-limit=no --show-leak-kinds=all --error-exitcode=999 ./mp3
valgrind --leak-check=full --track-origins=yes -v --error-limit=no --show-leak-kinds=all --error-exitcode=999 ./aac
valgrind --leak-check=full --track-origins=yes -v --error-limit=no --show-leak-kinds=all --error-exitcode=999 ./wav
valgrind --leak-check=full --track-origins=yes -v --error-limit=no --show-leak-kinds=all --error-exitcode=999 ./flac
valgrind --leak-check=full --track-origins=yes -v --error-limit=no --show-leak-kinds=all --error-exitcode=999 ./mod
valgrind --leak-check=full --track-origins=yes -v --error-limit=no --show-leak-kinds=all --error-exitcode=999 ./wav
valgrind --leak-check=full --track-origins=yes -v --error-limit=no --show-leak-kinds=all --error-exitcode=999 ./midi
valgrind --leak-check=full --track-origins=yes -v --error-limit=no --show-leak-kinds=all --error-exitcode=999 ./opus
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: arduino/arduino-lint-action@4de5fc895deecbda2f6b1cc05de7a8fdd5c4c51f # v2
with:
library-manager: 'update'
# Style and spelling
code-spell:
name: Spelling, Style
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Run codespell
uses: codespell-project/actions-codespell@406322ec52dd7b488e48c1c4b82e2a8b3a1bf630 # v2.1
with:
skip: ./src/libmad,./src/libhelix-aac,./src/libopus,./src/libflac
ignore_words_list: ESP8266,esp8266,esp,dout,DOUT,ser,ans,inout,numer,hist
- name: Run astyle on all code/examples
run: |
sudo apt update
sudo apt install astyle
./tests/restyle.sh
# If anything changed, GIT should return an error and fail the test
git diff --exit-code