Skip to content

Commit 6106909

Browse files
committed
Swap the CI to GitHub Actions from Travis
1 parent 7cbae3d commit 6106909

File tree

8 files changed

+330
-246
lines changed

8 files changed

+330
-246
lines changed

.github/workflows/build.yml

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

Lines changed: 0 additions & 161 deletions
This file was deleted.

0 commit comments

Comments
 (0)