ubuntu-touch.yml 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  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: Ubuntu Touch
  18. on:
  19. push:
  20. branches:
  21. - master
  22. tags:
  23. - '*'
  24. pull_request: {}
  25. jobs:
  26. clickable:
  27. strategy:
  28. fail-fast: false
  29. matrix:
  30. build_type: [Debug, Release]
  31. arch: [amd64, arm64, armhf]
  32. # glbinding is missing as it isn't available on Ubuntu 16.04
  33. opengl: [glew, sdl]
  34. exclude:
  35. # FIXME: Debug builds don't work for arm64
  36. - arch: arm64
  37. build_type: Debug
  38. runs-on: ubuntu-20.04
  39. steps:
  40. - uses: actions/checkout@v2
  41. with:
  42. # Fetch the whole tree so git describe works
  43. fetch-depth: 0
  44. submodules: true
  45. - name: Install clickable
  46. run: |
  47. # For whatever reason, I have to manually install runc before
  48. # docker.io or containerd, else it fails because of broken dependency
  49. # Using apt-get because apt complains it shouldn't be used in scripts
  50. sudo apt-get update
  51. sudo apt-get install -y runc
  52. sudo apt-get install -y docker.io adb git python3 python3-pip
  53. pip3 install --user git+https://gitlab.com/clickable/clickable.git
  54. # Clickable requires a reboot. This is a sneaky way to bypass that :^)
  55. sudo systemctl unmask docker.service
  56. sudo systemctl start docker.service
  57. - name: Build (OpenGL with GLEW)
  58. if: ${{ matrix.opengl == 'glew' }}
  59. env:
  60. BUILD_TYPE: ${{ (matrix.build_type == 'Debug') && '--debug' || '' }}
  61. ARCH: ${{ matrix.arch }}
  62. run: |
  63. ~/.local/bin/clickable build --verbose ${BUILD_TYPE} --arch ${ARCH} \
  64. --config mk/clickable/build-with-glew.json
  65. - name: Build (OpenGL with GLbinding)
  66. if: ${{ matrix.opengl == 'glbinding' }}
  67. env:
  68. BUILD_TYPE: ${{ (matrix.build_type == 'Debug') && '--debug' || '' }}
  69. ARCH: ${{ matrix.arch }}
  70. run: |
  71. ~/.local/bin/clickable build --verbose ${BUILD_TYPE} --arch ${ARCH} \
  72. --config mk/clickable/build-with-glbinding.json
  73. - name: Build (no OpenGL)
  74. if: ${{ matrix.opengl == 'sdl' }}
  75. env:
  76. BUILD_TYPE: ${{ (matrix.build_type == 'Debug') && '--debug' || '' }}
  77. ARCH: ${{ matrix.arch }}
  78. run: |
  79. ~/.local/bin/clickable build --verbose ${BUILD_TYPE} --arch ${ARCH}
  80. - uses: actions/upload-artifact@v2
  81. with:
  82. name: "clickable-${{ matrix.arch }}-${{ matrix.build_type }}-${{ matrix.opengl }}-click"
  83. path: build.clickable/*.click
  84. if-no-files-found: ignore
  85. - name: Publish to Open Store
  86. if: ${{ github.ref == 'refs/heads/master' && matrix.build_type == 'Release' && matrix.opengl == 'sdl' }}
  87. env:
  88. ARCH: ${{ matrix.arch }}
  89. OPENSTORE_KEY: ${{ secrets.OPENSTORE_KEY }}
  90. run: |
  91. ~/.local/bin/clickable publish "* $(git log -1 --pretty=%B | \
  92. head -1)" --apikey ${OPENSTORE_KEY} \
  93. --arch ${ARCH}