Skip to content

Update to match FP32 CodeGen changes. #1313

Update to match FP32 CodeGen changes.

Update to match FP32 CodeGen changes. #1313

Workflow file for this run

name: Build JavaScript
on: [push, pull_request]
jobs:
build_js:
runs-on: ubuntu-latest
steps:
- name: Setup Emscripten
uses: mymindstorm/setup-emsdk@v12
with:
version: 3.1.51
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0
- name: Generate CMake Project
run: |
mkdir build
cd build
emcmake cmake .. -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=OFF -DBUILD_PLAY=ON -DBUILD_PSFPLAYER=ON -DUSE_QT=OFF
- name: Build Native Code
run: |
cd build
cmake --build . --config Release -j $(nproc)
# Setup Node.js since Emscripten can override the node's version.
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 16.17
- name: Run CodeGenTestSuite
run: |
cd $GITHUB_WORKSPACE/deps/CodeGen/js
npm install
tsc
cd $GITHUB_WORKSPACE/build/Source/ui_js/Source/CodeGen
node --experimental-wasm-threads --experimental-wasm-simd $GITHUB_WORKSPACE/deps/CodeGen/js/out/index.js
- name: Build Play Browser
run: |
cd js/play_browser
cp ../../build/Source/ui_js/Play.js ./src/
cp ../../build/Source/ui_js/Play.wasm ./public/
cp ../../build/Source/ui_js/Play.js ./public/
cp ../../build/Source/ui_js/Play.worker.js ./public/
export REACT_APP_VERSION=$(git describe)
npm install
npm run build
- name: Build PsfPlayer Browser
run: |
cd js/psfplayer_browser
cp ../../build/tools/PsfPlayer/Source/ui_js/PsfPlayer.js ./src/
cp ../../build/tools/PsfPlayer/Source/ui_js/PsfPlayer.wasm ./public/
cp ../../build/tools/PsfPlayer/Source/ui_js/PsfPlayer.js ./public/
cp ../../build/tools/PsfPlayer/Source/ui_js/PsfPlayer.worker.js ./public/
export REACT_APP_VERSION=$(git describe)
npm install
npm run build
- name: Update Play/Test Environment
if: ${{ env.AWS_ACCESS_KEY_ID != null }}
uses: jakejarvis/s3-sync-action@v0.5.1
with:
args: --acl public-read --delete
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: us-east-2
AWS_S3_BUCKET: playjs-test
SOURCE_DIR: 'js/play_browser/build'
- name: Update Play/Prod Environment
if: ${{ (env.AWS_ACCESS_KEY_ID != null) && (github.ref == 'refs/heads/master') }}
uses: jakejarvis/s3-sync-action@v0.5.1
with:
args: --acl public-read --delete
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: us-east-2
AWS_S3_BUCKET: playjs
SOURCE_DIR: 'js/play_browser/build'
- name: Update PsfPlayer/Test Environment
if: ${{ env.AWS_ACCESS_KEY_ID != null }}
uses: jakejarvis/s3-sync-action@v0.5.1
with:
args: --acl public-read --delete
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: us-east-2
AWS_S3_BUCKET: psfplayer-test
SOURCE_DIR: 'js/psfplayer_browser/build'
- name: Invalidate Play/Test Environment CloudFront Distribution
if: ${{ env.AWS_ACCESS_KEY_ID != null }}
uses: chetan/invalidate-cloudfront-action@v1.3
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: us-east-2
DISTRIBUTION: E1A9RDVO70PTKO
PATHS: '/*'
- name: Invalidate Play/Prod Environment CloudFront Distribution
if: ${{ (env.AWS_ACCESS_KEY_ID != null) && (github.ref == 'refs/heads/master') }}
uses: chetan/invalidate-cloudfront-action@v1.3
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: us-east-2
DISTRIBUTION: E2IQ40RGGBWGV3
PATHS: '/*'
- name: Invalidate PsfPlayer/Test Environment CloudFront Distribution
if: ${{ env.AWS_ACCESS_KEY_ID != null }}
uses: chetan/invalidate-cloudfront-action@v1.3
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: us-east-2
DISTRIBUTION: ELJDS9GVQ9YYY
PATHS: '/*'