Roll emsdk #1
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: Roll emsdk | |
| on: | |
| workflow_dispatch: | |
| # Trigger every day at 3.30 AM PST (= 10:30 AM UTC) | |
| schedule: | |
| - cron: "30 10 * * *" | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| jobs: | |
| roll-emsdk: | |
| name: Roll emsdk | |
| runs-on: ubuntu-latest | |
| env: | |
| GH_TOKEN: ${{ secrets.EMSCRIPTEN_BOT_TOKEN }} | |
| steps: | |
| - name: Install emsdk | |
| uses: emscripten-core/setup-emsdk@4528d102f7230f0e7b276855c01ea1159be0e984 # v16 | |
| with: | |
| version: tot | |
| - name: Set EM_CONFIG | |
| run: | |
| echo "EM_CONFIG=$EMSDK/.emscripten" >> $GITHUB_ENV | |
| - name: Checkout repo | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| fetch-depth: 0 | |
| submodules: true | |
| - name: pip install | |
| run: | | |
| which python3 | |
| python3 --version | |
| python3 -m pip install -r requirements-dev.txt | |
| - name: Roll emsdk and rebaseline tests | |
| env: | |
| REF_NAME: ${{ github.ref_name }} | |
| run: | | |
| git config user.name emscripten-bot | |
| git config user.email emscripten-bot@users.noreply.github.com | |
| ./bootstrap.py | |
| if ./tools/maint/rebaseline_tests.py --new-branch --bump-emsdk; then | |
| echo "rebaseline_tests returned zero, emsdk version up-to-date" | |
| # Exit early and don't create a PR | |
| exit 0 | |
| else | |
| code=$? | |
| if [[ $code != 2 ]] ; then | |
| echo "rebaseline_tests.py failed with unexpected error $code (expected 2)" | |
| exit 1 | |
| fi | |
| fi | |
| git push origin roll_emsdk | |
| gh pr create --fill --base "$REF_NAME" --reviewer sbc100,kripken | |
| gh pr merge --squash --auto |