-
Notifications
You must be signed in to change notification settings - Fork 11
101 lines (88 loc) · 3.17 KB
/
pru.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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
name: prudynt-t
on:
workflow_dispatch:
env:
TAG_NAME: release
TOOLCHAIN_MUSL: /home/runner/work/prudynt-t/prudynt-t/mipsel-thingino-linux-musl_sdk-buildroot/bin/mipsel-linux-
jobs:
buildroot:
name: prudynt
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- target: T10
build_type: static
- target: T20
build_type: static
- target: T21
build_type: static
- target: T23
build_type: static
- target: T30
build_type: static
- target: T31
build_type: static
- target: T10
build_type: dynamic
- target: T20
build_type: dynamic
- target: T21
build_type: dynamic
- target: T23
build_type: dynamic
- target: T30
build_type: dynamic
- target: T31
build_type: dynamic
steps:
- name: Checkout source
uses: actions/checkout@v4
with:
submodules: 'true'
- name: Setup cache directories
run: |
mkdir -p /tmp/ccache
ln -s /tmp/ccache ${HOME}/.ccache
- name: Setup ccache
uses: actions/cache@v4
if: always()
with:
path: /tmp/ccache
key: ${{ runner.os }}-ccache-${{ github.sha }}
restore-keys: |
${{ runner.os }}-ccache-
- name: Update system sources
run: sudo apt-get update
- name: Install build dependencies
run: |
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 lzop u-boot-tools ca-certificates ccache
- name: Download toolchain
run: |
wget https://github.com/themactep/thingino-firmware/releases/download/toolchain/thingino-toolchain_xburst1_musl_gcc13-linux-mipsel.tar.gz
tar -xf thingino-toolchain_xburst1_musl_gcc13-linux-mipsel.tar.gz
cd mipsel-thingino-linux-musl_sdk-buildroot; ./relocate-sdk.sh
cd ../
- name: Build deps for target
run: |
PRUDYNT_CROSS="ccache $TOOLCHAIN_MUSL" ./build.sh deps ${{ matrix.target }} ${{ matrix.build_type == 'static' && '-static' || '' }}
- name: Build prudynt for target
run: |
PRUDYNT_CROSS="$TOOLCHAIN_MUSL" ./build.sh prudynt ${{ matrix.target }} ${{ matrix.build_type == 'static' && '-static' || '' }}
- name: Rename prudynt for release
run: |
mv bin/prudynt bin/prudynt-${{ matrix.target }}-${{ matrix.build_type }}
- name: Upload binary as artifact
uses: actions/upload-artifact@v4
with:
name: prudynt-${{ matrix.target }}-${{ matrix.build_type }}
path: |
bin/prudynt-${{ matrix.target }}-${{ matrix.build_type }}
- name: Upload binary to release
if: github.event_name != 'pull_request'
uses: softprops/action-gh-release@master
with:
tag_name: ${{ env.TAG_NAME }}
files: |
bin/prudynt-${{ matrix.target }}-${{ matrix.build_type }}