diff --git a/.github/workflows/insiders-gp.yml b/.github/workflows/insiders-gp.yml index a88e640..c152a97 100644 --- a/.github/workflows/insiders-gp.yml +++ b/.github/workflows/insiders-gp.yml @@ -65,27 +65,27 @@ jobs: with: path: "**/node_modules" key: ${{ runner.os }}-cacheNodeModulesLinux-${{ steps.nodeModulesCacheKey.outputs.value }} - - name: Get yarn cache directory path - id: yarnCacheDirPath + - name: Get npm cache directory path + id: npmCacheDirPath if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }} - run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT - - name: Cache yarn directory + run: echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT + - name: Cache npm directory if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }} uses: actions/cache@v3 with: - path: ${{ steps.yarnCacheDirPath.outputs.dir }} - key: ${{ runner.os }}-yarnCacheDir-${{ steps.nodeModulesCacheKey.outputs.value }} - restore-keys: ${{ runner.os }}-yarnCacheDir- - - name: Execute yarn + path: ${{ steps.npmCacheDirPath.outputs.dir }} + key: ${{ runner.os }}-npmCacheDirPath-${{ steps.nodeModulesCacheKey.outputs.value }} + restore-keys: ${{ runner.os }}-npmCacheDirPathCacheDir- + - name: Execute npm if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }} env: PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1 ELECTRON_SKIP_BINARY_DOWNLOAD: 1 - run: yarn --frozen-lockfile --network-timeout 180000 + run: npm ci - name: Compile run: | - yarn npm-run-all --max_old_space_size=4095 -lp compile playwright-install download-builtin-extensions + npx npm-run-all --max_old_space_size=4095 -lp compile playwright-install download-builtin-extensions env: DISABLE_V8_COMPILE_CACHE: 1 diff --git a/.github/workflows/insiders.yml b/.github/workflows/insiders.yml index ebfebc6..e4d3b62 100644 --- a/.github/workflows/insiders.yml +++ b/.github/workflows/insiders.yml @@ -65,35 +65,35 @@ jobs: with: path: "**/node_modules" key: ${{ runner.os }}-cacheNodeModulesLinux-${{ steps.nodeModulesCacheKey.outputs.value }} - - name: Get yarn cache directory path - id: yarnCacheDirPath + - name: Get npm cache directory path + id: npmCacheDirPath if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }} - run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT - - name: Cache yarn directory + run: echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT + - name: Cache npm directory if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }} uses: actions/cache@v3 with: - path: ${{ steps.yarnCacheDirPath.outputs.dir }} - key: ${{ runner.os }}-yarnCacheDir-${{ steps.nodeModulesCacheKey.outputs.value }} - restore-keys: ${{ runner.os }}-yarnCacheDir- - - name: Execute yarn + path: ${{ steps.npmCacheDirPath.outputs.dir }} + key: ${{ runner.os }}-npmCacheDirPath-${{ steps.nodeModulesCacheKey.outputs.value }} + restore-keys: ${{ runner.os }}-npmCacheDirPathCacheDir- + - name: Execute npm if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }} env: PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1 ELECTRON_SKIP_BINARY_DOWNLOAD: 1 - run: yarn --frozen-lockfile --network-timeout 180000 + run: npm ci - name: Compile run: | - yarn npm-run-all --max_old_space_size=4095 -lp compile playwright-install download-builtin-extensions + npx npm-run-all --max_old_space_size=4095 -lp compile playwright-install download-builtin-extensions env: DISABLE_V8_COMPILE_CACHE: 1 - name: Compile test suites run: | set -e - yarn --cwd test/smoke compile - yarn --cwd test/integration/browser compile + npm run compile --prefix test/smoke + npm run compile --prefix test/integration/browser - name: Run integration tests id: runIntegrationTests @@ -103,7 +103,7 @@ jobs: - name: Run smoke tests id: runSmokeTests run: | - yarn smoketest-no-compile --web --headless --electronArgs="--disable-dev-shm-usage" + npm run smoketest-no-compile -- --web --headless --electronArgs="--disable-dev-shm-usage" - name: Push changes run: | diff --git a/.github/workflows/release-gp-test.yml b/.github/workflows/release-gp-test.yml index 684eac9..adb9705 100644 --- a/.github/workflows/release-gp-test.yml +++ b/.github/workflows/release-gp-test.yml @@ -3,18 +3,18 @@ on: workflow_dispatch: inputs: commit: - description: 'Commit to release' + description: "Commit to release" required: true quality: - description: 'Quality' + description: "Quality" required: true type: choice options: - - insider - - stable + - insider + - stable default: insider addTags: - description: 'Adds release tags (latest, nightly, etc) to the image' + description: "Adds release tags (latest, nightly, etc) to the image" type: boolean required: true # workflow_run: @@ -31,9 +31,8 @@ jobs: runs-on: ubuntu-latest name: Build linux-x64 env: - OS_NAME: 'linux' - VSCODE_ARCH: 'x64' - NPM_REGISTRY: 'https://registry.yarnpkg.com' + OS_NAME: "linux" + VSCODE_ARCH: "x64" steps: - uses: actions/checkout@v4 @@ -60,9 +59,6 @@ jobs: with: node-version: 20 - - name: Install Yarn - run: npm install -g yarn - - name: Compute node modules cache key working-directory: ./openvscode-server id: nodeModulesCacheKey @@ -75,19 +71,18 @@ jobs: with: path: "openvscode-server/**/node_modules" key: ${{ runner.os }}-cacheNodeModulesLinux-${{ steps.nodeModulesCacheKey.outputs.value }} - - name: Get yarn cache directory path - working-directory: ./openvscode-server - id: yarnCacheDirPath + - name: Get npm cache directory path + id: npmCacheDirPath if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }} - run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT - - name: Cache yarn directory + run: echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT + - name: Cache npm directory if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }} uses: actions/cache@v3 with: - path: ${{ steps.yarnCacheDirPath.outputs.dir }} - key: ${{ runner.os }}-yarnCacheDir-${{ steps.nodeModulesCacheKey.outputs.value }} - restore-keys: ${{ runner.os }}-yarnCacheDir- - - name: Execute yarn + path: ${{ steps.npmCacheDirPath.outputs.dir }} + key: ${{ runner.os }}-npmCacheDirPath-${{ steps.nodeModulesCacheKey.outputs.value }} + restore-keys: ${{ runner.os }}-npmCacheDirPathCacheDir- + - name: Execute NPM working-directory: ./openvscode-server if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }} env: @@ -98,12 +93,12 @@ jobs: set -e for i in {1..5}; do # try 5 times - yarn --cwd build --frozen-lockfile --check-files && break + npm ci --prefix build && break if [ $i -eq 3 ]; then - echo "Yarn failed too many times" >&2 + echo "NPM failed too many times" >&2 exit 1 fi - echo "Yarn failed $i, trying again..." + echo "NPM failed $i, trying again..." done ./build/azure-pipelines/linux/install.sh @@ -131,11 +126,11 @@ jobs: working-directory: ./openvscode-server run: | set -e - yarn gulp compile-build - yarn gulp extensions-ci - yarn gulp minify-vscode-reh - yarn gulp vscode-web-min-ci - yarn gulp vscode-reh-linux-x64-min-ci + npm run gulp compile-build + npm run gulp extensions-ci + npm run gulp minify-vscode-reh + npm run gulp vscode-web-min-ci + npm run gulp vscode-reh-linux-x64-min-ci env: DISABLE_V8_COMPILE_CACHE: 1 diff --git a/.github/workflows/release-gp.yml b/.github/workflows/release-gp.yml index 892f394..fc066fc 100644 --- a/.github/workflows/release-gp.yml +++ b/.github/workflows/release-gp.yml @@ -3,18 +3,18 @@ on: workflow_dispatch: inputs: commit: - description: 'Commit to release' + description: "Commit to release" required: true quality: - description: 'Quality' + description: "Quality" required: true type: choice options: - - insider - - stable + - insider + - stable default: insider addTags: - description: 'Adds release tags (latest, nightly, etc) to the image' + description: "Adds release tags (latest, nightly, etc) to the image" type: boolean required: true # workflow_run: @@ -31,12 +31,11 @@ jobs: runs-on: ubuntu-latest name: Build linux-x64 env: - OS_NAME: 'linux' - VSCODE_ARCH: 'x64' - NPM_REGISTRY: 'https://registry.yarnpkg.com' + OS_NAME: "linux" + VSCODE_ARCH: "x64" steps: - uses: actions/checkout@v4 - + - uses: actions/checkout@v4 with: repository: ${{ github.repository_owner }}/openvscode-server @@ -60,9 +59,6 @@ jobs: with: node-version: 20 - - name: Install Yarn - run: npm install -g yarn - - name: Compute node modules cache key working-directory: ./openvscode-server id: nodeModulesCacheKey @@ -73,19 +69,18 @@ jobs: with: path: "openvscode-server/**/node_modules" key: ${{ runner.os }}-cacheNodeModulesLinux-${{ steps.nodeModulesCacheKey.outputs.value }} - - name: Get yarn cache directory path - working-directory: ./openvscode-server - id: yarnCacheDirPath + - name: Get npm cache directory path + id: npmCacheDirPath if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }} - run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT - - name: Cache yarn directory + run: echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT + - name: Cache npm directory if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }} uses: actions/cache@v3 with: - path: ${{ steps.yarnCacheDirPath.outputs.dir }} - key: ${{ runner.os }}-yarnCacheDir-${{ steps.nodeModulesCacheKey.outputs.value }} - restore-keys: ${{ runner.os }}-yarnCacheDir- - - name: Execute yarn + path: ${{ steps.npmCacheDirPath.outputs.dir }} + key: ${{ runner.os }}-npmCacheDirPath-${{ steps.nodeModulesCacheKey.outputs.value }} + restore-keys: ${{ runner.os }}-npmCacheDirPathCacheDir- + - name: Execute npm working-directory: ./openvscode-server if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }} env: @@ -98,7 +93,7 @@ jobs: run: | set -e - yarn --cwd build --frozen-lockfile --check-files + npm ci --prefix build docker run -e npm_config_arch -e NPM_REGISTRY \ -e VSCODE_REMOTE_DEPENDENCIES_CONTAINER_NAME -e VSCODE_HOST_MOUNT \ @@ -137,11 +132,11 @@ jobs: working-directory: ./openvscode-server run: | set -e - yarn gulp compile-build - yarn gulp extensions-ci - yarn gulp minify-vscode-reh - yarn gulp vscode-web-min-ci - yarn gulp vscode-reh-linux-x64-min-ci + npm run gulp compile-build + npm run gulp extensions-ci + npm run gulp minify-vscode-reh + npm run gulp vscode-web-min-ci + npm run gulp vscode-reh-linux-x64-min-ci env: DISABLE_V8_COMPILE_CACHE: 1 @@ -154,7 +149,7 @@ jobs: # Check pkg/blobserve/blobserve.go, `inlineVars` method cp vscode-web/out/vs/gitpod/browser/workbench/workbench.html vscode-web/index.html cp vscode-web/out/vs/gitpod/browser/workbench/callback.html vscode-web/callback.html - + sed -i -e 's#baseUrl =.*;#baseUrl = window.location.origin;#g' vscode-web/index.html sed -i -e 's#{{WORKBENCH_WEB_BASE_URL}}#.#g' vscode-web/index.html sed -i -e "s/{{VERSION}}/$CODE_QUALITY-$CODE_COMMIT/g" vscode-web/index.html @@ -204,7 +199,7 @@ jobs: labels: | io.gitpod.ide.version=${{ steps.release_data.outputs.version }} io.gitpod.ide.commit=${{ steps.release_data.outputs.release_commit }} - + - name: Output the image tag to the GitHub Summary run: | echo "Successfully built the \`Gitpod Code\` with the tag:" >> summary.md diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6d85992..3dfb794 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,18 +3,18 @@ on: workflow_dispatch: inputs: commit: - description: 'Commit to release' + description: "Commit to release" required: true quality: - description: 'Quality' + description: "Quality" required: true type: choice options: - - insider - - stable + - insider + - stable default: insider uploadRelease: - description: 'Create GitHub and DockerHub Release' + description: "Create GitHub and DockerHub Release" type: boolean required: true workflow_run: @@ -34,14 +34,14 @@ jobs: fail-fast: true matrix: include: - - vscode_arch: x64 - npm_arch: x64 - deps_container: gitpod/openvscode-server-linux-build-agent:centos7-devtoolset8-x64 - - vscode_arch: arm64 - npm_arch: arm64 - deps_container: gitpod/openvscode-server-linux-build-agent:centos7-devtoolset8-arm64 - - vscode_arch: armhf - npm_arch: arm + - vscode_arch: x64 + npm_arch: x64 + deps_container: gitpod/openvscode-server-linux-build-agent:centos7-devtoolset8-x64 + - vscode_arch: arm64 + npm_arch: arm64 + deps_container: gitpod/openvscode-server-linux-build-agent:centos7-devtoolset8-arm64 + - vscode_arch: armhf + npm_arch: arm name: Build linux-${{ matrix.vscode_arch }} outputs: @@ -49,9 +49,8 @@ jobs: version: ${{ steps.bundle_tar.outputs.version }} quality: ${{ steps.bundle_tar.outputs.quality }} env: - OS_NAME: 'linux' + OS_NAME: "linux" VSCODE_ARCH: ${{ matrix.vscode_arch }} - NPM_REGISTRY: 'https://registry.yarnpkg.com' steps: - name: Set up QEMU uses: docker/setup-qemu-action@v2 @@ -68,9 +67,6 @@ jobs: with: node-version: 20 - - name: Install Yarn - run: npm install -g yarn - - name: Setup system services working-directory: ./openvscode-server run: | @@ -105,19 +101,18 @@ jobs: with: path: "openvscode-server/**/node_modules" key: ${{ runner.os }}-cacheNodeModulesLinux-${{ steps.nodeModulesCacheKey.outputs.value }} - - name: Get yarn cache directory path - working-directory: ./openvscode-server - id: yarnCacheDirPath + - name: Get npm cache directory path + id: npmCacheDirPath if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }} - run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT - - name: Cache yarn directory + run: echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT + - name: Cache npm directory if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }} uses: actions/cache@v3 with: - path: ${{ steps.yarnCacheDirPath.outputs.dir }} - key: ${{ runner.os }}-yarnCacheDir-${{ steps.nodeModulesCacheKey.outputs.value }} - restore-keys: ${{ runner.os }}-yarnCacheDir- - - name: Execute yarn + path: ${{ steps.npmCacheDirPath.outputs.dir }} + key: ${{ runner.os }}-npmCacheDirPath-${{ steps.nodeModulesCacheKey.outputs.value }} + restore-keys: ${{ runner.os }}-npmCacheDirPathCacheDir- + - name: Execute npm working-directory: ./openvscode-server if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }} env: @@ -129,28 +124,25 @@ jobs: run: | set -e - # To workaround the issue of yarn not respecting the registry value from .npmrc - yarn config set registry "$NPM_REGISTRY" - for i in {1..5}; do # try 5 times - yarn --cwd build --frozen-lockfile --check-files && break + npm ci && break if [ $i -eq 3 ]; then - echo "Yarn failed too many times" >&2 + echo "NPM failed too many times" >&2 exit 1 fi - echo "Yarn failed $i, trying again..." + echo "NPM failed $i, trying again..." done export VSCODE_SYSROOT_PREFIX='-glibc-2.17' source ./build/azure-pipelines/linux/setup-env.sh --only-remote for i in {1..5}; do # try 5 times - yarn --frozen-lockfile --check-files && break + npm ci && break if [ $i -eq 3 ]; then - echo "Yarn failed too many times" >&2 + echo "NPM failed too many times" >&2 exit 1 fi - echo "Yarn failed $i, trying again..." + echo "NPM failed $i, trying again..." done - name: Update product.json @@ -186,7 +178,7 @@ jobs: echo "distro_commit: ${distro_commit}" VSCODE_DISTRO_COMMIT="${distro_commit}" \ - yarn gulp vscode-reh-web-linux-${{ matrix.vscode_arch }}-min + npm run gulp vscode-reh-web-linux-${{ matrix.vscode_arch }}-min env: DISABLE_V8_COMPILE_CACHE: 1 @@ -194,14 +186,14 @@ jobs: if: matrix.vscode_arch == 'x64' working-directory: ./openvscode-server run: | - yarn playwright-install + npm run playwright-install - name: Build integration tests if: matrix.vscode_arch == 'x64' working-directory: ./openvscode-server run: | set -e - yarn gulp \ + npm run gulp \ compile-extension:configuration-editing \ compile-extension:vscode-api-tests \ compile-extension:markdown-language-features \ @@ -218,8 +210,8 @@ jobs: working-directory: ./openvscode-server run: | set -e - yarn --cwd test/smoke compile - yarn --cwd test/integration/browser compile + npm run compile --prefix test/smoke + npm run compile --prefix test/integration/browser - name: Run integration tests if: matrix.vscode_arch == 'x64' @@ -235,7 +227,7 @@ jobs: run: | set -e VSCODE_REMOTE_SERVER_PATH="$GITHUB_WORKSPACE/vscode-reh-web-linux-${{ matrix.vscode_arch }}" \ - yarn smoketest-no-compile --web --headless --electronArgs="--disable-dev-shm-usage" + npm run smoketest-no-compile --web --headless --electronArgs="--disable-dev-shm-usage" - name: Bundle tarfile id: bundle_tar