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

🌱 Windows nightly ci #32

Open
wants to merge 28 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
b8f5a93
initial commit
midays Nov 13, 2024
e8f0217
Merge remote-tracking branch 'origin/windows-nightly-ci' into windows…
midays Nov 19, 2024
18766e6
initial commit
midays Nov 19, 2024
9e13fb6
added execute tests command
midays Nov 19, 2024
7f1e8f9
fixed wrong name
midays Nov 19, 2024
3badd74
changed github token secret name to GH_RUNNER_API_TOKEN
midays Nov 19, 2024
96034ef
install vscode script
midays Nov 19, 2024
d800015
run `remove-ec2-runner` even if the run-tests failed
midays Nov 19, 2024
a700c01
fix token name
midays Nov 19, 2024
600267d
change script
midays Nov 19, 2024
0d3d3a2
change script again
midays Nov 21, 2024
1eaa307
add shell specification
midays Nov 21, 2024
8e7c2b2
try different installation way
midays Nov 21, 2024
6ecd9eb
added max retries
midays Nov 21, 2024
ef106ab
install winget and try to use it to install vscode
midays Nov 21, 2024
5ee2b32
remove winget installation, assuming vscode is already installed
midays Nov 23, 2024
f7f2720
print the env variable name to test if vscode is found and recognizab…
midays Nov 23, 2024
d8a0863
change pwsh to powershell
midays Nov 24, 2024
70af6f4
don't remove the vm [temp, will be removed manually, to test vscode i…
midays Nov 24, 2024
d913f77
Revert "don't remove the vm [temp, will be removed manually, to test …
midays Nov 24, 2024
c7c4e45
don't remove the vm [temp, will be removed manually, to test vscode i…
midays Nov 24, 2024
c45068a
stop instance after use, do initial installation
midays Nov 24, 2024
c889e5b
move installation
midays Nov 24, 2024
a0e3ade
Revert "move installation"
midays Nov 24, 2024
a549029
move installation
midays Nov 24, 2024
a2e23c1
verify env path
midays Nov 24, 2024
fe8dac1
Add VSCode to PATH
midays Nov 24, 2024
e42b759
check if installing vscode has affects
midays Nov 24, 2024
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: 18 additions & 2 deletions .github/workflows/windows-nightly-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,24 @@ jobs:
shell: powershell
run: |
$InstallerPath = "C:\vscode-installer.exe"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@midays The VM should have vscode installed on it . @msajidmansoori12 Please correct me if I am wrong .
We don't have to install vscode on it .

Invoke-WebRequest -Uri "https://update.code.visualstudio.com/latest/win32-x64-user/stable" -OutFile $InstallerPath
Start-Process -FilePath $InstallerPath -ArgumentList "/silent" -Wait
$Uri = "https://update.code.visualstudio.com/latest/win32-x64-user/stable"
$RetryCount = 0
$MaxRetries = 3
$Success = $false

while (-not $Success -and $RetryCount -lt $MaxRetries) {
try {
Invoke-WebRequest -Uri $Uri -OutFile $InstallerPath -TimeoutSec 60
$Success = $true
} catch {
$RetryCount++
Write-Output "Download failed. Retry $RetryCount of $MaxRetries..."
Start-Sleep -Seconds 10
}
}
if (-not $Success) {
throw "Failed to download VSCode installer after $MaxRetries attempts."
}

- name: Check VSCode installation
shell: powershell
Expand Down
Loading