69 lines
2.2 KiB
YAML
69 lines
2.2 KiB
YAML
name: Build Javascript v9 port
|
|
env:
|
|
EM_VERSION: 2.0.31
|
|
EM_CACHE_FOLDER: 'emsdk-cache'
|
|
on:
|
|
push:
|
|
branches: [ lvgl_javascript_v9 ]
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build-and-deploy:
|
|
runs-on: ubuntu-20.04
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
with:
|
|
persist-credentials: false
|
|
ref: 'lvgl_javascript_v9'
|
|
fetch-depth: 0
|
|
- name: Setup cache
|
|
id: cache-system-libraries
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: ${{env.EM_CACHE_FOLDER}}
|
|
key: ${{env.EM_VERSION}}-${{ runner.os }}
|
|
- uses: mymindstorm/setup-emsdk@v10
|
|
with:
|
|
version: ${{env.EM_VERSION}}
|
|
actions-cache-folder: ${{env.EM_CACHE_FOLDER}}
|
|
- name: Build SDL2
|
|
run: embuilder build sdl2
|
|
- name: Build FreeType
|
|
run: ./build_freetype.sh
|
|
working-directory: ports/javascript/scripts
|
|
- name: Build Rlottie
|
|
run: ./build_rlottie.sh
|
|
working-directory: ports/javascript/scripts
|
|
- name: Update submodules
|
|
run: make -j $(nproc) -C ports/javascript submodules
|
|
- name: Build mpy-cross
|
|
run: make -j $(nproc) -C mpy-cross
|
|
- name: Install node modules
|
|
run: npm install
|
|
working-directory: ports/javascript
|
|
- name: Build workers
|
|
run: npm run clean
|
|
working-directory: ports/javascript
|
|
- name: Build the javascript port
|
|
run: make -j $(nproc) -C ports/javascript
|
|
- name: Build frontend
|
|
run: npm run bundle
|
|
working-directory: ports/javascript
|
|
- name: Clean up unneeded files
|
|
run: rm -rf build .cache node_modules
|
|
working-directory: ports/javascript
|
|
- name: Retrieve version
|
|
run: |
|
|
echo "::set-output name=VERSION_NAME::$(user_modules/lv_binding_micropython/lvgl/scripts/find_version.sh)"
|
|
id: version
|
|
- name: Deploy
|
|
uses: JamesIves/github-pages-deploy-action@4.1.3
|
|
with:
|
|
token: ${{ secrets.LVGL_BOT_TOKEN }}
|
|
commit-message: ${{ env.GITHUB_SHA }}
|
|
branch: master
|
|
folder: ports/javascript/bundle_out
|
|
repository-name: lvgl/sim
|
|
target-folder: v${{ steps.version.outputs.VERSION_NAME }}/micropython/ports/javascript
|