Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert to NPM #34

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions .github/workflows/insiders-gp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
26 changes: 13 additions & 13 deletions .github/workflows/insiders.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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: |
Expand Down
51 changes: 23 additions & 28 deletions .github/workflows/release-gp-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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

Expand All @@ -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
Expand All @@ -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:
Expand All @@ -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
Expand Down Expand Up @@ -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

Expand Down
53 changes: 24 additions & 29 deletions .github/workflows/release-gp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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:
Expand All @@ -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 \
Expand Down Expand Up @@ -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

Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
Loading
Loading