Skip to content

Commit

Permalink
chore: Update build.yml to build v4l2-ctl only for webOS
Browse files Browse the repository at this point in the history
  • Loading branch information
Pavel Turbin committed Aug 26, 2024
1 parent 33645f8 commit 3927034
Showing 1 changed file with 74 additions and 74 deletions.
148 changes: 74 additions & 74 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build v4l-utils for webOS
name: Build v4l2-ctl for webOS

on:
push:
Expand All @@ -15,83 +15,83 @@ env:
UDEV_RULES_DIR: ${{ github.workspace }}/v4l-utils-install/lib/udev/rules.d

jobs:
build-v4l-utils:
build-v4l2-ctl:
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"
# export CXXFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
../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/*
- 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 for v4l2-ctl only
working-directory: ${{github.workspace}}/build
shell: bash
run: |
source ${TOOLCHAIN_DIR}/environment-setup
export CFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
export CXXFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
../configure \
--host=arm-webos-linux-gnueabi \
--prefix=${{ github.workspace }}/v4l-utils-install \
--with-sysroot=${{ env.TOOLCHAIN_DIR }}/arm-webos-linux-gnueabi/sysroot
- name: Build v4l2-ctl only
working-directory: ${{github.workspace}}/build
run: |
source ${TOOLCHAIN_DIR}/environment-setup
make -C utils/v4l2-ctl
- name: Install v4l2-ctl only
working-directory: ${{github.workspace}}/build
run: |
source ${TOOLCHAIN_DIR}/environment-setup
make install -C utils/v4l2-ctl \
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: v4l2-ctl_${{ 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/v4l2-ctl

0 comments on commit 3927034

Please sign in to comment.