forked from emscripten-core/emscripten
-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (59 loc) · 1.99 KB
/
Copy pathupdate-emsdk.yml
File metadata and controls
62 lines (59 loc) · 1.99 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: Update 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:
update-emsdk:
name: Update 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: Update 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 --update-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 --force origin update_emsdk
if gh pr view update_emsdk --json state -q .state | grep -q "^OPEN$"; then
title=$(git log -1 --format=%s)
git log -1 --format=%b | gh pr edit update_emsdk --title "$title" --body-file -
else
gh pr create --fill --base "$REF_NAME" --reviewer sbc100,kripken
fi
gh pr merge --squash --auto