diff options
Diffstat (limited to 'src/contrib/SDL-2.30.2/.github/workflows/emscripten.yml')
-rw-r--r-- | src/contrib/SDL-2.30.2/.github/workflows/emscripten.yml | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/src/contrib/SDL-2.30.2/.github/workflows/emscripten.yml b/src/contrib/SDL-2.30.2/.github/workflows/emscripten.yml new file mode 100644 index 0000000..ee7974e --- /dev/null +++ b/src/contrib/SDL-2.30.2/.github/workflows/emscripten.yml | |||
@@ -0,0 +1,45 @@ | |||
1 | name: Build (Emscripten) | ||
2 | |||
3 | on: [push, pull_request] | ||
4 | |||
5 | jobs: | ||
6 | emscripten: | ||
7 | runs-on: ubuntu-latest | ||
8 | steps: | ||
9 | - uses: actions/checkout@v4 | ||
10 | - uses: mymindstorm/setup-emsdk@v14 | ||
11 | with: | ||
12 | version: 3.1.35 | ||
13 | - name: Install ninja | ||
14 | run: | | ||
15 | sudo apt-get -y update | ||
16 | sudo apt-get install -y ninja-build | ||
17 | - name: Configure CMake | ||
18 | run: | | ||
19 | emcmake cmake -S . -B build \ | ||
20 | -DSDL_WERROR=ON \ | ||
21 | -DSDL_TESTS=ON \ | ||
22 | -DSDL_INSTALL_TESTS=ON \ | ||
23 | -DCMAKE_BUILD_TYPE=Release \ | ||
24 | -DCMAKE_INSTALL_PREFIX=prefix \ | ||
25 | -GNinja | ||
26 | - name: Build | ||
27 | run: cmake --build build/ --verbose | ||
28 | - name: Run build-time tests | ||
29 | run: | | ||
30 | set -eu | ||
31 | export SDL_TESTS_QUICK=1 | ||
32 | # FIXME: enable Emscripten build time tests | ||
33 | # ctest -VV --test-dir build/ | ||
34 | - name: Install | ||
35 | run: | | ||
36 | echo "SDL2_DIR=$(pwd)/prefix" >> $GITHUB_ENV | ||
37 | cmake --install build/ | ||
38 | - name: Verify CMake configuration files | ||
39 | run: | | ||
40 | emcmake cmake -S cmake/test -B cmake_config_build \ | ||
41 | -DCMAKE_BUILD_TYPE=Release \ | ||
42 | -DSDL_VENDOR_INFO="Github Workflow" \ | ||
43 | -DTEST_SHARED=FALSE \ | ||
44 | -DCMAKE_PREFIX_PATH=${{ env.SDL2_DIR }} | ||
45 | cmake --build cmake_config_build --verbose | ||