File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : test
2+
3+ on :
4+ push :
5+
6+ workflow_dispatch :
7+
8+ jobs :
9+ build :
10+ runs-on : ubuntu-latest
11+ steps :
12+ - uses : actions/checkout@v3
13+ - name : environment prepare
14+ run : |
15+ cd ~
16+ curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | sh -s 0.33.0
17+ ~/bin/arduino-cli version
18+ ~/bin/arduino-cli config init
19+ - name : install package
20+ run : |
21+ ~/bin/arduino-cli core update-index --additional-urls https://github.com/Air-duino/Arduino-pack-json-ci/releases/download/Nightly/package_air_index.json
22+ ~/bin/arduino-cli core install AirM2M:AirMCU@0.4.4 --additional-urls https://github.com/Air-duino/Arduino-pack-json-ci/releases/download/Nightly/package_air_index.json
23+ - name : replace package
24+ run : |
25+ rm -rf ~/.arduino15/packages/AirM2M/hardware/AirMCU/0.4.4/
26+ git submodule update --init --recursive
27+ cp -r /home/runner/work/action/Arduino-AirMCU ~/.arduino15/packages/AirM2M/hardware/AirMCU/0.4.4/
28+ - name : build
29+ run : |
30+ cd libraries
31+ python test.py
32+
Original file line number Diff line number Diff line change 1+ import os
2+
3+ root = "/home/runner/work/action/Arduino-AirMCU/libraries/"
4+
5+ for dir in os .listdir (root ):
6+ if not os .path .isdir (dir ):
7+ continue
8+ ex_path = root + dir + "/examples/"
9+ if not os .path .exists (ex_path ):
10+ continue
11+ for ex in os .listdir (ex_path ):
12+ ex_repo_path = ex_path + ex + "/"
13+ if not os .path .isdir (ex_repo_path ):
14+ continue
15+ print ("found example: " + ex_repo_path )
16+ #编译
17+ os .system ("/home/runner/bin/arduino-cli compile -b AirM2M:AirMCU:AirM2M_Air001_Board " + ex_repo_path )
18+
You can’t perform that action at this time.
0 commit comments