.gitlab-ci.yml 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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. - Format
  31. #LINUX BUILD - BUILDS LINUX APPIMAGE
  32. build-linux:
  33. stage: build
  34. image: suyuemu/cibuild:linux-x64
  35. resource_group: linux-ci
  36. cache:
  37. key: "$CI_COMMIT_REF_NAME-ccache"
  38. paths:
  39. - $CACHE_DIR
  40. before_script:
  41. - mkdir -p $CACHE_DIR
  42. - chmod -R 777 $CACHE_DIR
  43. - ls -la $CACHE_DIR
  44. variables:
  45. GIT_SUBMODULE_STRATEGY: recursive
  46. GIT_SUBMODULE_DEPTH: 1
  47. RELEASE_NAME: mainline
  48. script:
  49. - bash .ci/scripts/linux/docker.sh
  50. - bash .ci/scripts/linux/upload.sh
  51. artifacts:
  52. paths:
  53. - artifacts/*
  54. tags:
  55. - Linux
  56. - Parallelized
  57. #ANDROID BUILD - BUILDS APK
  58. android:
  59. stage: build
  60. image: suyuemu/cibuild:android-x64
  61. script:
  62. - apt-get update -y
  63. - git submodule update --init --recursive
  64. - cd externals/vcpkg
  65. - git fetch --unshallow || true
  66. - cd ../..
  67. - export ANDROID_HOME="/usr/lib/android-sdk/"
  68. - echo y | sdkmanager --sdk_root=/usr/lib/android-sdk --licenses
  69. - bash ./.ci/scripts/android/build.sh
  70. - bash ./.ci/scripts/android/upload.sh
  71. artifacts:
  72. paths:
  73. - artifacts/*
  74. tags:
  75. - Linux
  76. - Parallelized