nob.yaml 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. name: no-build build
  2. on: [push, pull_request]
  3. jobs:
  4. macos:
  5. runs-on: macos-latest
  6. steps:
  7. - name: Clone GIT repo
  8. uses: actions/checkout@v4
  9. - name: Build nob
  10. run: clang -o nob nob.c
  11. - name: Run nob
  12. run: ./nob
  13. - name: Upload build folder
  14. uses: actions/upload-artifact@v3
  15. with:
  16. name: macos-build-folder
  17. path: build/
  18. ubuntu:
  19. strategy:
  20. matrix:
  21. cc: [gcc, clang]
  22. runs-on: ubuntu-latest
  23. steps:
  24. - name: Clone GIT repo
  25. uses: actions/checkout@v4
  26. - name: Pull Deps
  27. run: sudo apt install xorg-dev
  28. - name: Build nob
  29. run: ${{ matrix.cc }} -o nob nob.c
  30. - name: Run nob
  31. run: ./nob
  32. - name: Upload build folder
  33. uses: actions/upload-artifact@v3
  34. with:
  35. name: ubuntu-${{ matrix.cc }}-build-folder
  36. path: build/
  37. windows:
  38. runs-on: windows-latest
  39. strategy:
  40. matrix:
  41. hotreload:
  42. - "/DMUSIALIZER_HOTRELOAD"
  43. - ""
  44. steps:
  45. - name: Clone GIT repo
  46. uses: actions/checkout@v4
  47. - name: Build nob
  48. shell: cmd
  49. # cl.exe isn't available as-is in Github images because they don't want
  50. # to, so we need to pull env vars ourselves. Refs:
  51. # https://github.com/actions/runner-images/issues/6205#issuecomment-1241573412
  52. # https://learn.microsoft.com/en-us/cpp/build/building-on-the-command-line?view=msvc-170#create-your-own-command-prompt-shortcut
  53. run: |
  54. call "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC\\Auxiliary\\Build\\vcvars64.bat"
  55. cl.exe ${{ matrix.hotreload }} -o nob.exe nob.c
  56. - name: Run nob
  57. shell: cmd
  58. run: |
  59. call "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC\\Auxiliary\\Build\\vcvars64.bat"
  60. nob.exe
  61. - name: Upload build folder
  62. uses: actions/upload-artifact@v3
  63. with:
  64. name: windows-build-folder
  65. path: build/