Skip to content

Commit c22a176

Browse files
authored
[ci] Use newly official github action to install emsdk (#26662)
See https://github.com/emscripten-core/setup-emsdk
1 parent 7481de0 commit c22a176

2 files changed

Lines changed: 14 additions & 27 deletions

File tree

.github/workflows/ci.yml

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,13 @@ jobs:
3232
runs-on: ubuntu-latest
3333
if: github.event_name == 'pull_request'
3434
steps:
35+
- name: Install emsdk
36+
uses: emscripten-core/setup-emsdk@v16
37+
with:
38+
version: tot
39+
- name: Set EM_CONFIG
40+
run:
41+
echo "EM_CONFIG=$EMSDK/.emscripten" >> $GITHUB_ENV
3542
- name: Checkout repo
3643
uses: actions/checkout@v4
3744
with:
@@ -42,19 +49,6 @@ jobs:
4249
which python3
4350
python3 --version
4451
python3 -m pip install -r requirements-dev.txt
45-
- name: Install emsdk
46-
run: |
47-
EM_CONFIG=$HOME/emsdk/.emscripten
48-
echo "emscripten config file: $EM_CONFIG"
49-
echo "EM_CONFIG=$EM_CONFIG" >> $GITHUB_ENV
50-
curl -# -L -o ~/emsdk-main.tar.gz https://github.com/emscripten-core/emsdk/archive/main.tar.gz
51-
tar -C ~ -xf ~/emsdk-main.tar.gz
52-
mv ~/emsdk-main ~/emsdk
53-
cd ~/emsdk
54-
./emsdk install tot
55-
./emsdk activate tot
56-
echo "emscripten config file ($EM_CONFIG) contents:"
57-
cat $EM_CONFIG
5852
- name: Check test expectations on target branch
5953
# Skip this step for rebaseline PRs, since the target branch is expected
6054
# to be out of date in this case.

.github/workflows/rebaseline-tests.yml

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,13 @@ jobs:
1717
env:
1818
GH_TOKEN: ${{ secrets.EMSCRIPTEN_BOT_TOKEN }}
1919
steps:
20+
- name: Install emsdk
21+
uses: emscripten-core/setup-emsdk@v16
22+
with:
23+
version: tot
24+
- name: Set EM_CONFIG
25+
run:
26+
echo "EM_CONFIG=$EMSDK/.emscripten" >> $GITHUB_ENV
2027
- name: Checkout repo
2128
uses: actions/checkout@v4
2229
with:
@@ -27,20 +34,6 @@ jobs:
2734
which python3
2835
python3 --version
2936
python3 -m pip install -r requirements-dev.txt
30-
- name: Install emsdk
31-
run: |
32-
EM_CONFIG=$HOME/emsdk/.emscripten
33-
echo $EM_CONFIG
34-
curl -# -L -o ~/emsdk-main.tar.gz https://github.com/emscripten-core/emsdk/archive/main.tar.gz
35-
tar -C ~ -xf ~/emsdk-main.tar.gz
36-
mv ~/emsdk-main ~/emsdk
37-
cd ~/emsdk
38-
./emsdk install tot
39-
./emsdk activate tot
40-
echo "JS_ENGINES = [NODE_JS]" >> $EM_CONFIG
41-
echo "final config:"
42-
cat $EM_CONFIG
43-
echo "EM_CONFIG=$EM_CONFIG" >> $GITHUB_ENV
4437
- name: Rebaseline tests
4538
run: |
4639
git config user.name emscripten-bot

0 commit comments

Comments
 (0)