forked from micropython/micropython-esp32-ulp
-
Notifications
You must be signed in to change notification settings - Fork 0
82 lines (71 loc) · 2.36 KB
/
run_tests.yaml
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
name: CI
on: [push, pull_request]
jobs:
tests:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y libffi-dev pkg-config bison flex
- name: Record version
run: |
export VER=$(git describe --always --tags)
echo ${VER}
###### Install tools ######
- name: Build MicroPython
id: build_micropython
run: |
echo "Building micropython"
git clone --depth 1 https://github.com/micropython/micropython.git
pushd micropython/mpy-cross
make
popd
pushd micropython/ports/unix
git describe --always --tags
make submodules
make
export PATH=$PATH:$PWD
echo "::set-output name=bin_dir::$PWD"
test $(micropython -c 'print("test")') = "test"
popd
- name: Build binutils-esp32ulp
id: build_binutils
run: |
echo "Building binutils-esp32ulp"
git clone --depth 1 https://github.com/espressif/binutils-esp32ulp.git
pushd binutils-esp32ulp
git describe --always --tags
./configure --target=esp32ulp-elf --prefix=$PWD/dist --disable-doc --disable-gdb --disable-libdecnumber --disable-readline --disable-sim
echo "MAKEINFO = :" >> Makefile
make
make install-strip
export PATH=$PATH:$PWD/dist/bin
echo "::set-output name=bin_dir::$PWD/dist/bin"
esp32ulp-elf-as --version | grep 'esp32ulp-elf' > /dev/null
popd
###### Run tests ######
- name: Run unit tests
id: unit_tests
run: |
export PATH=$PATH:${{ steps.build_micropython.outputs.bin_dir }}
cd tests
./00_unit_tests.sh
- name: Run compat tests
id: compat_tests
run: |
export PATH=$PATH:${{ steps.build_micropython.outputs.bin_dir }}
export PATH=$PATH:${{ steps.build_binutils.outputs.bin_dir }}
cd tests
./01_compat_tests.sh
- name: Run compat tests with RTC macros
id: compat_rtc_tests
run: |
export PATH=$PATH:${{ steps.build_micropython.outputs.bin_dir }}
export PATH=$PATH:${{ steps.build_binutils.outputs.bin_dir }}
cd tests
ln -s ../binutils-esp32ulp # already cloned earlier. reuse.
./02_compat_rtc_tests.sh