mirror of
https://github.com/kekkodance/webos-steam-view.git
synced 2026-10-06 10:00:21 +02:00
89 lines
2.9 KiB
YAML
89 lines
2.9 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main, master]
|
|
pull_request:
|
|
|
|
jobs:
|
|
host:
|
|
name: Host build + smoke
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
with:
|
|
submodules: recursive
|
|
- name: Install deps
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y cmake libsdl2-dev libsdl2-net-dev python3 ccache meson ninja-build nasm
|
|
- name: ccache
|
|
uses: hendrikmuhs/ccache-action@v1.2.24
|
|
with:
|
|
key: host-${{ runner.os }}
|
|
- name: Apply ihslib patches
|
|
run: ./scripts/apply-ihslib-patches.sh
|
|
- name: Build
|
|
run: |
|
|
cmake -B build-host -DCMAKE_BUILD_TYPE=Release -DSTEAMVIEW_BUILD_TESTS=ON -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache .
|
|
cmake --build build-host -j"$(nproc)"
|
|
- name: Smoke run (5s, no host expected on runners)
|
|
env:
|
|
SDL_VIDEODRIVER: dummy
|
|
SDL_AUDIODRIVER: dummy
|
|
run: |
|
|
# timeout 124 = still alive after 5s = success. Anything else is real.
|
|
set +e
|
|
timeout 5 build-host/steamview
|
|
rc=$?
|
|
test $rc -eq 124
|
|
|
|
webos:
|
|
name: webOS IPK
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
with:
|
|
submodules: recursive
|
|
- name: Install deps
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y cmake python3 ccache binutils meson ninja-build nasm
|
|
- name: ccache
|
|
uses: hendrikmuhs/ccache-action@v1.2.24
|
|
with:
|
|
key: webos-${{ runner.os }}
|
|
- name: Cache webOS NDK
|
|
id: cache-ndk
|
|
uses: actions/cache@v6
|
|
with:
|
|
path: /tmp/arm-webos-linux-gnueabi_sdk-buildroot
|
|
key: webos-ndk-a38c582-v1
|
|
- name: Download webOS NDK
|
|
if: steps.cache-ndk.outputs.cache-hit != 'true'
|
|
uses: robinraju/release-downloader@v1.13
|
|
with:
|
|
repository: openlgtv/buildroot-nc4
|
|
tag: webos-a38c582
|
|
fileName: arm-webos-linux-gnueabi_sdk-buildroot-x86_64.tar.gz
|
|
out-file-path: /tmp
|
|
extract: true
|
|
- name: Relocate NDK
|
|
# Relocation bakes absolute paths; re-run when restored from cache
|
|
# (cheap) but skip re-extract (the slow part, handled by the cache).
|
|
run: /tmp/arm-webos-linux-gnueabi_sdk-buildroot/relocate-sdk.sh
|
|
- name: Apply ihslib patches
|
|
run: ./scripts/apply-ihslib-patches.sh
|
|
- name: Build IPK
|
|
run: ./scripts/build-webos.sh
|
|
env:
|
|
TOOLCHAIN_FILE: /tmp/arm-webos-linux-gnueabi_sdk-buildroot/share/buildroot/toolchainfile.cmake
|
|
CMAKE_C_COMPILER_LAUNCHER: ccache
|
|
CMAKE_CXX_COMPILER_LAUNCHER: ccache
|
|
- name: Upload IPK
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: steamview-webos-ipk
|
|
path: dist/*.ipk
|
|
if-no-files-found: error
|