main.yml 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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. ./pocketpy tests/2.py
  16. build_linux:
  17. runs-on: ubuntu-latest
  18. steps:
  19. - uses: actions/checkout@v3
  20. - name: Compiling
  21. run: |
  22. bash build_cpp.sh
  23. python3 scripts/run_tests.py
  24. ./pocketpy tests/1.py
  25. ./pocketpy tests/2.py
  26. build_web:
  27. runs-on: ubuntu-latest
  28. steps:
  29. - uses: actions/checkout@v3
  30. - name: Setup emsdk
  31. uses: mymindstorm/setup-emsdk@v11
  32. with:
  33. version: 3.1.25
  34. actions-cache-folder: 'emsdk-cache'
  35. - name: Verify emsdk
  36. run: emcc -v
  37. - name: Compiling
  38. run: |
  39. bash build_wasm.sh
  40. - uses: crazy-max/ghaction-github-pages@v3
  41. with:
  42. target_branch: gh-pages
  43. build_dir: web
  44. env:
  45. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}