-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test using self-hosted windows runner
- Loading branch information
Showing
2 changed files
with
49 additions
and
23 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
@@ -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 | ||
|
@@ -11,6 +11,8 @@ on: | |
- "v*.*" | ||
pull_request: | ||
branches: ["main", "devel/*"] | ||
pull_request_target: | ||
branches: ["main", "devel/*"] | ||
schedule: | ||
- cron: "0 0 * * *" | ||
workflow_dispatch: | ||
|
@@ -67,46 +69,49 @@ 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, Windows, X64, ssbarnea, wsl2] | ||
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 | ||
show-progress: false | ||
|
||
# https://github.com/marketplace/actions/setup-wsl | ||
- name: Activate WSL | ||
if: contains(matrix.shell, 'wsl') | ||
uses: Vampire/[email protected] | ||
if: contains(matrix.shell, 'wsl') && false | ||
uses: vedantmgoyal9/setup-wsl2@main | ||
# Vampire/[email protected] | ||
with: | ||
distribution: Ubuntu-22.04 | ||
set-as-default: "true" | ||
|
@@ -154,8 +159,18 @@ jobs: | |
with: | ||
python-version: "3.12" | ||
|
||
- name: wsl setup | ||
uses: Ubuntu/WSL/.github/actions/wsl-bash@main | ||
with: | ||
distro: Ubuntu-22.04 | ||
# working-dir: /tmp/github/ | ||
exec: | | ||
pwd | ||
ls -la | ||
- name: Install asdf inside WSL | ||
if: contains(matrix.shell, 'wsl') | ||
shell: bash | ||
run: | | ||
set -ex | ||
git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.14.0 | ||
|
This file contains 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,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 |