Skip to content

Visual Studio Code, rebuilt in Rust

Rust

ci(windows): build and test the app on x64 and arm64 runners

rokarturd91cd461e90e
diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml
new file mode 100644
index 00000000000..669c4daade2
--- /dev/null
+++ b/.github/workflows/windows.yml
@@ -0,0 +1,63 @@
+name: Windows
+
+# Builds the app on Windows x64 and arm64 and runs the app and exthost tests there, the ones that need Windows
+# included (port/tools/windows-build only cross-compiles them). Run by hand only; no packaging yet (port/ledger.md M24).
+on:
+ workflow_dispatch:
+
+permissions:
+ contents: read
+
+defaults:
+ run:
+ shell: bash
+
+jobs:
+ windows:
+ strategy:
+ fail-fast: false
+ matrix:
+ include:
+ - arch: x64
+ runner: windows-latest
+ - arch: arm64
+ runner: windows-11-arm
+ runs-on: ${{ matrix.runner }}
+ timeout-minutes: 240
+ steps:
+ # The runners check out with CRLF, which port/patches/*.patch and the tests' fixtures do not expect;
+ # node_modules paths pass MAX_PATH.
+ - run: git config --global core.autocrlf false && git config --global core.longpaths true
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
+ - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
+ with:
+ node-version: 24
+ - uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
+ with:
+ bun-version: 1.4.5
+ # Pinned by SHA, the action no longer reads the toolchain from its ref.
+ - uses: dtolnay/rust-toolchain@39008827e6b4319a349e9a42dfc90579dd25f1ca # stable
+ with:
+ toolchain: stable
+ - uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2.9.3
+ with:
+ workspaces: native
+ - name: VS Code 1.148.0
+ # @vscode/ripgrep's postinstall downloads from the GitHub API, which answers 403 to runners without a token.
+ env:
+ GITHUB_TOKEN: ${{ github.token }}
+ run: |
+ git clone --branch 1.148.0 --depth 1 https://github.com/microsoft/vscode upstream
+ cd upstream
+ VSCODE_SKIP_NODE_VERSION_CHECK=1 npx -y [email protected] install
+ npx -y [email protected] run compile
+ - run: bun port/tools/build-exthost
+ - run: cargo build --release -p app --locked
+ working-directory: native
+ - run: cargo test -p app -p exthost --locked
+ working-directory: native
+ - uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
+ with:
+ name: win32-${{ matrix.arch }}
+ path: native/target/release/vsrustium.exe
+ if-no-files-found: error