-
-
Notifications
You must be signed in to change notification settings - Fork 19
133 lines (123 loc) · 4.05 KB
/
build.yaml
File metadata and controls
133 lines (123 loc) · 4.05 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
name: Build modules
on: [push, pull_request]
jobs:
test_static:
permissions:
contents: write
runs-on: ubuntu-24.04
env:
MPY_DIR: ./micropython
MICROPYTHON_BIN: ./micropython/ports/unix/build-standard/micropython
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install OS dependencies
run: sudo add-apt-repository universe
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- uses: actions/checkout@v4
with:
repository: jonnor/micropython
path: micropython
ref: v1.25preview-linking
- name: Install Python dependencies
run: pip install -r requirements.txt
- name: Setup MicroPython X86
working-directory: micropython
run: source tools/ci.sh && ci_unix_32bit_setup && ci_unix_build_helper VARIANT=standard USER_C_MODULES=`pwd`/../src/
- name: Run test on x64
run: make emlearn_trees.results V=1
test_dynamic:
permissions:
contents: write
runs-on: ubuntu-24.04
env:
MPY_DIR: ./micropython
MICROPYTHON_BIN: ./micropython/ports/unix/build-standard/micropython
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install OS dependencies
run: sudo add-apt-repository universe
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- uses: actions/checkout@v4
with:
repository: jonnor/micropython
path: micropython
ref: v1.25preview-linking
- name: Install Python dependencies
run: pip install -r requirements.txt
- name: Setup MicroPython X86
working-directory: micropython
run: source tools/ci.sh && ci_unix_32bit_setup && ci_unix_standard_build
- name: Run test and build module x64
run: make check ARCH=x64 V=1
- name: Setup MicroPython ARM
working-directory: micropython
run: source tools/ci.sh && ci_rp2_setup
- name: Build module armv6m
run: echo make dist ARCH=armv6m V=1
- name: Build module armv7m
run: make dist ARCH=armv7m V=1
- name: Build module armv7emsp
run: make dist ARCH=armv7emsp V=1
- name: Setup MicroPython ESP32
working-directory: micropython
run: source tools/ci.sh && ci_esp32_idf_setup
- name: Build module xtensawin
run: source micropython/esp-idf/export.sh && pip install -r requirements.txt && make dist ARCH=xtensawin V=1
- name: Archive dist artifacts
uses: actions/upload-artifact@v4
with:
name: dist
path: dist
- name: Prepare release
run: make release
- name: Archive release artifacts
uses: actions/upload-artifact@v4
with:
name: release
path: emlearn-micropython-*.zip
- name: Deploy to Github Pages
if: "github.ref_name == 'master' || github.ref_type == 'tag'"
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist
keep_files: true
destination_dir: builds/${{ github.ref_name }}
docs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10']
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install OS dependencies
run: |
sudo apt-get update
sudo apt-get install -yqq libsndfile1 libsndfile1-dev doxygen
- name: Install Python dependencies
run: |
python -m pip install -U 'pip<20'
pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
if [ -f requirements.dev.txt ]; then pip install -r requirements.dev.txt; fi
- name: Build documentation using Sphinx
working-directory: ./docs
env:
PYTHONPATH: ../:../build/lib.linux-x86_64-cpython-310
READTHEDOCS: 'True'
run: |
make html