-
Notifications
You must be signed in to change notification settings - Fork 38.7k
Add fast OSS build workflow with transpilation-based gulp tasks #288288
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
Draft
Copilot
wants to merge
15
commits into
main
Choose a base branch
from
copilot/add-github-actions-workflow
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+387
−1
Draft
Changes from 13 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
1731c22
Initial plan
Copilot 6fa64a5
Add fast Code OSS build workflow for win32-x64, darwin-arm64, and lin…
Copilot 32f37f9
Add documentation to fast build workflow
Copilot a892c63
Fix security vulnerability: update actions/download-artifact to v4.1.3
Copilot f17fe4d
Add push trigger for testing on current branch
Copilot 47b1ef7
Fix Windows archive creation using 7z.exe
Copilot 7560de0
Inline compilation into each platform job with transpilation only
Copilot b80bea9
Add vscode-transpile-* gulp targets for transpile-only builds
Copilot a4830d2
Use transpile-client-esbuild instead of transpile-client
Copilot d54238f
Add bundling and extension media compilation to transpile tasks
Copilot 3b0b941
Switch from transpile-client-esbuild to transpile-client
Copilot 2cd4bd3
Remove workflow file and fix gulp transpile tasks for validation
Copilot 8d41acc
Add working workflow file with validated approach
Copilot 22ec32b
Update workflow to use npm instead of yarn
Copilot 0fd6df4
Fix artifact upload paths to be relative to repo root
Copilot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,271 @@ | ||
| name: Fast OSS Build | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| push: | ||
| branches: | ||
| - copilot/add-github-actions-workflow | ||
|
|
||
| jobs: | ||
| linux: | ||
| name: Linux x64 | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 60 | ||
| env: | ||
| VSCODE_ARCH: x64 | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version-file: .nvmrc | ||
|
|
||
| - name: Compute node modules cache key | ||
| id: nodeModulesCacheKey | ||
| run: echo "value=$(node build/azure-pipelines/common/computeNodeModulesCacheKey.js)" >> $GITHUB_OUTPUT | ||
|
|
||
| - name: Cache node modules | ||
| id: cacheNodeModules | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: '**/node_modules' | ||
| key: ${{ runner.os }}-cacheNodeModulesLinux-${{ steps.nodeModulesCacheKey.outputs.value }} | ||
| restore-keys: ${{ runner.os }}-cacheNodeModulesLinux- | ||
|
|
||
| - name: Get yarn cache directory path | ||
| id: yarnCacheDirPath | ||
| if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }} | ||
| run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT | ||
|
|
||
| - name: Cache yarn directory | ||
| if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }} | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: ${{ steps.yarnCacheDirPath.outputs.dir }} | ||
| key: ${{ runner.os }}-yarnCacheDir-${{ steps.nodeModulesCacheKey.outputs.value }} | ||
| restore-keys: ${{ runner.os }}-yarnCacheDir- | ||
|
|
||
| - name: Execute yarn | ||
| 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 | ||
|
|
||
| - name: Compute builtin extensions cache key | ||
| id: builtInExtensionsCacheKey | ||
| run: echo "value=$(node build/azure-pipelines/common/computeBuiltInDepsCacheKey.js)" >> $GITHUB_OUTPUT | ||
|
|
||
| - name: Cache builtin extensions | ||
| id: cache-builtin-extensions | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: .build/builtInExtensions | ||
| key: builtInExtensions-${{ steps.builtInExtensionsCacheKey.outputs.value }} | ||
| restore-keys: builtInExtensions- | ||
|
|
||
| - name: Download built-in extensions | ||
| if: steps.cache-builtin-extensions.outputs.cache-hit != 'true' | ||
| run: node build/lib/builtInExtensions.ts | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - name: Transpile client & extensions | ||
| run: npm run gulp transpile-client transpile-extensions | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - name: Build package | ||
| run: npm run gulp vscode-transpile-linux-$VSCODE_ARCH | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - name: Create archive | ||
| working-directory: .. | ||
| run: | | ||
| mkdir -p .build/linux/archive | ||
| tar -czf .build/linux/archive/VSCode-linux-$VSCODE_ARCH.tar.gz VSCode-linux-$VSCODE_ARCH | ||
|
|
||
| - name: Upload archive | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: vscode-linux-${{ env.VSCODE_ARCH }} | ||
| path: ../.build/linux/archive/VSCode-linux-${{ env.VSCODE_ARCH }}.tar.gz | ||
| retention-days: 7 | ||
|
|
||
| darwin: | ||
| name: macOS arm64 | ||
| runs-on: macos-latest | ||
| timeout-minutes: 60 | ||
| env: | ||
| VSCODE_ARCH: arm64 | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version-file: .nvmrc | ||
|
|
||
| - name: Compute node modules cache key | ||
| id: nodeModulesCacheKey | ||
| run: echo "value=$(node build/azure-pipelines/common/computeNodeModulesCacheKey.js)" >> $GITHUB_OUTPUT | ||
|
|
||
| - name: Cache node modules | ||
| id: cacheNodeModules | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: '**/node_modules' | ||
| key: ${{ runner.os }}-cacheNodeModulesLinux-${{ steps.nodeModulesCacheKey.outputs.value }} | ||
| restore-keys: ${{ runner.os }}-cacheNodeModulesLinux- | ||
|
|
||
| - name: Get yarn cache directory path | ||
| id: yarnCacheDirPath | ||
| if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }} | ||
| run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT | ||
|
|
||
| - name: Cache yarn directory | ||
| if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }} | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: ${{ steps.yarnCacheDirPath.outputs.dir }} | ||
| key: ${{ runner.os }}-yarnCacheDir-${{ steps.nodeModulesCacheKey.outputs.value }} | ||
| restore-keys: ${{ runner.os }}-yarnCacheDir- | ||
|
|
||
| - name: Execute yarn | ||
| 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 | ||
|
|
||
| - name: Compute builtin extensions cache key | ||
| id: builtInExtensionsCacheKey | ||
| run: echo "value=$(node build/azure-pipelines/common/computeBuiltInDepsCacheKey.js)" >> $GITHUB_OUTPUT | ||
|
|
||
| - name: Cache builtin extensions | ||
| id: cache-builtin-extensions | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: .build/builtInExtensions | ||
| key: builtInExtensions-${{ steps.builtInExtensionsCacheKey.outputs.value }} | ||
| restore-keys: builtInExtensions- | ||
|
|
||
| - name: Download built-in extensions | ||
| if: steps.cache-builtin-extensions.outputs.cache-hit != 'true' | ||
| run: node build/lib/builtInExtensions.ts | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - name: Transpile client & extensions | ||
| run: npm run gulp transpile-client transpile-extensions | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - name: Build package | ||
| run: npm run gulp vscode-transpile-darwin-$VSCODE_ARCH | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - name: Create archive | ||
| working-directory: .. | ||
| run: | | ||
| mkdir -p .build/darwin/archive | ||
| tar -czf .build/darwin/archive/VSCode-darwin-$VSCODE_ARCH.tar.gz VSCode-darwin-$VSCODE_ARCH | ||
|
|
||
| - name: Upload archive | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: vscode-darwin-${{ env.VSCODE_ARCH }} | ||
| path: ../.build/darwin/archive/VSCode-darwin-${{ env.VSCODE_ARCH }}.tar.gz | ||
| retention-days: 7 | ||
|
|
||
| windows: | ||
|
||
| name: Windows x64 | ||
| runs-on: windows-latest | ||
| timeout-minutes: 60 | ||
| env: | ||
| VSCODE_ARCH: x64 | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version-file: .nvmrc | ||
|
|
||
| - name: Compute node modules cache key | ||
| id: nodeModulesCacheKey | ||
| run: echo "value=$(node build/azure-pipelines/common/computeNodeModulesCacheKey.js)" >> $env:GITHUB_OUTPUT | ||
|
|
||
| - name: Cache node modules | ||
| id: cacheNodeModules | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: '**/node_modules' | ||
| key: ${{ runner.os }}-cacheNodeModulesLinux-${{ steps.nodeModulesCacheKey.outputs.value }} | ||
| restore-keys: ${{ runner.os }}-cacheNodeModulesLinux- | ||
|
|
||
| - name: Get yarn cache directory path | ||
| id: yarnCacheDirPath | ||
| if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }} | ||
| run: echo "dir=$(yarn cache dir)" >> $env:GITHUB_OUTPUT | ||
|
|
||
| - name: Cache yarn directory | ||
| if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }} | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: ${{ steps.yarnCacheDirPath.outputs.dir }} | ||
| key: ${{ runner.os }}-yarnCacheDir-${{ steps.nodeModulesCacheKey.outputs.value }} | ||
| restore-keys: ${{ runner.os }}-yarnCacheDir- | ||
|
|
||
| - name: Execute yarn | ||
| 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 | ||
|
|
||
| - name: Compute builtin extensions cache key | ||
| id: builtInExtensionsCacheKey | ||
| run: echo "value=$(node build/azure-pipelines/common/computeBuiltInDepsCacheKey.js)" >> $env:GITHUB_OUTPUT | ||
|
|
||
| - name: Cache builtin extensions | ||
| id: cache-builtin-extensions | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: .build/builtInExtensions | ||
| key: builtInExtensions-${{ steps.builtInExtensionsCacheKey.outputs.value }} | ||
| restore-keys: builtInExtensions- | ||
|
|
||
| - name: Download built-in extensions | ||
| if: steps.cache-builtin-extensions.outputs.cache-hit != 'true' | ||
| shell: pwsh | ||
| run: node build/lib/builtInExtensions.ts | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - name: Transpile client & extensions | ||
| shell: pwsh | ||
| run: npm run gulp transpile-client transpile-extensions | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - name: Build package | ||
| shell: pwsh | ||
| run: npm run gulp vscode-transpile-win32-$env:VSCODE_ARCH | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - name: Create archive | ||
| shell: pwsh | ||
| working-directory: .. | ||
| run: | | ||
| New-Item -ItemType Directory -Force -Path .build/win32-$env:VSCODE_ARCH/archive | ||
| $archivePath = ".build/win32-$env:VSCODE_ARCH/archive/VSCode-win32-$env:VSCODE_ARCH.zip" | ||
| 7z.exe a -tzip $archivePath VSCode-win32-$env:VSCODE_ARCH/* "-xr!CodeSignSummary*.md" | ||
|
|
||
| - name: Upload archive | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: vscode-win32-${{ env.VSCODE_ARCH }} | ||
| path: ../.build/win32-${{ env.VSCODE_ARCH }}/archive/VSCode-win32-${{ env.VSCODE_ARCH }}.zip | ||
| retention-days: 7 | ||
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.