Compare commits

...

9 Commits

Author SHA1 Message Date
76abfcf8b2 Install windows bash 2025-02-26 11:00:04 -05:00
2afbc7b20e Try direct install method 2025-02-26 10:36:30 -05:00
7566ea89fa Try winget 2025-02-26 09:46:14 -05:00
559570d801 Install git first 2025-02-26 09:37:22 -05:00
732ee2b0fc Add git to path windows 2025-02-26 09:30:05 -05:00
629e45ccb1 Fix yarn install 2025-02-26 09:07:21 -05:00
1a4e855955 Use cli with powershell support 2025-02-26 08:56:02 -05:00
b6d57a6f85 Tweak cache 2025-02-26 08:56:02 -05:00
d5ad554d0b Try runs-on for windows playwright
Should be faster than current runners, may need to work out some
shenanigans with the os string.
2025-02-26 08:56:02 -05:00
3 changed files with 53 additions and 15 deletions

View File

@ -39,7 +39,7 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
# TODO: enable self-hosted-windows-8-cores once available # TODO: enable self-hosted-windows-8-cores once available
os: [namespace-profile-ubuntu-8-cores, namespace-profile-macos-8-cores, windows-16-cores] os: [namespace-profile-ubuntu-8-cores, namespace-profile-macos-8-cores, "runs-on=${{ github.run_id }}/family=i7ie.2xlarge/image=windows22-base-x64"]
shardIndex: [1, 2, 3, 4] shardIndex: [1, 2, 3, 4]
shardTotal: [4] shardTotal: [4]
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
@ -51,17 +51,55 @@ jobs:
app-id: ${{ secrets.MODELING_APP_GH_APP_ID }} app-id: ${{ secrets.MODELING_APP_GH_APP_ID }}
private-key: ${{ secrets.MODELING_APP_GH_APP_PRIVATE_KEY }} private-key: ${{ secrets.MODELING_APP_GH_APP_PRIVATE_KEY }}
owner: ${{ github.repository_owner }} owner: ${{ github.repository_owner }}
- name: Install Git and add to PATH windows
if: runner.os == 'Windows'
run: |
$ErrorActionPreference = "Stop"
# Define the URL for the MSYS2 installer.
# This URL uses the "latest" release from the MSYS2 installer GitHub repo.
$msys2InstallerUrl = "https://github.com/msys2/msys2-installer/releases/latest/download/msys2-x86_64-latest.exe"
$installerPath = "$env:TEMP\msys2-installer.exe"
Write-Host "Downloading MSYS2 installer from $msys2InstallerUrl..."
Invoke-WebRequest -Uri $msys2InstallerUrl -OutFile $installerPath
Write-Host "Running MSYS2 installer silently..."
# The MSYS2 installer supports a silent install flag (/S).
Start-Process -FilePath $installerPath -ArgumentList "/S" -Wait
# Optionally, add the MSYS2 bash (usually located at C:\msys64\usr\bin) to the PATH.
$msys2BashPath = "C:\msys64\usr\bin"
if (Test-Path $msys2BashPath) {
Write-Host "Adding MSYS2 bash directory to PATH..."
# Update current session's PATH.
$env:PATH += ";$msys2BashPath"
# Optionally, update the system PATH for subsequent sessions.
[System.Environment]::SetEnvironmentVariable("PATH", $env:PATH, [System.EnvironmentVariableTarget]::Machine)
} else {
Write-Host "MSYS2 bash directory not found at $msys2BashPath"
}
Write-Host "MSYS2 (bash) installation complete. Verifying bash version..."
& bash --version
$gitInstallerUrl = "https://github.com/git-for-windows/git/releases/download/v2.41.0.windows.1/Git-2.41.0-64-bit.exe"
$installerPath = "$env:TEMP\GitInstaller.exe"
Invoke-WebRequest -Uri $gitInstallerUrl -OutFile $installerPath
Start-Process -FilePath $installerPath -ArgumentList '/VERYSILENT', '/NORESTART' -Wait
echo "C:\Program Files\Git\cmd" >> $env:GITHUB_PATH
shell: powershell
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with: with:
token: ${{ steps.app-token.outputs.token }} token: ${{ steps.app-token.outputs.token }}
- uses: actions/setup-node@v4 - uses: actions/setup-node@v4
with: with:
node-version-file: '.nvmrc' node-version-file: '.nvmrc'
cache: 'yarn' - uses: KittyCAD/action-install-cli@use-powershell-windows
- uses: KittyCAD/action-install-cli@main
- name: Install dependencies - name: Install dependencies
shell: bash run: |
run: yarn npm install --global yarn
yarn
- name: Cache Playwright Browsers - name: Cache Playwright Browsers
uses: actions/cache@v4 uses: actions/cache@v4
with: with:
@ -69,7 +107,6 @@ jobs:
~/.cache/ms-playwright/ ~/.cache/ms-playwright/
key: ${{ runner.os }}-playwright-${{ hashFiles('yarn.lock') }} key: ${{ runner.os }}-playwright-${{ hashFiles('yarn.lock') }}
- name: Install Playwright Browsers - name: Install Playwright Browsers
shell: bash
run: yarn playwright install --with-deps run: yarn playwright install --with-deps
- name: Download Wasm Cache - name: Download Wasm Cache
id: download-wasm id: download-wasm

18
flake.lock generated
View File

@ -2,11 +2,11 @@
"nodes": { "nodes": {
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1736320768, "lastModified": 1740396192,
"narHash": "sha256-nIYdTAiKIGnFNugbomgBJR+Xv5F1ZQU+HfaBqJKroC0=", "narHash": "sha256-ATMHHrg3sG1KgpQA5x8I+zcYpp5Sf17FaFj/fN+8OoQ=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "4bc9c909d9ac828a039f288cf872d16d38185db8", "rev": "d9b69c3ec2a2e2e971c534065bdd53374bd68b97",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -18,11 +18,11 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1728538411, "lastModified": 1736320768,
"narHash": "sha256-f0SBJz1eZ2yOuKUr5CA9BHULGXVSn6miBuUWdTyhUhU=", "narHash": "sha256-nIYdTAiKIGnFNugbomgBJR+Xv5F1ZQU+HfaBqJKroC0=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "b69de56fac8c2b6f8fd27f2eca01dcda8e0a4221", "rev": "4bc9c909d9ac828a039f288cf872d16d38185db8",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -43,11 +43,11 @@
"nixpkgs": "nixpkgs_2" "nixpkgs": "nixpkgs_2"
}, },
"locked": { "locked": {
"lastModified": 1736476219, "lastModified": 1740450604,
"narHash": "sha256-+qyv3QqdZCdZ3cSO/cbpEY6tntyYjfe1bB12mdpNFaY=", "narHash": "sha256-T/lqASXzCzp5lJISCUw+qwfRmImVUnhKgAhn8ymRClI=",
"owner": "oxalica", "owner": "oxalica",
"repo": "rust-overlay", "repo": "rust-overlay",
"rev": "de30cc5963da22e9742bbbbb9a3344570ed237b9", "rev": "5961ca311c85c31fc5f51925b4356899eed36221",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@ -61,6 +61,7 @@
electron electron
playwright-driver.browsers playwright-driver.browsers
wasm-pack
]) ++ pkgs.lib.optionals pkgs.stdenv.isDarwin (with pkgs; [ ]) ++ pkgs.lib.optionals pkgs.stdenv.isDarwin (with pkgs; [
libiconv libiconv
darwin.apple_sdk.frameworks.Security darwin.apple_sdk.frameworks.Security