56 lines
1.6 KiB
YAML
56 lines
1.6 KiB
YAML
name: Pages
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
workflow_dispatch:
|
|
release:
|
|
types: [published]
|
|
workflow_run:
|
|
workflows: [Release]
|
|
types: [completed]
|
|
|
|
permissions:
|
|
contents: read
|
|
pages: write
|
|
id-token: write
|
|
|
|
concurrency:
|
|
group: pages
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
pages:
|
|
if: github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success'
|
|
runs-on: ubuntu-latest
|
|
environment:
|
|
name: github-pages
|
|
url: ${{ steps.deployment.outputs.page_url }}
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
with:
|
|
ref: main
|
|
fetch-depth: 0
|
|
- name: Build web converter
|
|
shell: bash
|
|
run: |
|
|
git clone --depth 1 https://github.com/emscripten-core/emsdk.git "$RUNNER_TEMP/emsdk"
|
|
"$RUNNER_TEMP/emsdk/emsdk" install 6.0.3
|
|
"$RUNNER_TEMP/emsdk/emsdk" activate 6.0.3
|
|
source "$RUNNER_TEMP/emsdk/emsdk_env.sh"
|
|
emcmake cmake -S . -B build-wasm -DANYPS5_BUILD_WASM=ON -DBUILD_TESTING=OFF -DCMAKE_BUILD_TYPE=Release
|
|
cmake --build build-wasm --target relinker_web --parallel 2
|
|
- name: Test web converter
|
|
run: python3 tools/test_web.py --build build-wasm
|
|
- name: Download latest release libraries
|
|
env:
|
|
GITHUB_TOKEN: ${{ github.token }}
|
|
run: python3 tools/build_web.py --build build-wasm --libraries
|
|
- run: python3 tools/progress.py build-wasm/web
|
|
- run: python3 tools/progress_history.py build-wasm/web
|
|
- uses: actions/upload-pages-artifact@v5
|
|
with:
|
|
path: build-wasm/web
|
|
- id: deployment
|
|
uses: actions/deploy-pages@v5
|