Skip to content

Commit 9850c22

Browse files
committed
(fix) unix port workflow
1 parent 44f70b1 commit 9850c22

File tree

8 files changed

+226
-70
lines changed

8 files changed

+226
-70
lines changed

.github/workflows/unix_port.yml renamed to .github/workflows/unix_port_pr.yml

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
name: Build lv_micropython unix port
22

33
on:
4-
push:
54
pull_request:
65

76
jobs:
@@ -23,18 +22,31 @@ jobs:
2322
run: git submodule update --init --recursive user_modules/lv_binding_micropython
2423
- name: Update Unix port submodules
2524
run: make -C ports/unix DEBUG=1 submodules
25+
26+
# - name: Debug GitHub Event
27+
# run: -${{ tojson(github.event) }}
28+
# shell: cat {0}
29+
2630
- name: Checkout lv_bindings
2731
working-directory: ./user_modules/lv_binding_micropython
2832
run: |
29-
git fetch --force ${{ github.event.repository.html_url }} "+refs/heads/*:refs/remotes/origin/*"
30-
git fetch --force ${{ github.event.repository.html_url }} "+refs/pull/*:refs/remotes/origin/pr/*"
31-
git checkout ${{ github.sha }} || git checkout ${{ github.event.pull_request.head.sha }}
33+
34+
git fetch --force ${{ github.event.repository.html_url }} "+refs/pull/${{github.event.pull_request.number}}/head:refs/remotes/origin/${{github.event.pull_request.head.ref}}"
35+
git checkout ${{ github.event.pull_request.head.sha }}
3236
git submodule update --init --recursive
3337
- name: Build mpy-cross
3438
run: make -j $(nproc) -C mpy-cross
3539
- name: Build the unix port
3640
run: make -j $(nproc) -C ports/unix DEBUG=1 VARIANT=lvgl
37-
- name: Run tests
38-
run: |
39-
export XDG_RUNTIME_DIR=/tmp
40-
user_modules/lv_binding_micropython/tests/run.sh
41+
42+
- name: Run MicroPython Tests
43+
run: MICROPY_MICROPYTHON=ports/unix/build-lvgl/micropython ./tests/run-tests.py -d tests/basics
44+
45+
- name: Run MicroPython-LVGL API Tests
46+
run: MICROPY_MICROPYTHON=ports/unix/build-lvgl/micropython ./tests/run-tests.py -d user_modules/lv_binding_micropython/tests/api
47+
48+
# TODO: Fix run.sh catchsegv not found command
49+
# - name: Run tests
50+
# run: |
51+
# export XDG_RUNTIME_DIR=/tmp
52+
# user_modules/lv_binding_micropython/tests/run.sh

.github/workflows/unix_port_push.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Build MicroPython-LVGL unix port
2+
3+
on:
4+
push:
5+
6+
jobs:
7+
unix-lvgl:
8+
9+
runs-on: ubuntu-24.04
10+
11+
steps:
12+
- name: Install Dependencies
13+
run: |
14+
sudo add-apt-repository -y "deb http://archive.ubuntu.com/ubuntu `lsb_release -sc` main universe restricted multiverse"
15+
sudo apt-get update -y -qq
16+
sudo apt-get install libsdl2-dev parallel libfreetype-dev librlottie-dev libavformat-dev libavcodec-dev libswscale-dev libavutil-dev build-essential libc-bin
17+
python3 -m pip install pillow
18+
- name: Clone lv_micropython
19+
run: |
20+
git clone https://github.com/lvgl/lv_micropython.git .
21+
git checkout master
22+
- name: Initialize lv_bindings submodule
23+
run: git submodule update --init --recursive user_modules/lv_binding_micropython
24+
- name: Update Unix port submodules
25+
run: make -C ports/unix DEBUG=1 submodules
26+
27+
# - name: Debug GitHub Event
28+
# run: -${{ tojson(github.event) }}
29+
# shell: cat {0}
30+
31+
- name: Checkout lv_bindings
32+
working-directory: ./user_modules/lv_binding_micropython
33+
run: |
34+
35+
git fetch --force ${{ github.event.repository.html_url }} "+${{github.event.ref}}:refs/remotes/origin/${{github.event.head_commit.author.username}}-${{github.event.head_commit.id}}"
36+
git checkout ${{ github.event.head_commit.id }}
37+
git submodule update --init --recursive
38+
- name: Build mpy-cross
39+
run: make -j $(nproc) -C mpy-cross
40+
- name: Build the unix port
41+
run: make -j $(nproc) -C ports/unix DEBUG=1 VARIANT=lvgl
42+
43+
- name: Run MicroPython Tests
44+
run: MICROPY_MICROPYTHON=ports/unix/build-lvgl/micropython ./tests/run-tests.py -d tests/basics
45+
46+
- name: Run MicroPython-LVGL API Tests
47+
run: MICROPY_MICROPYTHON=ports/unix/build-lvgl/micropython ./tests/run-tests.py -d user_modules/lv_binding_micropython/tests/api
48+
49+
- name: Process Tests Artifacts
50+
working-directory: ./user_modules/lv_binding_micropython/tests
51+
run: ./imageconvert.py api/*.bin
52+
53+
- name: Upload Test Artifacts
54+
uses: actions/upload-artifact@v4
55+
with:
56+
name: API Tests Screenshots
57+
path: ./user_modules/lv_binding_micropython/tests/api/*.png
58+
59+
# TODO: Fix run.sh catchsegv not found command
60+
- name: Run tests
61+
run: |
62+
export XDG_RUNTIME_DIR=/tmp
63+
user_modules/lv_binding_micropython/tests/run.sh

0 commit comments

Comments
 (0)