Skip to content

Commit 733419a

Browse files
committed
Switching Emscipten build to a container
1 parent f4b0df4 commit 733419a

File tree

1 file changed

+17
-9
lines changed

1 file changed

+17
-9
lines changed

.github/workflows/test.yml

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -121,11 +121,11 @@ jobs:
121121
- name: Configure
122122
shell: bash
123123
run: |
124-
cmake -S . -B out -DCMAKE_BUILD_TYPE=MinSizeRel
124+
cmake -S . -B out -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
125125
126126
- name: Build and Test
127127
shell: bash
128-
run: cmake --build out --config MinSizeRel --target run-test
128+
run: cmake --build out --config ${{env.BUILD_TYPE}} --target run-test
129129

130130
android:
131131
runs-on: ubuntu-latest
@@ -181,24 +181,32 @@ jobs:
181181
182182
emscripten:
183183
runs-on: ubuntu-latest
184+
container: emscripten/emsdk:3.1.70
184185

185186
steps:
186187
- name: Checkout
187188
uses: actions/checkout@v4
188189

189-
- name: Set Up Emscripten
190-
uses: mymindstorm/setup-emsdk@v14
191-
with:
192-
version: 3.1.70
193-
actions-cache-folder: 'emsdk-cache'
190+
- name: Install pre-requisites
191+
run: |
192+
apt-get update
193+
apt-get install -y ninja-build
194+
apt-get install -y python3-dev
195+
196+
export CMAKE_VERSION=3.27.1
197+
wget https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-Linux-x86_64.sh \
198+
-q -O /tmp/cmake-install.sh \
199+
&& chmod u+x /tmp/cmake-install.sh \
200+
&& /tmp/cmake-install.sh --skip-license --prefix=/usr \
201+
rm -f /tmp/cmake-install.sh
194202
195203
- name: Configure
196204
shell: bash
197-
run: cmake -S . -B out -DCMAKE_TOOLCHAIN_FILE=$EMSDK/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE
205+
run: cmake -S . -B out -DCMAKE_TOOLCHAIN_FILE=$EMSDK/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
198206

199207

200208
- name: Build and Test
201209
shell: bash
202-
run: cmake --build out --config $BUILD_TYPE --target run-test
210+
run: cmake --build out --config ${{env.BUILD_TYPE}} --target run-test
203211

204212

0 commit comments

Comments
 (0)