diff --git a/.github/workflows/native-full-build.yml b/.github/workflows/native-full-build.yml new file mode 100644 index 0000000..f8137e6 --- /dev/null +++ b/.github/workflows/native-full-build.yml @@ -0,0 +1,89 @@ +name: Build Component in Native Environment +permissions: + contents: read + checks: write + +on: + workflow_dispatch: + push: + branches: [develop] + pull_request: + branches: [develop] + +env: + AUTOMATICS_UNAME: ${{ secrets.AUTOMATICS_UNAME }} + AUTOMATICS_PASSCODE: ${{ secrets.AUTOMATICS_PASSCODE }} + +jobs: + build-nativescript: + runs-on: ubuntu-latest + + steps: + - name: Checkout main source repository + uses: actions/checkout@v3 + + - name: Install dependencies + run: | + sudo apt-get update && sudo apt-get install -y \ + git cmake gperf ruby-dev libglew-dev libglut-dev \ + libglib2.0-dev libglib2.0-0 g++ meson bison libjpeg-dev libpng-dev \ + libfreetype6-dev libicu-dev autoconf libtool libxml2-dev \ + libcurl4-openssl-dev libexpat1-dev doxygen vim libcjson-dev \ + libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev \ + libwayland-bin libwayland-dev wayland-protocols \ + libreadline-dev net-tools libmount1 libpcre3 libselinux1 zlib1g \ + libunwind-dev libboost-dev libboost-system-dev libboost-thread-dev libboost-chrono-dev libwebsocketpp-dev jq + + - name: Get asset ID for externals.zip + id: asset + run: | + ASSET_ID=$(curl -s -H "Authorization: Bearer ${{ secrets.GH_PAT }}" \ + https://api.github.com/repos/rdk-e/rdkNativeScript_tests/releases/tags/extlibs | \ + jq '.assets[] | select(.name=="externals.zip") | .id') + echo "ASSET_ID=$ASSET_ID" >> $GITHUB_ENV + + - name: Download externals.zip using asset ID + run: | + curl -L \ + -H "Authorization: Bearer ${{ secrets.GH_PAT }}" \ + -H "Accept: application/octet-stream" \ + -o externals.zip \ + https://api.github.com/repos/rdk-e/rdkNativeScript_tests/releases/assets/$ASSET_ID + + - name: Check externals.zip download + run: | + file externals.zip + ls -lh externals.zip + unzip -l externals.zip | head -20 + + - name: Extract externals.zip + run: | + unzip -o externals.zip + + - name: Set LD_LIBRARY_PATH for ICU 66 + run: echo "LD_LIBRARY_PATH=$(pwd)/externals/extlibs/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV + + - name: Configure and build nativescript + run: | + mkdir -p build + cd build + cmake .. \ + -DENABLE_JSRUNTIME_ESSOS=ON \ + -DJSRUNTIME_ENGINE_NAME=jsc \ + -DENABLE_JSRUNTIME_PLAYER=ON \ + -DENABLE_AAMP_JSBINDINGS_DYNAMIC=ON \ + -DBUILD_JSRUNTIME_CLIENT=ON \ + -DENABLE_JSRUNTIME_SERVER=ON \ + -DCMAKE_CXX_FLAGS="-I../externals/extlibs/include/rtcore" + cmake --build . + + - name: Upload build outputs to artifact + uses: actions/upload-artifact@v4 + with: + name: jsruntime-build-artifacts + path: | + build/JSRuntimeClient + build/JSRuntimeJSC + build/libjsclib.so + build/libJSRuntimeJSC.so + if-no-files-found: error