ubuntu-touch.yml 3.9 KB

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