-
-
Notifications
You must be signed in to change notification settings - Fork 9
122 lines (101 loc) · 3.85 KB
/
build-test.yml
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
name: Build Test
on:
push:
# Don't run for tags
tags-ignore:
- '**'
branches:
- '**'
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
jobs:
build-webos:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: recursive
- name: Download ares-cli-rs
uses: robinraju/release-downloader@v1.8
with:
repository: "webosbrew/ares-cli-rs"
latest: true
fileName: "ares-package_*.deb"
out-file-path: "temp"
- name: Download Homebrew Toolbox
uses: robinraju/release-downloader@v1.8
with:
repository: "webosbrew/dev-toolbox-cli"
latest: true
fileName: "webosbrew-toolbox-*.deb"
out-file-path: "temp"
- name: Install Tools
run: sudo apt-get install ./temp/*.deb
- name: Download webOS NDK
uses: robinraju/release-downloader@v1.8
with:
repository: "openlgtv/buildroot-nc4"
latest: true
fileName: "arm-webos-linux-gnueabi_sdk-buildroot.tar.gz"
out-file-path: "/tmp"
- name: Extract webOS NDK
shell: bash
working-directory: /tmp
run: |
tar xzf arm-webos-linux-gnueabi_sdk-buildroot.tar.gz
./arm-webos-linux-gnueabi_sdk-buildroot/relocate-sdk.sh
- name: Build
env:
TOOLCHAIN_FILE: /tmp/arm-webos-linux-gnueabi_sdk-buildroot/usr/share/buildroot/toolchainfile.cmake
run: ./tools/webos/easy_build.sh -DCMAKE_BUILD_TYPE=$BUILD_TYPE
- name: Add Commit Hash Suffix
shell: bash
working-directory: dist
run: for file in *.ipk ; do mv $file ${file//_arm/-${GITHUB_SHA:0:8}_arm} ; done
- uses: actions/upload-artifact@v3
with:
name: webos-snapshot
path: dist/*.ipk
- name: Compatibility Check
run: webosbrew-ipk-verify -f markdown -d -o $GITHUB_STEP_SUMMARY dist/*.ipk
build-raspi:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Run apt-get update
shell: bash
run: sudo apt-get -y -qq update
- name: Prepare Sysroot
id: pi-sysroot
uses: mariotaku/raspbian-sysroot-action@v1.1
with:
release: bullseye
packages: ${{github.workspace}}/deploy/raspbian/sysroot-packages.list
- name: Install Build Tools
shell: bash
# apt-get update was implicitly called, so we don't have to call it here
run: sudo apt-get -y -qq install crossbuild-essential-armhf cmake
- name: Create Build Environment
# Some projects don't allow in-source building, so create a separate build directory
# We'll use this as our working directory for all subsequent commands
run: cmake -E make_directory ${{github.workspace}}/build
- name: Configure CMake
# Use a bash shell, so we can use the same syntax for environment variable
# access regardless of the host operating system
shell: bash
working-directory: ${{github.workspace}}/build
# Note the current convention is to use the -S and -B options here to specify source
# and build directories, but this is only available with CMake 3.13 and higher.
# The CMake binaries on the GitHub Actions machines are (as of this writing) 3.12
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DTARGET_RASPI=ON
-DCMAKE_TOOLCHAIN_FILE=${{steps.pi-sysroot.outputs.cmake-toolchain}}
- name: Build
working-directory: ${{github.workspace}}/build
shell: bash
# Execute the build. You can specify a specific target with "--target <NAME>"
run: |
cmake --build . --config $BUILD_TYPE