1+ # "Imitation is the sincerest form of flattery that mediocrity can pay to greatness."
2+
3+ name : prudynt-t
4+ on :
5+ workflow_dispatch :
6+
7+ env :
8+ TAG_NAME : release
9+
10+ jobs :
11+ buildroot :
12+ name : prudynt
13+ runs-on : ubuntu-latest
14+ strategy :
15+ fail-fast : false
16+
17+ steps :
18+ - name : Checkout source
19+ uses : actions/checkout@v4
20+ with :
21+ submodules : ' true'
22+
23+ - name : Setup cache directories
24+ run : |
25+ mkdir -p /tmp/ccache
26+ ln -s /tmp/ccache ${HOME}/.ccache
27+
28+ - name : Setup ccache
29+ uses : actions/cache@v4
30+ if : always()
31+ with :
32+ path : /tmp/ccache
33+ key : ${{ runner.os }}-ccache-${{ github.sha }}
34+ restore-keys : |
35+ ${{ runner.os }}-ccache-
36+
37+ - name : Setup repo sources for GCC13
38+ run : |
39+ sudo echo "deb http://archive.ubuntu.com/ubuntu/ lunar main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list
40+ sudo tee -a /etc/apt/preferences.d/prefer-jammy <<EOF
41+ Package: *
42+ Pin: release a=jammy
43+ Pin-Priority: 500
44+
45+ Package: *
46+ Pin: release a=lunar
47+ Pin-Priority: 100
48+ EOF
49+
50+ - name : Update system sources
51+ run : |
52+ sudo apt-get update
53+
54+ - name : Install build dependencies
55+ run : |
56+ sudo apt-get install -y --no-install-recommends --no-install-suggests build-essential bc bison cpio curl file flex git libncurses-dev make rsync unzip wget whiptail gcc gcc-mipsel-linux-gnu lzop u-boot-tools ca-certificates ccache
57+
58+ - name : Install GCC13 dependencies
59+ run : |
60+ sudo DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --no-install-suggests libc6=2.37-0ubuntu2 libc-bin=2.37-0ubuntu2 libc6-mipsel-cross=2.37-0ubuntu1cross1 libc6-dev=2.37-0ubuntu2 libc-dev-bin=2.37-0ubuntu2 coreutils=9.1-1ubuntu2 libgmp10=2:6.2.1+dfsg1-1.1ubuntu1
61+
62+ - name : Download toolchain
63+ run : |
64+ wget https://github.com/themactep/thingino-firmware/releases/download/toolchain/thingino-toolchain_xburst1_musl_gcc13-linux-mipsel.tar.gz
65+ tar -xf thingino-toolchain_xburst1_musl_gcc13-linux-mipsel.tar.gz
66+ cd mipsel-thingino-linux-musl_sdk-buildroot; ./relocate-sdk.sh
67+ cd ../
68+
69+ - name : Build deps
70+ run : |
71+ PRUDYNT_CROSS=/home/runner/work/prudynt-t/prudynt-t/mipsel-thingino-linux-musl_sdk-buildroot/bin/mipsel-linux- ./build.sh deps T31 -static
72+
73+ - name : Build prudynt
74+ run : |
75+ PRUDYNT_CROSS=/home/runner/work/prudynt-t/prudynt-t/mipsel-thingino-linux-musl_sdk-buildroot/bin/mipsel-linux- ./build.sh prudynt T31 -static
76+
77+
78+ - name : Upload full firmware as artifact
79+ uses : actions/upload-artifact@v4
80+ with :
81+ name : prudynt-t31
82+ path : |
83+ bin/prudynt
84+
85+ - name : Upload full firmware to release
86+ if : github.event_name != 'pull_request'
87+ uses : softprops/action-gh-release@master
88+ with :
89+ tag_name : ${{ env.TAG_NAME }}
90+ files : |
91+ bin/prudynt
0 commit comments