Run test262 in all engines and publish #724
This file contains 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: Run test262 in all engines and publish | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ "main" ] | |
paths: [ ".github/workflows/run.yml", "scripts/**/*", "helpers/**/*", "site/generate.mjs" ] | |
schedule: | |
- cron: "0 0 * * *" # autorun daily at midnight utc | |
jobs: | |
make-chunks: | |
runs-on: self-hosted | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: Make chunks | |
run: | | |
git clone https://github.com/tc39/test262.git --depth 1 | |
cd helpers/chunkify | |
npm install | |
cd ../.. | |
node helpers/chunkify/index.mjs 2 | |
- name: Upload chunks | |
uses: actions/upload-artifact@v3 | |
with: | |
name: chunks | |
path: | | |
chunks.json | |
time.txt | |
test262: | |
runs-on: self-hosted | |
needs: make-chunks | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
env: | |
CIRCLE_TOKEN: ${{ secrets.CIRCLE_TOKEN }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
CHUNKS_PATH: ../chunks/chunks.json | |
CHUNK_NUMBER: ${{ matrix.chunk }} | |
CHUNK_COUNT: 2 | |
strategy: | |
fail-fast: false | |
matrix: | |
engine: [v8, v8_exp, jsc, jsc_exp, sm, sm_exp, chakra, hermes, kiesel, libjs, engine262, qjs, qjs_ng, xs, graaljs, rhino, boa, nova, njs, babel, swc, sucrase] # all | |
chunk: [0, 1] | |
# engine: [v8, jsc, sm, chakra, hermes, kiesel, libjs, qjs, xs, graaljs] # exclude hangers/long | |
# engine: [chakra, graaljs, jsc, kiesel, libjs, qjs, xs] # all fast | |
# engine: [v8, jsc, sm, chakra] # just major | |
# engine: [hermes] # just hermes | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: Download chunks | |
uses: actions/download-artifact@v3 | |
with: | |
name: chunks | |
path: chunks | |
- name: Remove ~/.esvu | |
run: rm -rf ~/.esvu | |
- name: Run test262 with ${{ matrix.engine }} | |
run: ./scripts/engines/${{ matrix.engine }}.sh | |
- name: Upload results | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ matrix.engine }}${{ matrix.chunk }} | |
path: | | |
results${{ matrix.chunk }}.json | |
jsvu.json | |
esvu.json | |
time${{ matrix.chunk }}.txt | |
version.txt | |
test262-rev.txt | |
- name: Download results | |
uses: actions/download-artifact@v3 | |
continue-on-error: true | |
with: | |
path: results | |
- name: Download results take 2 | |
uses: actions/download-artifact@v3 | |
if: ${{ failure() }} | |
with: | |
path: results | |
- name: Fix pages artifact | |
continue-on-error: true | |
run: | | |
cd results/github-pages | |
tar -xf artifact.tar | |
# - name: Download old results | |
# run: | | |
# node scripts/downloadOldResults.mjs | |
# sh scripts/extractResults.sh | |
- name: Generate site | |
id: generate | |
continue-on-error: true | |
run: node --max-old-space-size=4096 site/generate.mjs | |
- name: Upload pages artifact | |
if: steps.generate.outcome == 'success' | |
continue-on-error: true | |
uses: actions/upload-pages-artifact@v1 | |
with: | |
path: site | |
- name: Deploy to GitHub Pages | |
id: deployment | |
if: steps.generate.outcome == 'success' | |
continue-on-error: true | |
uses: actions/deploy-pages@v2 |