Skip to content

Commit

Permalink
added webOS build test
Browse files Browse the repository at this point in the history
  • Loading branch information
mariotaku committed Nov 9, 2023
1 parent ccc9ac9 commit 7080d92
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 5 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/webos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Build (webOS)

on: [push, pull_request]

jobs:
Build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- 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
working-directory: /tmp
run: |
tar xzf arm-webos-linux-gnueabi_sdk-buildroot.tar.gz
./arm-webos-linux-gnueabi_sdk-buildroot/relocate-sdk.sh
- name: Configure (CMake)
run: cmake -B build \
-DCMAKE_TOOLCHAIN_FILE=/tmp/arm-webos-linux-gnueabi_sdk-buildroot/share/buildroot/toolchainfile.cmake \
-DCMAKE_BUILD_TYPE=Release \
-DWEBOS=ON

- name: Build (CMake)
run: cmake --build build/ --config Release --verbose --parallel
6 changes: 5 additions & 1 deletion src/core/webos/SDL_webos_init.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
*/
#include "../../SDL_internal.h"

#ifdef __WEBOS__

#ifndef SDL_webos_init_h_
#define SDL_webos_init_h_

Expand All @@ -31,6 +33,8 @@ extern int SDL_webOSRegisterApp();

extern void SDL_webOSUnregisterApp();

#endif // SDL_webos_init_h_
#endif /* SDL_webos_init_h_ */

#endif /* __WEBOS__ */

/* vi: set ts=4 sw=4 expandtab: */
6 changes: 5 additions & 1 deletion src/core/webos/SDL_webos_json.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
*/
#include "../../SDL_internal.h"

#if __WEBOS__

#ifndef SDL_webos_json_h_
#define SDL_webos_json_h_

Expand All @@ -31,6 +33,8 @@ extern const char* SDL_webOSJsonStringify(jvalue_ref value);

extern jvalue_ref PBNJSON_jobject_get_nested(jvalue_ref obj, ...);

#endif // SDL_webos_json_h_
#endif /* SDL_webos_json_h_ */

#endif /* __WEBOS__ */

/* vi: set ts=4 sw=4 expandtab: */
6 changes: 5 additions & 1 deletion src/core/webos/SDL_webos_libs.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
*/
#include "../../SDL_internal.h"

#ifdef __WEBOS__

#ifndef SDL_webos_libs_h_
#define SDL_webos_libs_h_

Expand Down Expand Up @@ -47,6 +49,8 @@ extern void SDL_webOSUnloadLibraries();
#include "SDL_webos_pbnjson_sym.h"
#include "SDL_webos_pbnjson_inlines.h"

#endif // SDL_webos_libs_h_
#endif /* SDL_webos_libs_h_ */

#endif /* __WEBOS__ */

/* vi: set ts=4 sw=4 expandtab: */
6 changes: 5 additions & 1 deletion src/core/webos/SDL_webos_luna.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
*/
#include "../../SDL_internal.h"

#ifdef __WEBOS__

#ifndef SDL_webos_luna_h_
#define SDL_webos_luna_h_
#include "SDL_stdinc.h"
Expand All @@ -28,6 +30,8 @@ extern SDL_bool SDL_webOSLunaServiceJustCall(const char* uri, const char* payloa

extern SDL_bool SDL_webOSLunaServiceCallSync(const char *uri, const char *payload, int pub, char **output);

#endif // SDL_webos_luna_h_
#endif /* SDL_webos_luna_h_ */

#endif /* __WEBOS__ */

/* vi: set ts=4 sw=4 expandtab: */
6 changes: 5 additions & 1 deletion src/core/webos/SDL_webos_pbnjson_inlines.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

#include <assert.h>

#ifdef __WEBOS__

#ifndef SDL_webos_pbnjson_inlines_h_
#define SDL_webos_pbnjson_inlines_h_

Expand Down Expand Up @@ -130,6 +132,8 @@ static inline int PBNJSON_jobject_containskey(jvalue_ref obj, raw_buffer key)
return PBNJSON_jobject_get_exists(obj, key, NULL);
}

#endif // SDL_webos_pbnjson_inlines_h_
#endif /* SDL_webos_pbnjson_inlines_h_ */

#endif /* __WEBOS__ */

/* vi: set ts=4 sw=4 expandtab: */

0 comments on commit 7080d92

Please sign in to comment.