main.yml 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. name: build
  2. on: [push, pull_request]
  3. jobs:
  4. build_win:
  5. runs-on: windows-latest
  6. steps:
  7. - uses: actions/checkout@v3
  8. - uses: ilammy/msvc-dev-cmd@v1
  9. - name: Compiling
  10. shell: bash
  11. run: |
  12. CL -std:c++17 -GR- -EHsc -O2 -Fe:pocketpy src/main.cpp
  13. python3 scripts/run_tests.py
  14. ./pocketpy tests/1.py
  15. build_linux:
  16. runs-on: ubuntu-latest
  17. steps:
  18. - uses: actions/checkout@v3
  19. - name: Compiling
  20. run: |
  21. bash build_cpp.sh
  22. python3 scripts/run_tests.py
  23. ./pocketpy tests/1.py
  24. build_web:
  25. runs-on: ubuntu-latest
  26. steps:
  27. - uses: actions/checkout@v3
  28. - name: Setup emsdk
  29. uses: mymindstorm/setup-emsdk@v11
  30. with:
  31. version: 3.1.25
  32. actions-cache-folder: 'emsdk-cache'
  33. - name: Verify emsdk
  34. run: emcc -v
  35. - name: Compiling
  36. run: |
  37. bash build_wasm.sh
  38. - uses: crazy-max/ghaction-github-pages@v3
  39. with:
  40. target_branch: gh-pages
  41. build_dir: web
  42. env:
  43. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}