config.yml 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. version: 2
  2. jobs:
  3. build-macos:
  4. macos:
  5. xcode: 12.4.0
  6. steps:
  7. - checkout
  8. - run:
  9. name: Submodules
  10. command: git submodule update --init --recursive
  11. - run:
  12. name: Install Go 1.10.8
  13. command: |
  14. curl https://dl.google.com/go/go1.10.8.darwin-amd64.tar.gz -o go1.10.8.darwin-amd64.tar.gz
  15. sudo tar -C /usr/local -xzf go1.10.8.darwin-amd64.tar.gz
  16. echo 'export GOROOT=/usr/local/go' >> $BASH_ENV
  17. echo 'export GOPATH=$HOME/go' >> $BASH_ENV
  18. echo 'export PATH=$PATH:$GOROOT/bin:$GOPATH/bin' >> $BASH_ENV
  19. - run:
  20. name: Install Node 10.24.1
  21. command: |
  22. echo "Uninstalling preinstalled version of Node"
  23. brew uninstall --ignore-dependencies node
  24. brew uninstall --force node
  25. echo "Installing NVM"
  26. HOMEBREW_NO_AUTO_UPDATE=1 brew install nvm
  27. export NVM_DIR="$HOME/.nvm"
  28. mkdir $NVM_DIR
  29. echo "Activating NVM"
  30. [ -s "/usr/local/opt/nvm/nvm.sh" ] && . "/usr/local/opt/nvm/nvm.sh"
  31. echo "Installing Node"
  32. nvm install 10.24.1
  33. nvm use 10.24.1
  34. nvm alias default 10.24.1
  35. echo "Setting up Node env"
  36. echo 'export NVM_DIR="$HOME/.nvm"' >> $BASH_ENV
  37. echo '[ -s "/usr/local/opt/nvm/nvm.sh" ] && . "/usr/local/opt/nvm/nvm.sh"' >> $BASH_ENV
  38. # We need to use a newer cacert bundle with git to make "go get" commands trust gopkg.in
  39. # This is because the circleci images don't backport security fixes (ofc),
  40. # and Lets Encrypt root cert expired on September 31st, 2021.
  41. - run:
  42. name: Update cacerts
  43. command: |
  44. HOMEBREW_NO_AUTO_UPDATE=1 brew install curl
  45. HOMEBREW_NO_AUTO_UPDATE=1 brew upgrade git
  46. HOMEBREW_NO_AUTO_UPDATE=1 brew upgrade openssl
  47. export PATH="/usr/local/opt/curl/bin:$PATH"
  48. echo 'PATH="/usr/local/opt/curl/bin:$PATH"' >> $BASH_ENV
  49. sudo curl https://curl.se/ca/cacert.pem -o /etc/ssl/curl-cacert.pem
  50. git config --global http.sslCAInfo /etc/ssl/curl-cacert.pem
  51. - run:
  52. name: Debug
  53. command: |
  54. node --version
  55. npm --version
  56. npm i -g yarn
  57. yarn --version
  58. yarn cache clean
  59. # We can't run with node >= 12 anyways, so this is irrelevant.
  60. # # Ignoring engines because @typescript/estlint requires node>=12,
  61. # # but atm we can't upgrade because appdmg is broken (and abandoned).
  62. # # TODO: fix this properly
  63. # - run: yarn install --ignore-engines
  64. # For some reason, ignoring engines causes node gyp compilation errors with fsevents.
  65. - run: yarn install
  66. - run: yarn run client-build-osx
  67. # To make a test package, comment out the previous line and uncomment this line.
  68. # - run: yarn run client-build-osx --useTestPackage
  69. - store_artifacts:
  70. path: ./build/prod-client-build/osx64-package.tar.gz
  71. - store_artifacts:
  72. path: ./build/prod-client-build/GameJoltClient.dmg
  73. build-linux:
  74. docker:
  75. - image: circleci/node:14.17
  76. steps:
  77. - checkout
  78. - run:
  79. name: Submodules
  80. command: git submodule update --init --recursive
  81. - run:
  82. name: Update and upgrade
  83. command: |
  84. sudo apt-get update
  85. sudo apt-get upgrade
  86. - run:
  87. name: Install OpenGL dev dependencies
  88. command: sudo apt-get install -y libgl1-mesa-dev xorg-dev
  89. - run:
  90. name: Install Go 1.10.8
  91. command: |
  92. wget https://dl.google.com/go/go1.10.8.linux-amd64.tar.gz
  93. sudo tar -C /usr/local -xzf go1.10.8.linux-amd64.tar.gz
  94. echo 'export GOROOT=/usr/local/go' >> $BASH_ENV
  95. echo 'export GOPATH=$HOME/go' >> $BASH_ENV
  96. echo 'export PATH=$PATH:$GOROOT/bin:$GOPATH/bin' >> $BASH_ENV
  97. - run: yarn install
  98. - run: yarn run client-build-linux64
  99. # To make a test package, comment out the previous line and uncomment this line.
  100. # - run: yarn run client-build-linux64 --useTestPackage
  101. - store_artifacts:
  102. path: ./build/prod-client-build/linux64-package.tar.gz
  103. - store_artifacts:
  104. path: ./build/prod-client-build/GameJoltClient.tar.gz
  105. workflows:
  106. version: 2
  107. build_all:
  108. jobs:
  109. - build-macos:
  110. filters:
  111. branches:
  112. only:
  113. - client-build
  114. - build-linux:
  115. filters:
  116. branches:
  117. only:
  118. - client-build