🛠️🐜 Antkeeper superbuild with dependencies included https://antkeeper.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
1.3 KiB

  1. name: Build (Emscripten)
  2. on: [push, pull_request]
  3. jobs:
  4. emscripten:
  5. runs-on: ubuntu-latest
  6. steps:
  7. - uses: actions/checkout@v3
  8. - uses: mymindstorm/setup-emsdk@v10
  9. with:
  10. version: 2.0.32
  11. - name: Install ninja
  12. run: |
  13. sudo apt-get -y update
  14. sudo apt-get install -y ninja-build
  15. - name: Configure CMake
  16. run: |
  17. emcmake cmake -S . -B build \
  18. -DSDL_WERROR=ON \
  19. -DSDL_TESTS=ON \
  20. -DSDL_INSTALL_TESTS=ON \
  21. -DCMAKE_BUILD_TYPE=Release \
  22. -DCMAKE_INSTALL_PREFIX=prefix \
  23. -GNinja
  24. - name: Build
  25. run: cmake --build build/ --verbose
  26. - name: Run build-time tests
  27. run: |
  28. set -eu
  29. export SDL_TESTS_QUICK=1
  30. # FIXME: enable Emscripten build time tests
  31. # ctest -VV --test-dir build/
  32. - name: Install
  33. run: |
  34. echo "SDL2_DIR=$(pwd)/prefix" >> $GITHUB_ENV
  35. cmake --install build/
  36. - name: Verify CMake configuration files
  37. run: |
  38. emcmake cmake -S cmake/test -B cmake_config_build \
  39. -DCMAKE_BUILD_TYPE=Release \
  40. -DSDL_VENDOR_INFO="Github Workflow" \
  41. -DTEST_SHARED=FALSE \
  42. -DCMAKE_PREFIX_PATH=${{ env.SDL2_DIR }}
  43. cmake --build cmake_config_build --verbose