diff --git a/.github/workflows/wpt.yml b/.github/workflows/wpt.yml index fa463b75..d07233a6 100644 --- a/.github/workflows/wpt.yml +++ b/.github/workflows/wpt.yml @@ -2,6 +2,10 @@ name: wpt env: ARCH: x86_64-linux + AWS_ACCESS_KEY_ID: ${{ vars.LPD_PERF_AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.LPD_PERF_AWS_SECRET_ACCESS_KEY }} + AWS_BUCKET: ${{ vars.LPD_PERF_AWS_BUCKET }} + AWS_REGION: ${{ vars.LPD_PERF_AWS_REGION }} on: push: @@ -77,3 +81,42 @@ jobs: # We accept then to continue the job on failure. # TODO remove the continue-on-error when tests will pass. continue-on-error: true + + - name: json output + run: zig build wpt -Dengine=v8 -- --safe --json > wpt.json + + - name: write commit + run: | + echo "${{github.sha}}" > commit.txt + + - name: upload artifact + uses: actions/upload-artifact@v3 + with: + name: wpt-results + path: | + wpt.json + commit.txt + retention-days: 10 + + perf-fmt: + name: perf-fmt + needs: benchmark + + # Don't execute on PR + if: github.event_name != 'pull_request' + + runs-on: ubuntu-latest + container: + image: ghcr.io/lightpanda-io/perf-fmt:latest + credentials: + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + steps: + - name: download artifact + uses: actions/download-artifact@v3 + with: + name: benchmark-results + + - name: format and send json result + run: /perf-fmt wpt ${{ github.sha }} wpt.json