.gitlab-ci.yml 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. stages:
  2. - format
  3. - build
  4. variables:
  5. # https://docs.gitlab.com/ee/ci/runners/configure_runners.html
  6. TRANSFER_METER_FREQUENCY: "2s"
  7. ARTIFACT_COMPRESSION_LEVEL: "fast"
  8. CACHE_COMPRESSION_LEVEL: "fastest"
  9. CACHE_REQUEST_TIMEOUT: 5
  10. # Use FASTZIP for faster compression in cache and artifacts
  11. # https://docs.gitlab.com/runner/configuration/feature-flags.html#available-feature-flags
  12. FF_USE_FASTZIP: true
  13. # Our Variables
  14. CACHE_DIR: "$CI_PROJECT_DIR/ccache"
  15. CCACHE_DIR: $CACHE_DIR
  16. #CLANG FORMAT - CHECKS CODE FOR FORMATTING ISSUES
  17. clang-format:
  18. stage: format
  19. image: suyuemu/cibuild:clangformat
  20. #THIS HAS TO BE FALSE. IT KEEPS RESOURCES AVAILABLE - EG RUNNERS WONT TRY BUILDING IF CODEBASE IS WRONG
  21. #MR's NEED TO BE CORRECTLY CLANG FORMATTED
  22. allow_failure: false
  23. script:
  24. - git submodule update --init --depth 1 --recursive
  25. - bash .ci/scripts/format/script.sh
  26. tags:
  27. # - Linux
  28. # - Windows
  29. - Parallelized
  30. #LINUX BUILD - BUILDS LINUX APPIMAGE
  31. build-linux:
  32. stage: build
  33. image: suyuemu/cibuild:linux-x64
  34. resource_group: linux-ci
  35. cache:
  36. key: "$CI_COMMIT_REF_NAME-ccache"
  37. paths:
  38. - $CACHE_DIR
  39. before_script:
  40. - mkdir -p $CACHE_DIR
  41. - chmod -R 777 $CACHE_DIR
  42. - ls -la $CACHE_DIR
  43. variables:
  44. GIT_SUBMODULE_STRATEGY: recursive
  45. GIT_SUBMODULE_DEPTH: 1
  46. RELEASE_NAME: mainline
  47. script:
  48. - bash .ci/scripts/linux/docker.sh
  49. - bash .ci/scripts/linux/upload.sh
  50. artifacts:
  51. paths:
  52. - artifacts/*
  53. tags:
  54. - Linux
  55. - Parallelized
  56. #ANDROID BUILD - BUILDS APK
  57. android:
  58. stage: build
  59. image: suyuemu/cibuild:android-x64
  60. script:
  61. - apt-get update -y
  62. - git submodule update --init --recursive
  63. - cd externals/vcpkg
  64. - git fetch --unshallow || true
  65. - cd ../..
  66. - export ANDROID_HOME="/usr/lib/android-sdk/"
  67. - echo y | sdkmanager --sdk_root=/usr/lib/android-sdk --licenses
  68. - bash ./.ci/scripts/android/build.sh
  69. - bash ./.ci/scripts/android/upload.sh
  70. artifacts:
  71. paths:
  72. - artifacts/*
  73. tags:
  74. - Linux
  75. - Parallelized