From 99f27fe9ed3498ad2586b379a27b38a3039f4573 Mon Sep 17 00:00:00 2001 From: Mike Lewis <mike@mplew.is> Date: Sun, 7 Mar 2021 23:03:39 -0500 Subject: [PATCH 01/10] Reduce context for `patches/update-cache-path.patch` Upstream changed the next line, causing build breakage. Reducing the context resolves the issue and should help prevent future issues if/when that function changes again. --- patches/update-cache-path.patch | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/patches/update-cache-path.patch b/patches/update-cache-path.patch index da006cc..096a38f 100644 --- a/patches/update-cache-path.patch +++ b/patches/update-cache-path.patch @@ -1,11 +1,7 @@ --- vscode/src/vs/platform/update/electron-main/updateService.win32.ts 2021-02-05 11:59:17.564060663 -0600 +++ src/src/vs/platform/update/electron-main/updateService.win32.ts 2021-02-05 11:59:39.780745778 -0600 -@@ -55,7 +55,7 @@ - +@@ -56,3 +56,3 @@ @memoize get cachePath(): Promise<string> { - const result = path.join(tmpdir(), `vscode-update-${product.target}-${process.arch}`); + const result = path.join(tmpdir(), `vscodium-update-${product.target}-${process.arch}`); - return pfs.mkdirp(result).then(() => result); - } - From f8eeb2b698142e4d7a338e262aa2158c12825104 Mon Sep 17 00:00:00 2001 From: Baptiste Augrain <daiyam@zokugun.org> Date: Wed, 10 Mar 2021 16:04:07 +0100 Subject: [PATCH 02/10] - fixing build - add manual build --- build_macos.sh | 10 ++++++++++ get_repo.sh | 7 ++++--- patches/fix-rpm-spec.patch | 2 +- 3 files changed, 15 insertions(+), 4 deletions(-) create mode 100755 build_macos.sh diff --git a/build_macos.sh b/build_macos.sh new file mode 100755 index 0000000..55cc5ee --- /dev/null +++ b/build_macos.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +nvm use 12 + +rm -rf VSCode* +rm -rf vscode + +. get_repo.sh + +SHOULD_BUILD=yes CI_BUILD=no OS_NAME=osx VSCODE_ARCH=x64 . build.sh \ No newline at end of file diff --git a/get_repo.sh b/get_repo.sh index 8651058..301efdf 100755 --- a/get_repo.sh +++ b/get_repo.sh @@ -9,6 +9,7 @@ echo "Got the latest MS tag: ${LATEST_MS_TAG}" git clone https://github.com/Microsoft/vscode.git --branch $LATEST_MS_TAG --depth 1 # for GH actions -echo "LATEST_MS_COMMIT=$LATEST_MS_COMMIT" >> $GITHUB_ENV -echo "LATEST_MS_TAG=$LATEST_MS_TAG" >> $GITHUB_ENV - +if [[ $GITHUB_ENV ]]; then + echo "LATEST_MS_COMMIT=$LATEST_MS_COMMIT" >> $GITHUB_ENV + echo "LATEST_MS_TAG=$LATEST_MS_TAG" >> $GITHUB_ENV +fi diff --git a/patches/fix-rpm-spec.patch b/patches/fix-rpm-spec.patch index 27747ce..c0f2135 100644 --- a/patches/fix-rpm-spec.patch +++ b/patches/fix-rpm-spec.patch @@ -13,4 +13,4 @@ /usr/share/bash-completion/completions/@@NAME@@ /usr/share/zsh/site-functions/_@@NAME@@ + -++%config(noreplace) /usr/share/@@NAME@@/resources/app/product.json ++%config(noreplace) /usr/share/@@NAME@@/resources/app/product.json From 3e50a256061becec56f3098e291dd11389fa5497 Mon Sep 17 00:00:00 2001 From: Baptiste Augrain <daiyam@zokugun.org> Date: Wed, 10 Mar 2021 16:48:45 +0100 Subject: [PATCH 03/10] PR should build but not deploy --- .github/workflows/linux.yml | 13 +++++++++---- .github/workflows/macos.yml | 17 +++++++++++------ .github/workflows/windows.yml | 13 +++++++++---- check_cron_or_pr.sh | 17 +++++++++++++++++ build_macos.sh => scripts/build_macos.sh | 2 -- 5 files changed, 46 insertions(+), 16 deletions(-) create mode 100644 check_cron_or_pr.sh rename build_macos.sh => scripts/build_macos.sh (91%) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 5d6ea26..43b03c9 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -42,6 +42,10 @@ jobs: - name: Install Yarn run: npm install -g yarn + - name: Check PR or cron + run: | + . check_cron_or_pr.sh + - name: Clone VSCode repo run: ./get_repo.sh @@ -49,6 +53,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: ./check_tags.sh + if: env.SHOULD_DEPLOY == 'yes' - name: Build env: @@ -61,15 +66,15 @@ jobs: run: | cd VSCode-linux-${VSCODE_ARCH} tar czf ../VSCodium-linux-${VSCODE_ARCH}-${LATEST_MS_TAG}.tar.gz . - if: env.SHOULD_BUILD == 'yes' + if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes' - name: Generate shasums run: ./sum.sh - if: env.SHOULD_BUILD == 'yes' + if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes' - name: Release uses: softprops/action-gh-release@v1 - if: env.SHOULD_BUILD == 'yes' + if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes' with: tag_name: ${{ env.LATEST_MS_TAG }} files: | @@ -84,7 +89,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Update versions repo - if: env.SHOULD_BUILD == 'yes' + if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes' run: ./update_version.sh env: GITHUB_TOKEN: ${{ secrets.STRONGER_GITHUB_TOKEN }} diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 5188243..ae00853 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -21,6 +21,10 @@ jobs: with: node-version: 12.14.1 + - name: Check PR or cron + run: | + . check_cron_or_pr.sh + - name: Clone VSCode repo run: | . get_repo.sh @@ -30,6 +34,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | . check_tags.sh + if: env.SHOULD_DEPLOY == 'yes' - name: Build env: @@ -42,7 +47,7 @@ jobs: CERTIFICATE_OSX_P12: ${{ secrets.CERTIFICATE_OSX_P12 }} CERTIFICATE_OSX_PASSWORD: ${{ secrets.CERTIFICATE_OSX_PASSWORD }} CERTIFICATE_OSX_ID: ${{ secrets.CERTIFICATE_OSX_ID }} - if: env.SHOULD_BUILD == 'yes' + if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes' run: | if [ -d "VSCode-darwin-${VSCODE_ARCH}" ]; then # just in case the build failed cd "VSCode-darwin-${VSCODE_ARCH}" @@ -61,7 +66,7 @@ jobs: run: | cd "VSCode-darwin-${VSCODE_ARCH}" zip -r -X -y ../VSCodium-darwin-${VSCODE_ARCH}-${LATEST_MS_TAG}.zip ./*.app - if: env.SHOULD_BUILD == 'yes' + if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes' - name: DMG the release run: | @@ -69,15 +74,15 @@ jobs: npx create-dmg VSCodium.app .. mv "../VSCodium ${LATEST_MS_TAG}.dmg" "../VSCodium.${VSCODE_ARCH}.${LATEST_MS_TAG}.dmg" popd - if: env.SHOULD_BUILD == 'yes' + if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes' - name: Generate shasums run: ./sum.sh - if: env.SHOULD_BUILD == 'yes' + if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes' - name: Release uses: softprops/action-gh-release@v1 - if: env.SHOULD_BUILD == 'yes' + if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes' with: tag_name: ${{ env.LATEST_MS_TAG }} files: | @@ -88,7 +93,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Update versions repo - if: env.SHOULD_BUILD == 'yes' + if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes' run: ./update_version.sh env: GITHUB_TOKEN: ${{ secrets.STRONGER_GITHUB_TOKEN }} diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 7fa75df..de6438c 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -34,6 +34,10 @@ jobs: with: python-version: '2.x' + - name: Check PR or cron + run: | + . check_cron_or_pr.sh + - name: Clone VSCode repo run: ./get_repo.sh shell: bash @@ -43,6 +47,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: ./check_tags.sh shell: bash + if: env.SHOULD_DEPLOY == 'yes' - name: Build env: @@ -59,16 +64,16 @@ jobs: mv vscode\\.build\\win32-${VSCODE_ARCH}\\user-setup\\VSCodeSetup.exe VSCodiumUserSetup-${VSCODE_ARCH}-${LATEST_MS_TAG}.exe mv vscode\\.build\\win32-${VSCODE_ARCH}\\archive\\VSCode-win32-${VSCODE_ARCH}.zip VSCodium-win32-${VSCODE_ARCH}-${LATEST_MS_TAG}.zip shell: bash - if: env.SHOULD_BUILD == 'yes' + if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes' - name: Generate shasums run: ./sum.sh shell: bash - if: env.SHOULD_BUILD == 'yes' + if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes' - name: Release uses: softprops/action-gh-release@v1 - if: env.SHOULD_BUILD == 'yes' + if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes' with: tag_name: ${{ env.LATEST_MS_TAG }} files: | @@ -80,7 +85,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Update versions repo - if: env.SHOULD_BUILD == 'yes' + if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes' run: ./update_version.sh shell: bash env: diff --git a/check_cron_or_pr.sh b/check_cron_or_pr.sh new file mode 100644 index 0000000..df2c072 --- /dev/null +++ b/check_cron_or_pr.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +set -e + +if [[ $github.event.number ]]; then + # it's a PR + + export SHOULD_BUILD="yes" + export SHOULD_DEPLOY="no" +else + export SHOULD_DEPLOY="yes" +fi + +if [[ $GITHUB_ENV ]]; then + echo "SHOULD_BUILD=$SHOULD_BUILD" >> $GITHUB_ENV + echo "SHOULD_DEPLOY=$SHOULD_DEPLOY" >> $GITHUB_ENV +fi \ No newline at end of file diff --git a/build_macos.sh b/scripts/build_macos.sh similarity index 91% rename from build_macos.sh rename to scripts/build_macos.sh index 55cc5ee..e06389d 100755 --- a/build_macos.sh +++ b/scripts/build_macos.sh @@ -1,7 +1,5 @@ #!/bin/bash -nvm use 12 - rm -rf VSCode* rm -rf vscode From c3f50a8efe7a78e40b63caf43c1b8c11ad8ab795 Mon Sep 17 00:00:00 2001 From: Baptiste Augrain <daiyam@zokugun.org> Date: Wed, 10 Mar 2021 16:56:14 +0100 Subject: [PATCH 04/10] fixing scripts path --- .github/workflows/linux.yml | 3 +-- .github/workflows/windows.yml | 4 ++-- check_cron_or_pr.sh | 4 +++- scripts/build_linux.sh | 8 ++++++++ scripts/build_windows.sh | 8 ++++++++ 5 files changed, 22 insertions(+), 5 deletions(-) mode change 100644 => 100755 check_cron_or_pr.sh create mode 100644 scripts/build_linux.sh create mode 100644 scripts/build_windows.sh diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 43b03c9..2305259 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -43,8 +43,7 @@ jobs: run: npm install -g yarn - name: Check PR or cron - run: | - . check_cron_or_pr.sh + run: ./check_cron_or_pr.sh - name: Clone VSCode repo run: ./get_repo.sh diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index de6438c..2dda0e2 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -35,8 +35,8 @@ jobs: python-version: '2.x' - name: Check PR or cron - run: | - . check_cron_or_pr.sh + run: ./check_cron_or_pr.sh + shell: bash - name: Clone VSCode repo run: ./get_repo.sh diff --git a/check_cron_or_pr.sh b/check_cron_or_pr.sh old mode 100644 new mode 100755 index df2c072..14104df --- a/check_cron_or_pr.sh +++ b/check_cron_or_pr.sh @@ -3,11 +3,13 @@ set -e if [[ $github.event.number ]]; then - # it's a PR + echo "It's a PR" export SHOULD_BUILD="yes" export SHOULD_DEPLOY="no" else + echo "It's a cron" + export SHOULD_DEPLOY="yes" fi diff --git a/scripts/build_linux.sh b/scripts/build_linux.sh new file mode 100644 index 0000000..5bfeb67 --- /dev/null +++ b/scripts/build_linux.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +rm -rf VSCode* +rm -rf vscode + +. get_repo.sh + +SHOULD_BUILD=yes CI_BUILD=no OS_NAME=linux VSCODE_ARCH=x64 . build.sh \ No newline at end of file diff --git a/scripts/build_windows.sh b/scripts/build_windows.sh new file mode 100644 index 0000000..4cc2261 --- /dev/null +++ b/scripts/build_windows.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +rm -rf VSCode* +rm -rf vscode + +. get_repo.sh + +SHOULD_BUILD=yes CI_BUILD=no OS_NAME=windows VSCODE_ARCH=x64 . build.sh \ No newline at end of file From 78ba01d3a0ea4139bbd5863e98489199758566ea Mon Sep 17 00:00:00 2001 From: Baptiste Augrain <daiyam@zokugun.org> Date: Wed, 10 Mar 2021 18:24:30 +0100 Subject: [PATCH 05/10] retrigger checks From 2089830d925041fe42ca274923c94cf186eefcb8 Mon Sep 17 00:00:00 2001 From: Baptiste Augrain <daiyam@zokugun.org> Date: Wed, 10 Mar 2021 18:58:36 +0100 Subject: [PATCH 06/10] add cache --- .github/workflows/linux.yml | 16 +++++++++++++ .github/workflows/macos.yml | 18 ++++++++++++++- .github/workflows/windows.yml | 16 +++++++++++++ build/azure-pipelines/computeYarnCacheKey.js | 24 ++++++++++++++++++++ 4 files changed, 73 insertions(+), 1 deletion(-) create mode 100644 build/azure-pipelines/computeYarnCacheKey.js diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 2305259..87edc39 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -54,6 +54,22 @@ jobs: run: ./check_tags.sh if: env.SHOULD_DEPLOY == 'yes' + - name: Compute cache key + id: yarnCacheKey + run: echo "::set-output name=value::$(node build/azure-pipelines/computeYarnCacheKey.js)" + + - name: Get yarn cache directory path + id: yarnCacheDirPath + run: echo "::set-output name=dir::$(yarn cache dir)" + + - name: Cache yarn directory + uses: actions/cache@v2 + with: + path: ${{ steps.yarnCacheDirPath.outputs.dir }} + key: ${{ runner.os }}-yarnCacheDir-${{ steps.yarnCacheKey.outputs.value }} + restore-keys: ${{ runner.os }}-yarnCacheDir- + if: env.SHOULD_BUILD == 'yes' + - name: Build env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index ae00853..4456ba0 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -35,7 +35,23 @@ jobs: run: | . check_tags.sh if: env.SHOULD_DEPLOY == 'yes' - + + - name: Compute cache key + id: yarnCacheKey + run: echo "::set-output name=value::$(node build/azure-pipelines/computeYarnCacheKey.js)" + + - name: Get yarn cache directory path + id: yarnCacheDirPath + run: echo "::set-output name=dir::$(yarn cache dir)" + + - name: Cache yarn directory + uses: actions/cache@v2 + with: + path: ${{ steps.yarnCacheDirPath.outputs.dir }} + key: ${{ runner.os }}-yarnCacheDir-${{ steps.yarnCacheKey.outputs.value }} + restore-keys: ${{ runner.os }}-yarnCacheDir- + if: env.SHOULD_BUILD == 'yes' + - name: Build env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 2dda0e2..898001f 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -49,6 +49,22 @@ jobs: shell: bash if: env.SHOULD_DEPLOY == 'yes' + - name: Compute cache key + id: yarnCacheKey + run: echo "::set-output name=value::$(node build/azure-pipelines/computeYarnCacheKey.js)" + + - name: Get yarn cache directory path + id: yarnCacheDirPath + run: echo "::set-output name=dir::$(yarn cache dir)" + + - name: Cache yarn directory + uses: actions/cache@v2 + with: + path: ${{ steps.yarnCacheDirPath.outputs.dir }} + key: ${{ runner.os }}-yarnCacheDir-${{ steps.yarnCacheKey.outputs.value }} + restore-keys: ${{ runner.os }}-yarnCacheDir- + if: env.SHOULD_BUILD == 'yes' + - name: Build env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/build/azure-pipelines/computeYarnCacheKey.js b/build/azure-pipelines/computeYarnCacheKey.js new file mode 100644 index 0000000..f275804 --- /dev/null +++ b/build/azure-pipelines/computeYarnCacheKey.js @@ -0,0 +1,24 @@ +const fs = require("fs"); +const crypto = require("crypto"); +const path = require("path"); +const { dirs } = require('../../vscode/build/npm/dirs'); + +const ROOT = path.join(__dirname, '../../vscode'); + +const shasum = crypto.createHash('sha1'); + +shasum.update(fs.readFileSync(path.join(ROOT, '.yarnrc'))); +shasum.update(fs.readFileSync(path.join(ROOT, 'remote/.yarnrc'))); + +// Add `yarn.lock` files +for (let dir of dirs) { + const yarnLockPath = path.join(ROOT, dir, 'yarn.lock'); + shasum.update(fs.readFileSync(yarnLockPath)); +} + +// Add any other command line arguments +for (let i = 2; i < process.argv.length; i++) { + shasum.update(process.argv[i]); +} + +process.stdout.write(shasum.digest('hex')); \ No newline at end of file From 59ad206f9e2b2fba7222753a6c38c0d249f11430 Mon Sep 17 00:00:00 2001 From: Baptiste Augrain <daiyam@zokugun.org> Date: Wed, 10 Mar 2021 19:24:52 +0100 Subject: [PATCH 07/10] move build scripts --- .github/workflows/linux.yml | 2 ++ .github/workflows/macos.yml | 2 ++ .github/workflows/windows.yml | 2 ++ build/azure-pipelines/computeYarnCacheKey.js | 2 +- build/build_linux.sh | 8 ++++++++ {scripts => build}/build_macos.sh | 2 +- build/build_windows.ps1 | 15 +++++++++++++++ scripts/build_linux.sh | 8 -------- scripts/build_windows.sh | 8 -------- 9 files changed, 31 insertions(+), 18 deletions(-) create mode 100755 build/build_linux.sh rename {scripts => build}/build_macos.sh (96%) create mode 100755 build/build_windows.ps1 delete mode 100644 scripts/build_linux.sh delete mode 100644 scripts/build_windows.sh diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 87edc39..bea3e45 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -57,10 +57,12 @@ jobs: - name: Compute cache key id: yarnCacheKey run: echo "::set-output name=value::$(node build/azure-pipelines/computeYarnCacheKey.js)" + if: env.SHOULD_BUILD == 'yes' - name: Get yarn cache directory path id: yarnCacheDirPath run: echo "::set-output name=dir::$(yarn cache dir)" + if: env.SHOULD_BUILD == 'yes' - name: Cache yarn directory uses: actions/cache@v2 diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 4456ba0..fd5deeb 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -39,10 +39,12 @@ jobs: - name: Compute cache key id: yarnCacheKey run: echo "::set-output name=value::$(node build/azure-pipelines/computeYarnCacheKey.js)" + if: env.SHOULD_BUILD == 'yes' - name: Get yarn cache directory path id: yarnCacheDirPath run: echo "::set-output name=dir::$(yarn cache dir)" + if: env.SHOULD_BUILD == 'yes' - name: Cache yarn directory uses: actions/cache@v2 diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 898001f..43389f1 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -52,10 +52,12 @@ jobs: - name: Compute cache key id: yarnCacheKey run: echo "::set-output name=value::$(node build/azure-pipelines/computeYarnCacheKey.js)" + if: env.SHOULD_BUILD == 'yes' - name: Get yarn cache directory path id: yarnCacheDirPath run: echo "::set-output name=dir::$(yarn cache dir)" + if: env.SHOULD_BUILD == 'yes' - name: Cache yarn directory uses: actions/cache@v2 diff --git a/build/azure-pipelines/computeYarnCacheKey.js b/build/azure-pipelines/computeYarnCacheKey.js index f275804..7397d45 100644 --- a/build/azure-pipelines/computeYarnCacheKey.js +++ b/build/azure-pipelines/computeYarnCacheKey.js @@ -21,4 +21,4 @@ for (let i = 2; i < process.argv.length; i++) { shasum.update(process.argv[i]); } -process.stdout.write(shasum.digest('hex')); \ No newline at end of file +process.stdout.write(shasum.digest('hex')); diff --git a/build/build_linux.sh b/build/build_linux.sh new file mode 100755 index 0000000..e9a58cf --- /dev/null +++ b/build/build_linux.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +rm -rf VSCode* +rm -rf vscode + +./get_repo.sh + +SHOULD_BUILD=yes CI_BUILD=no OS_NAME=linux VSCODE_ARCH=x64 ./build.sh diff --git a/scripts/build_macos.sh b/build/build_macos.sh similarity index 96% rename from scripts/build_macos.sh rename to build/build_macos.sh index e06389d..f460524 100755 --- a/scripts/build_macos.sh +++ b/build/build_macos.sh @@ -5,4 +5,4 @@ rm -rf vscode . get_repo.sh -SHOULD_BUILD=yes CI_BUILD=no OS_NAME=osx VSCODE_ARCH=x64 . build.sh \ No newline at end of file +SHOULD_BUILD=yes CI_BUILD=no OS_NAME=osx VSCODE_ARCH=x64 . build.sh diff --git a/build/build_windows.ps1 b/build/build_windows.ps1 new file mode 100755 index 0000000..f051bf1 --- /dev/null +++ b/build/build_windows.ps1 @@ -0,0 +1,15 @@ +# powershell -ExecutionPolicy ByPass -File build_windows.ps1 + +$env:Path += ";C:\Program Files\Git\bin" + +Remove-Item -Recurse -Force VSCode* +Remove-Item -Recurse -Force vscode + +bash ./get_repo.sh + +$Env:SHOULD_BUILD = 'yes' +$Env:CI_BUILD = 'no' +$Env:OS_NAME = 'windows' +$Env:VSCODE_ARCH = 'x64' + +bash ./build.sh diff --git a/scripts/build_linux.sh b/scripts/build_linux.sh deleted file mode 100644 index 5bfeb67..0000000 --- a/scripts/build_linux.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -rm -rf VSCode* -rm -rf vscode - -. get_repo.sh - -SHOULD_BUILD=yes CI_BUILD=no OS_NAME=linux VSCODE_ARCH=x64 . build.sh \ No newline at end of file diff --git a/scripts/build_windows.sh b/scripts/build_windows.sh deleted file mode 100644 index 4cc2261..0000000 --- a/scripts/build_windows.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -rm -rf VSCode* -rm -rf vscode - -. get_repo.sh - -SHOULD_BUILD=yes CI_BUILD=no OS_NAME=windows VSCODE_ARCH=x64 . build.sh \ No newline at end of file From c4b4194df78944bdafafde974dda69abe374d9c1 Mon Sep 17 00:00:00 2001 From: Baptiste Augrain <daiyam@zokugun.org> Date: Wed, 10 Mar 2021 19:38:28 +0100 Subject: [PATCH 08/10] cache per os and arch --- .github/workflows/linux.yml | 4 ++-- .github/workflows/macos.yml | 4 ++-- .github/workflows/windows.yml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index bea3e45..3679201 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -68,8 +68,8 @@ jobs: uses: actions/cache@v2 with: path: ${{ steps.yarnCacheDirPath.outputs.dir }} - key: ${{ runner.os }}-yarnCacheDir-${{ steps.yarnCacheKey.outputs.value }} - restore-keys: ${{ runner.os }}-yarnCacheDir- + key: ${{ env.OS_NAME }}-${{ env.VSCODE_ARCH }}-yarnCacheDir-${{ steps.yarnCacheKey.outputs.value }} + restore-keys: ${{ env.OS_NAME }}-${{ env.VSCODE_ARCH }}-yarnCacheDir- if: env.SHOULD_BUILD == 'yes' - name: Build diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index fd5deeb..fed6689 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -50,8 +50,8 @@ jobs: uses: actions/cache@v2 with: path: ${{ steps.yarnCacheDirPath.outputs.dir }} - key: ${{ runner.os }}-yarnCacheDir-${{ steps.yarnCacheKey.outputs.value }} - restore-keys: ${{ runner.os }}-yarnCacheDir- + key: ${{ env.OS_NAME }}-${{ env.VSCODE_ARCH }}-yarnCacheDir-${{ steps.yarnCacheKey.outputs.value }} + restore-keys: ${{ env.OS_NAME }}-${{ env.VSCODE_ARCH }}-yarnCacheDir- if: env.SHOULD_BUILD == 'yes' - name: Build diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 43389f1..9f62d46 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -63,8 +63,8 @@ jobs: uses: actions/cache@v2 with: path: ${{ steps.yarnCacheDirPath.outputs.dir }} - key: ${{ runner.os }}-yarnCacheDir-${{ steps.yarnCacheKey.outputs.value }} - restore-keys: ${{ runner.os }}-yarnCacheDir- + key: ${{ env.OS_NAME }}-${{ env.VSCODE_ARCH }}-yarnCacheDir-${{ steps.yarnCacheKey.outputs.value }} + restore-keys: ${{ env.OS_NAME }}-${{ env.VSCODE_ARCH }}-yarnCacheDir- if: env.SHOULD_BUILD == 'yes' - name: Build From cd353df55ade23a7f0d82bc220923a4a156eddc2 Mon Sep 17 00:00:00 2001 From: Baptiste Augrain <daiyam@zokugun.org> Date: Wed, 10 Mar 2021 19:47:13 +0100 Subject: [PATCH 09/10] fix linux cache key --- .github/workflows/linux.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 3679201..3b18e25 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -68,8 +68,8 @@ jobs: uses: actions/cache@v2 with: path: ${{ steps.yarnCacheDirPath.outputs.dir }} - key: ${{ env.OS_NAME }}-${{ env.VSCODE_ARCH }}-yarnCacheDir-${{ steps.yarnCacheKey.outputs.value }} - restore-keys: ${{ env.OS_NAME }}-${{ env.VSCODE_ARCH }}-yarnCacheDir- + key: linux-${{ matrix.npm_arch }}-yarnCacheDir-${{ steps.yarnCacheKey.outputs.value }} + restore-keys: linux-${{ matrix.npm_arch }}-yarnCacheDir- if: env.SHOULD_BUILD == 'yes' - name: Build From 6c87e3a778eb3a5367d953a7e20d8c3f6e23d4ce Mon Sep 17 00:00:00 2001 From: Baptiste Augrain <daiyam@zokugun.org> Date: Wed, 10 Mar 2021 21:41:51 +0100 Subject: [PATCH 10/10] retrigger checks