bsd.yml 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. # SuperTux
  2. # Copyright (C) 2020-2021 Jacob Burroughs <maths22@gmail.com>
  3. # 2020-2022 A. Semphris <semphris@protonmail.com>
  4. #
  5. # This program is free software: you can redistribute it and/or modify
  6. # it under the terms of the GNU General Public License as published by
  7. # the Free Software Foundation, either version 3 of the License, or
  8. # (at your option) any later version.
  9. #
  10. # This program is distributed in the hope that it will be useful,
  11. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. # GNU General Public License for more details.
  14. #
  15. # You should have received a copy of the GNU General Public License
  16. # along with this program. If not, see <https://www.gnu.org/licenses/>.
  17. name: BSD
  18. on:
  19. push:
  20. branches:
  21. - master
  22. tags:
  23. - '*'
  24. pull_request: {}
  25. jobs:
  26. bsd:
  27. strategy:
  28. fail-fast: false
  29. matrix:
  30. # TODO: Add the OpenBSD, NetBSD and Solaris VMs whenever possible
  31. vm_os: [freebsd]
  32. build_type: [Debug, Release]
  33. # FreeBSD does not have glbinding
  34. # glbinding: [ON, OFF]
  35. runs-on: macos-10.15
  36. steps:
  37. - uses: actions/checkout@v2
  38. with:
  39. # Fetch the whole tree so git describe works
  40. fetch-depth: 0
  41. submodules: true
  42. - name: Build in FreeBSD
  43. if: ${{ matrix.vm_os == 'freebsd' }}
  44. env:
  45. BUILD_TYPE: ${{ matrix.build_type }}
  46. # GLBINDING: ${{ matrix.glbinding }} # TODO: Re-add if available
  47. uses: vmactions/freebsd-vm@v0.1.4
  48. with:
  49. envs: 'BUILD_TYPE' # TODO: Add GLBINDING here if it comes to FreeBSD
  50. sync: rsync
  51. usesh: true
  52. prepare: |
  53. pkg install -y pkgconf
  54. pkg install -y git
  55. pkg install -y cmake
  56. pkg install -y googletest
  57. pkg install -y sdl2
  58. pkg install -y sdl2_image
  59. pkg install -y openal-soft
  60. pkg install -y glew
  61. # pkg install -y glbinding # TODO: Uncomment whenever possible
  62. pkg install -y curl
  63. pkg install -y libogg
  64. pkg install -y libvorbis
  65. pkg install -y freetype
  66. pkg install -y libraqm
  67. pkg install -y glm
  68. run: |
  69. mkdir build && cd build
  70. cmake .. -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DWARNINGS=ON -DWERROR=ON \
  71. -DBUILD_TESTS=ON -DINSTALL_SUBDIR_SHARE=share/supertux2 \
  72. -DCMAKE_INSTALL_MESSAGE=NEVER -DCMAKE_INSTALL_PREFIX=/usr \
  73. -DINSTALL_SUBDIR_BIN=bin # -DGLBINDING_ENABLED=$GLBINDING
  74. # TODO: Uncomment whenever possible
  75. make -j3 VERBOSE=1
  76. make install DESTDIR="/tmp/supertux" VERBOSE=1
  77. ./test_supertux2