Skip to content

Commit 193df55

Browse files
authored
Merge pull request micropython#2088 from tannewt/master
Swap the CI to GitHub Actions from Travis
2 parents 7cbae3d + 2c17d23 commit 193df55

8 files changed

+325
-246
lines changed

.github/workflows/build.yml

+192
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,192 @@
1+
name: Build CI
2+
3+
on: [push, pull_request, release]
4+
5+
jobs:
6+
test:
7+
runs-on: ubuntu-16.04
8+
steps:
9+
- name: Dump GitHub context
10+
env:
11+
GITHUB_CONTEXT: ${{ toJson(github) }}
12+
run: echo "$GITHUB_CONTEXT"
13+
- name: Fail if not a release publish # workaround has `on` doesn't have this filter
14+
run: exit 1
15+
if: github.event_name == 'release' && (github.event.action != 'published' && github.event.action != 'rerequested')
16+
- name: Set up Python 3.5
17+
uses: actions/setup-python@v1
18+
with:
19+
python-version: 3.5
20+
- name: Install deps
21+
run: |
22+
sudo apt-get install -y gettext librsvg2-bin
23+
pip install requests sh click setuptools cpp-coveralls Sphinx sphinx-rtd-theme recommonmark sphinxcontrib-svg2pdfconverter polib pyyaml
24+
- name: Versions
25+
run: |
26+
gcc --version
27+
python3 --version
28+
- uses: actions/checkout@v1
29+
with:
30+
submodules: true
31+
- name: CircuitPython version
32+
run: git describe --dirty --always --tags
33+
- name: Build mpy-cross
34+
run: make -C mpy-cross -j2
35+
- name: Build unix port
36+
run: |
37+
make -C ports/unix deplibs -j2
38+
make -C ports/unix -j2
39+
make -C ports/unix coverage -j2
40+
- name: Test all
41+
run: MICROPY_CPYTHON3=python3.5 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -j1
42+
working-directory: tests
43+
- name: Print failure info
44+
run: |
45+
for exp in *.exp;
46+
do testbase=$(basename $exp .exp);
47+
echo -e "\nFAILURE $testbase";
48+
diff -u $testbase.exp $testbase.out;
49+
done
50+
working-directory: tests
51+
if: failure()
52+
- name: Test threads
53+
run: MICROPY_CPYTHON3=python3.5 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -j1 -d thread
54+
working-directory: tests
55+
- name: Native Tests
56+
run: MICROPY_CPYTHON3=python3.5 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -j1 --emit native
57+
working-directory: tests
58+
- name: mpy Tests
59+
run: MICROPY_CPYTHON3=python3.5 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -j1 --via-mpy -d basics float
60+
working-directory: tests
61+
- name: Docs
62+
run: sphinx-build -E -W -b html . _build/html
63+
- name: Translations
64+
run: make check-translate
65+
- name: New boards check
66+
run: python3 -u ci_new_boards_check.py
67+
working-directory: tools
68+
69+
build-arm:
70+
runs-on: ubuntu-16.04
71+
needs: test
72+
strategy:
73+
fail-fast: false
74+
matrix:
75+
board:
76+
- "arduino_mkr1300"
77+
- "arduino_mkrzero"
78+
- "arduino_zero"
79+
- "bast_pro_mini_m0"
80+
- "capablerobot_usbhub"
81+
- "catwan_usbstick"
82+
- "circuitplayground_bluefruit"
83+
- "circuitplayground_express"
84+
- "circuitplayground_express_crickit"
85+
- "cp32-m4"
86+
- "datalore_ip_m4"
87+
- "datum_distance"
88+
- "datum_imu"
89+
- "datum_light"
90+
- "datum_weather"
91+
- "electronut_labs_blip"
92+
- "electronut_labs_papyr"
93+
- "escornabot_makech"
94+
- "feather_m0_adalogger"
95+
- "feather_m0_basic"
96+
- "feather_m0_express"
97+
- "feather_m0_express_crickit"
98+
- "feather_m0_rfm69"
99+
- "feather_m0_rfm9x"
100+
- "feather_m0_supersized"
101+
- "feather_m4_express"
102+
- "feather_nrf52840_express"
103+
- "feather_radiofruit_zigbee"
104+
- "gemma_m0"
105+
- "grandcentral_m4_express"
106+
- "hallowing_m0_express"
107+
- "itsybitsy_m0_express"
108+
- "itsybitsy_m4_express"
109+
- "kicksat-sprite"
110+
- "makerdiary_nrf52840_mdk"
111+
- "makerdiary_nrf52840_mdk_usb_dongle"
112+
- "meowmeow"
113+
- "metro_m0_express"
114+
- "metro_m4_airlift_lite"
115+
- "metro_m4_express"
116+
- "metro_nrf52840_express"
117+
- "mini_sam_m4"
118+
- "monster_m4sk"
119+
- "particle_argon"
120+
- "particle_boron"
121+
- "particle_xenon"
122+
- "pca10056"
123+
- "pca10059"
124+
- "pewpew10"
125+
- "pirkey_m0"
126+
- "pybadge"
127+
- "pybadge_airlift"
128+
- "pygamer"
129+
- "pygamer_advance"
130+
- "pyportal"
131+
- "pyportal_titano"
132+
- "pyruler"
133+
- "robohatmm1_m0"
134+
- "robohatmm1_m4"
135+
- "sam32"
136+
- "snekboard"
137+
- "sparkfun_lumidrive"
138+
- "sparkfun_nrf52840_mini"
139+
- "sparkfun_redboard_turbo"
140+
- "sparkfun_samd21_dev"
141+
- "sparkfun_samd21_mini"
142+
- "trellis_m4_express"
143+
- "trinket_m0"
144+
- "trinket_m0_haxpress"
145+
- "uchip"
146+
- "ugame10"
147+
148+
steps:
149+
- name: Set up Python 3.5
150+
uses: actions/setup-python@v1
151+
with:
152+
python-version: 3.5
153+
- name: Install deps
154+
run: |
155+
sudo apt-get install -y gettext
156+
pip install requests sh click setuptools awscli
157+
wget https://s3.amazonaws.com/adafruit-circuit-python/gcc-arm-embedded_7-2018q2-1~xenial1_amd64.deb && sudo dpkg -i gcc-arm-embedded*_amd64.deb
158+
- name: Versions
159+
run: |
160+
gcc --version
161+
arm-none-eabi-gcc --version
162+
python3 --version
163+
- uses: actions/checkout@v1
164+
with:
165+
submodules: true
166+
- name: mpy-cross
167+
run: make -C mpy-cross -j2
168+
- name: build
169+
run: python3 -u build_release_files.py
170+
working-directory: tools
171+
env:
172+
BOARDS: ${{ matrix.board }}
173+
- uses: actions/[email protected]
174+
with:
175+
name: ${{ matrix.board }}
176+
path: bin/${{ matrix.board }}
177+
- name: Upload to S3
178+
run: aws s3 cp bin/ s3://adafruit-circuit-python/bin/ --recursive --no-progress --region us-east-1
179+
env:
180+
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
181+
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
182+
if: github.event_name == 'push' || (github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'rerequested'))
183+
- name: Install upload deps
184+
run: |
185+
pip install uritemplate
186+
- name: Upload to Release
187+
run: python3 -u upload_release_files.py
188+
working-directory: tools
189+
env:
190+
UPLOAD_URL: ${{ github.event.release.upload_url }}
191+
ADABOT_GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
192+
if: github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'rerequested')
+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Update CircuitPython.org
2+
3+
on: release
4+
5+
jobs:
6+
website:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Dump GitHub context
10+
env:
11+
GITHUB_CONTEXT: ${{ toJson(github) }}
12+
run: echo "$GITHUB_CONTEXT"
13+
- name: Fail if not a release publish # workaround has `on` doesn't have this filter
14+
run: exit 1
15+
if: github.event.action != 'published'
16+
- name: Set up Python 3.5
17+
uses: actions/setup-python@v1
18+
with:
19+
python-version: 3.5
20+
- name: Install deps
21+
run: |
22+
pip install requests sh click
23+
- name: Versions
24+
run: |
25+
gcc --version
26+
python3 --version
27+
- uses: actions/checkout@v1
28+
with:
29+
submodules: true
30+
- name: CircuitPython version
31+
run: git describe --dirty --always --tags
32+
- name: Website
33+
run: python3 build_board_info.py
34+
working-directory: tools
35+
env:
36+
RELEASE_TAG: ${{ github.event.release.tag_name }}
37+
ADABOT_GITHUB_ACCESS_TOKEN: ${{ secrets.ADABOT_GITHUB_ACCESS_TOKEN }}
38+
if: github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'rerequested')

.travis.yml

-161
This file was deleted.

0 commit comments

Comments
 (0)