Repository navigation
Repair full-V8 native test syntax #466
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Precompiled JavaScript contracts | |
| on: | |
| pull_request: | |
| paths: | |
| - 'experiments/WebScene.NativeEngine.Probe/**' | |
| - 'src/WebScene.Sdk/**' | |
| - 'scripts/prepare_runner_disk.py' | |
| - 'scripts/tests/test_prepare_runner_disk.py' | |
| - '.github/workflows/precompiled-javascript.yml' | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| portable-v8-contract: | |
| runs-on: [self-hosted, Linux, X64] | |
| timeout-minutes: 15 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Reclaim stale runner temporary data | |
| shell: bash | |
| run: | | |
| python3 scripts/prepare_runner_disk.py "$RUNNER_TEMP" --system-temp /tmp --minimum-free-bytes 6442450944 | |
| job_tmp="$RUNNER_TEMP/webscene-job-${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}-${GITHUB_JOB//[^A-Za-z0-9_.-]/_}" | |
| mkdir -p "$job_tmp" | |
| echo "TMPDIR=$job_tmp" >> "$GITHUB_ENV" | |
| echo "WEBSCENE_JOB_TMP=$job_tmp" >> "$GITHUB_ENV" | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22.16.0' | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - name: Install native adapter prerequisites | |
| run: | | |
| sudo flock /var/lock/webscene-apt.lock bash -c ' | |
| apt-get clean | |
| apt-get update | |
| apt-get install -y build-essential libssl-dev cmake ninja-build | |
| ' | |
| - name: Build test adapter against real V8 (not the production SDK) | |
| working-directory: experiments/WebScene.NativeEngine.Probe | |
| run: | | |
| NODE_ROOT="$(dirname "$(dirname "$(command -v node)")")" | |
| c++ -std=c++20 -shared -fPIC -I"$NODE_ROOT/include/node" -Inative \ | |
| tests/precompiled/node_adapter.cpp -lcrypto -o tests/precompiled/adapter.node | |
| - name: Execute cold-process V8 contracts | |
| run: node experiments/WebScene.NativeEngine.Probe/tests/precompiled/test_v8.cjs | |
| - name: Build driver and CMake contracts | |
| run: python -m unittest discover -s experiments/WebScene.NativeEngine.Probe/tests/precompiled -p 'test_*.py' -v | |
| - name: Release job temporary data | |
| if: always() | |
| shell: bash | |
| run: | | |
| if [[ -n "${WEBSCENE_JOB_TMP:-}" ]]; then | |
| rm -rf -- "$WEBSCENE_JOB_TMP" | |
| fi |