-
Notifications
You must be signed in to change notification settings - Fork 0
97 lines (81 loc) · 3.12 KB
/
build.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
name: Build v4l-utils for webOS
on:
push:
workflow_dispatch:
env:
TOOLCHAIN_URL: https://github.com/openlgtv/buildroot-nc4/releases/download/webos-d7ed7ee/arm-webos-linux-gnueabi_sdk-buildroot.tar.gz
TOOLCHAIN_SHA256: 32816626e99fb34922a49d0c639f7c8a30356fffb222372d4823027f1382f640
TOOLCHAIN_DIR: /opt/arm-webos-linux-gnueabi_sdk-buildroot
TOOLCHAIN_FILE: /opt/arm-webos-linux-gnueabi_sdk-buildroot/share/buildroot/toolchainfile.cmake
INSTALL_DIR: ${{ github.workspace }}/v4l-utils-install
KEYTABLE_USER_DIR: ${{ github.workspace }}/v4l-utils-install/etc/rc_keymaps
KEYTABLE_SYSTEM_DIR: ${{ github.workspace }}/v4l-utils-install/etc/rc_keymaps
UDEV_RULES_DIR: ${{ github.workspace }}/v4l-utils-install/lib/udev/rules.d
jobs:
build-v4l-utils:
strategy:
matrix:
build-type: [Debug, Release]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0
- name: Download and unpack toolchain
working-directory: /opt
run: |
wget -q -O toolchain.tar.gz ${TOOLCHAIN_URL}
echo "${TOOLCHAIN_SHA256} toolchain.tar.gz" | sha256sum -c -
tar xf toolchain.tar.gz
- name: Relocate toolchain
working-directory: ${{ env.TOOLCHAIN_DIR }}
run: |
./relocate-sdk.sh
- name: CMake Version
run: cmake --version
- name: Create Build directory
run: cmake -E make_directory ${{github.workspace}}/build
- name: Clean previous build
working-directory: ${{github.workspace}}/build
run: |
make clean || true
rm -rf *
- name: Configure v4l-utils
working-directory: ${{github.workspace}}/build
shell: bash
run: |
source ${TOOLCHAIN_DIR}/environment-setup
export CFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_POSIX_C_SOURCE=200809L"
export CXXFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_POSIX_C_SOURCE=200809L"
../configure \
--host=arm-webos-linux-gnueabi \
--prefix=${{ github.workspace }}/v4l-utils-install \
--with-sysroot=${{ env.TOOLCHAIN_DIR }}/arm-webos-linux-gnueabi/sysroot
- name: Build v4l-utils
working-directory: ${{github.workspace}}/build
run: |
source ${TOOLCHAIN_DIR}/environment-setup
make
- name: Install v4l-utils
working-directory: ${{github.workspace}}/build
run: |
source ${TOOLCHAIN_DIR}/environment-setup
make install \
keytableuserdir=${{ env.KEYTABLE_USER_DIR }} \
keytablesystemdir=${{ env.KEYTABLE_SYSTEM_DIR }} \
udevrulesdir=${{ env.UDEV_RULES_DIR }}
- name: List installed files
run: find ${{github.workspace}}/v4l-utils-install
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: v4l-utils_${{ matrix.build-type }}
path: |
${{github.workspace}}/v4l-utils-install
- name: Release
uses: softprops/action-gh-release@v1
if: ${{ startsWith(github.ref, 'refs/tags/') && matrix.build-type == 'Release' }}
with:
files: |
${{github.workspace}}/v4l-utils-install/bin/*