Skip to content

Commit

Permalink
Test using self-hosted windows runner
Browse files Browse the repository at this point in the history
  • Loading branch information
ssbarnea committed Nov 27, 2024
1 parent 37a7134 commit 5351126
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 21 deletions.
46 changes: 25 additions & 21 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This is a basic workflow

# cspell: ignore winget
name: ci

# Controls when the action will run. Triggers the workflow on push or pull request
Expand All @@ -11,6 +11,8 @@ on:
- "v*.*"
pull_request:
branches: ["main", "devel/*"]
pull_request_target:
branches: ["main", "devel/*"]
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
Expand Down Expand Up @@ -67,37 +69,39 @@ jobs:
name:
- docs
include:
- name: lint
task-name: lint
os: ubuntu-22.04
env:
SKIP_PODMAN: 1
SKIP_DOCKER: 1

- name: test (linux)
task-name: test

- name: test (macos)
task-name: test
os: macos-13-large
env:
SKIP_PODMAN: 1
SKIP_DOCKER: 1
# only until we fix some broken tests, as we need it to pass
# in order to enable the caching
continue-on-error: true
# - name: lint
# task-name: lint
# os: ubuntu-22.04
# env:
# SKIP_PODMAN: 1
# SKIP_DOCKER: 1

# - name: test (linux)
# task-name: test

# - name: test (macos)
# task-name: test
# os: macos-13-large
# env:
# SKIP_PODMAN: 1
# SKIP_DOCKER: 1
# # only until we fix some broken tests, as we need it to pass
# # in order to enable the caching
# continue-on-error: true

- name: test (wsl)
# runner does not support running containers
task-name: als:test-without-ee
log-name: als-test-without-ee
# https://github.com/actions/virtual-environments/issues/5151
os: devtools-win-x64
os: [self-hosted, pc]
shell: "wsl-bash {0}"
env:
SKIP_PODMAN: 1
SKIP_DOCKER: 1
steps:
# Checkout itself might fail on Windows if you did not bootrap the the self-hosted
# runner using the commands from ./tools/setup.ps1
- uses: actions/checkout@v4
with:
fetch-depth: 0 # we need tags for dynamic versioning
Expand Down
11 changes: 11 additions & 0 deletions tools/prepare.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# To bootstrap self-hosted Windows runners do this first in
# powershell as administrator:
Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force -Scope AllUsers
Install-Module -Name Microsoft.PowerShell.Archive -MinimumVersion 1.2.5 -Scope AllUsers -SkipPublisherCheck
Install-Module -Name Microsoft.WinGet.Client -Force -Scope AllUsers
Install-Module -Name Git -MinimumVersion 2.42 -Force -Scope AllUsers -SkipPublisherCheck
winget install -e --id Git.Git --accept-source-agreements --accept-package-agreements

# Enable long paths, see https://github.com/actions/checkout/issues/1985
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" `
-Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -Force

0 comments on commit 5351126

Please sign in to comment.