linux.yml 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. name: linux_build
  2. on:
  3. schedule:
  4. - cron: '0 0 * * *'
  5. push:
  6. pull_request:
  7. branches: [ master ]
  8. jobs:
  9. linux:
  10. runs-on: ubuntu-latest
  11. container:
  12. image: ${{ matrix.image }}
  13. env:
  14. OS_NAME: 'linux'
  15. VSCODE_ARCH: ${{ matrix.vscode_arch }}
  16. strategy:
  17. fail-fast: false
  18. matrix:
  19. vscode_arch: [x64, arm64, armhf]
  20. include:
  21. - vscode_arch: x64
  22. npm_arch: x64
  23. image: vscodium/vscodium-linux-build-agent:bionic-x64
  24. - vscode_arch: arm64
  25. npm_arch: arm64
  26. image: vscodium/vscodium-linux-build-agent:stretch-arm64
  27. - vscode_arch: armhf
  28. npm_arch: armv7l
  29. image: vscodium/vscodium-linux-build-agent:stretch-armhf
  30. steps:
  31. - uses: actions/checkout@v2
  32. - name: Setup Node.js environment
  33. uses: actions/setup-node@v1
  34. with:
  35. node-version: 12.14.1
  36. - name: Install Yarn
  37. run: npm install -g yarn
  38. - name: Check PR or cron
  39. run: ./check_cron_or_pr.sh
  40. - name: Clone VSCode repo
  41. run: ./get_repo.sh
  42. - name: Check existing VSCodium tags/releases
  43. env:
  44. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  45. run: ./check_tags.sh
  46. if: env.SHOULD_DEPLOY == 'yes'
  47. - name: Compute cache key
  48. id: yarnCacheKey
  49. run: echo "::set-output name=value::$(node build/azure-pipelines/computeYarnCacheKey.js)"
  50. if: env.SHOULD_BUILD == 'yes'
  51. - name: Get yarn cache directory path
  52. id: yarnCacheDirPath
  53. run: echo "::set-output name=dir::$(yarn cache dir)"
  54. if: env.SHOULD_BUILD == 'yes'
  55. - name: Cache yarn directory
  56. uses: actions/cache@v2
  57. with:
  58. path: ${{ steps.yarnCacheDirPath.outputs.dir }}
  59. key: linux-${{ matrix.npm_arch }}-yarnCacheDir-${{ steps.yarnCacheKey.outputs.value }}
  60. restore-keys: linux-${{ matrix.npm_arch }}-yarnCacheDir-
  61. if: env.SHOULD_BUILD == 'yes'
  62. - name: Build
  63. env:
  64. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  65. npm_config_arch: ${{ matrix.npm_arch }}
  66. run: ./build.sh
  67. if: env.SHOULD_BUILD == 'yes'
  68. - name: Zip release
  69. run: |
  70. cd VSCode-linux-${VSCODE_ARCH}
  71. tar czf ../VSCodium-linux-${VSCODE_ARCH}-${LATEST_MS_TAG}.tar.gz .
  72. if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
  73. - name: Generate shasums
  74. run: ./sum.sh
  75. if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
  76. - name: Release
  77. uses: softprops/action-gh-release@v1
  78. if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
  79. with:
  80. tag_name: ${{ env.LATEST_MS_TAG }}
  81. files: |
  82. ./*.sha256
  83. ./*.zip
  84. ./*.tar.gz
  85. ./*.deb
  86. ./*.rpm
  87. ./*.AppImage
  88. ./*.AppImage.zsync
  89. env:
  90. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  91. - name: Update versions repo
  92. if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
  93. run: ./update_version.sh
  94. env:
  95. GITHUB_TOKEN: ${{ secrets.STRONGER_GITHUB_TOKEN }}
  96. GITHUB_USERNAME: ${{ github.repository_owner }}