From 168e02b35f8a0d98152b3bb0afc719f2e0a25f32 Mon Sep 17 00:00:00 2001 From: Fredrik Medley Date: Thu, 2 Apr 2026 10:45:03 +0200 Subject: [PATCH 1/5] Upgrade GitHub actions to windows-latest --- .github/workflows/main.yaml | 2 +- .github/workflows/pull-requests.yaml | 2 +- MODULE.bazel | 5 +---- .../github-workflow-windows-2022.patch | 13 ------------- tools/update-container-image-versions.sh | 3 +-- 5 files changed, 4 insertions(+), 21 deletions(-) delete mode 100644 patches/com_github_buildbarn_bb_storage/github-workflow-windows-2022.patch diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 1af7652..d901cea 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -151,7 +151,7 @@ { "bazel_os": "windows", "cross_compile": false, - "os": "windows-2022", + "os": "windows-latest", "platform_name": "windows_amd64", "upload": false } diff --git a/.github/workflows/pull-requests.yaml b/.github/workflows/pull-requests.yaml index 678f9df..0fafc7c 100644 --- a/.github/workflows/pull-requests.yaml +++ b/.github/workflows/pull-requests.yaml @@ -138,7 +138,7 @@ { "bazel_os": "windows", "cross_compile": false, - "os": "windows-2022", + "os": "windows-latest", "platform_name": "windows_amd64", "upload": false } diff --git a/MODULE.bazel b/MODULE.bazel index 53d1329..d14a80d 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -93,10 +93,7 @@ git_override( git_override( module_name = "com_github_buildbarn_bb_storage", commit = "d0c6f2633bb9e199fc7285687cdd677660dc688c", - patches = [ - "//:patches/com_github_buildbarn_bb_storage/github-workflow-windows-2022.patch", - "//:patches/com_github_buildbarn_bb_storage/workflows-template-bazel-8.diff", - ], + patches = ["//:patches/com_github_buildbarn_bb_storage/workflows-template-bazel-8.diff"], remote = "https://github.com/buildbarn/bb-storage.git", ) diff --git a/patches/com_github_buildbarn_bb_storage/github-workflow-windows-2022.patch b/patches/com_github_buildbarn_bb_storage/github-workflow-windows-2022.patch deleted file mode 100644 index 770fc86..0000000 --- a/patches/com_github_buildbarn_bb_storage/github-workflow-windows-2022.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git tools/github_workflows/workflows_template.libsonnet tools/github_workflows/workflows_template.libsonnet -index 73bc06c..d52c884 100644 ---- tools/github_workflows/workflows_template.libsonnet -+++ tools/github_workflows/workflows_template.libsonnet -@@ -50,7 +50,7 @@ - { - bazel_os: 'windows', - cross_compile: false, -- os: 'windows-latest', -+ os: 'windows-2022', - platform_name: 'windows_amd64', - upload: false, - }, diff --git a/tools/update-container-image-versions.sh b/tools/update-container-image-versions.sh index e21157e..5bc2079 100755 --- a/tools/update-container-image-versions.sh +++ b/tools/update-container-image-versions.sh @@ -74,8 +74,7 @@ check_module_overrides() { commit_hash=$(get_full_git_commit_hash "$repo") remote=https://github.com/buildbarn/"$repo".git - # As long as we use patches, -B3 is not enough. - override_stanza="$(grep -B5 -A1 "$remote" MODULE.bazel)" + override_stanza="$(grep -B3 -A1 "$remote" MODULE.bazel)" echo "$override_stanza" | grep -q "$commit_hash" || { echo >&2 "Error: Did not find the expected module version override for $repo." echo "Found: $override_stanza" From c2cfb5a343b6a1be8cedec5990786a2de8adf099 Mon Sep 17 00:00:00 2001 From: Fredrik Medley Date: Tue, 31 Mar 2026 14:37:00 +0200 Subject: [PATCH 2/5] Move test-deployment-bare earlier --- .github/workflows/pull-requests.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pull-requests.yaml b/.github/workflows/pull-requests.yaml index 0fafc7c..0f9f5dc 100644 --- a/.github/workflows/pull-requests.yaml +++ b/.github/workflows/pull-requests.yaml @@ -38,6 +38,11 @@ "name": "Override .bazelrc", "run": "echo \"startup --output_base=D:/bazel_output\" >> .bazelrc" }, + { + "if": "matrix.host.platform_name == 'windows_amd64'", + "name": "Test bare deployment (Windows)", + "run": "tools/run-with-console.ps1 -Command 'bash.exe -c ./tools/test-deployment-bare.sh'" + }, { "if": "matrix.host.cross_compile || matrix.host.platform_name == 'linux_amd64'", "name": "linux_amd64: build${{ matrix.host.platform_name == 'linux_amd64' && ' and test' || '' }}", @@ -109,11 +114,6 @@ "run": "tools/test-deployment-bare.sh", "shell": "bash" }, - { - "if": "matrix.host.platform_name == 'windows_amd64'", - "name": "Test bare deployment (Windows)", - "run": "tools/run-with-console.ps1 -Command 'bash.exe -c ./tools/test-deployment-bare.sh'" - }, { "if": "matrix.host.platform_name == 'linux_amd64'", "name": "Test docker-compose deployment", From 09983b32b025e2a747eed297cb79b132260b5e28 Mon Sep 17 00:00:00 2001 From: Fredrik Medley Date: Wed, 1 Apr 2026 15:37:02 +0200 Subject: [PATCH 3/5] TMP: Disable Linux and linting --- .github/workflows/pull-requests.yaml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.github/workflows/pull-requests.yaml b/.github/workflows/pull-requests.yaml index 0f9f5dc..90d4062 100644 --- a/.github/workflows/pull-requests.yaml +++ b/.github/workflows/pull-requests.yaml @@ -128,13 +128,6 @@ "strategy": { "matrix": { "host": [ - { - "bazel_os": "linux", - "cross_compile": true, - "os": "ubuntu-latest", - "platform_name": "linux_amd64", - "upload": true - }, { "bazel_os": "windows", "cross_compile": false, From 7daf43fb1e8c114e4655a870bda2920aa5bf9802 Mon Sep 17 00:00:00 2001 From: Fredrik Medley Date: Tue, 31 Mar 2026 14:09:24 +0200 Subject: [PATCH 4/5] Fix broken WinFSP installation Solve the following error. Failed to mount WinFSP file system: winfsp find installation: The system cannot find the file specified. --- .github/workflows/main.yaml | 3 ++- .github/workflows/pull-requests.yaml | 3 ++- tools/github_workflows/github_workflows.jsonnet | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index d901cea..6e38501 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -21,7 +21,8 @@ { "if": "matrix.host.platform_name == 'windows_amd64'", "name": "Install WinFSP", - "run": "choco install winfsp" + "run": "winget install --id=WinFsp.WinFsp --source=winget", + "shell": "powershell" }, { "if": "matrix.host.platform_name == 'windows_amd64'", diff --git a/.github/workflows/pull-requests.yaml b/.github/workflows/pull-requests.yaml index 90d4062..3ffc9a4 100644 --- a/.github/workflows/pull-requests.yaml +++ b/.github/workflows/pull-requests.yaml @@ -21,7 +21,8 @@ { "if": "matrix.host.platform_name == 'windows_amd64'", "name": "Install WinFSP", - "run": "choco install winfsp" + "run": "winget install --id=WinFsp.WinFsp --source=winget", + "shell": "powershell" }, { "if": "matrix.host.platform_name == 'windows_amd64'", diff --git a/tools/github_workflows/github_workflows.jsonnet b/tools/github_workflows/github_workflows.jsonnet index 22b977c..40a9b60 100644 --- a/tools/github_workflows/github_workflows.jsonnet +++ b/tools/github_workflows/github_workflows.jsonnet @@ -20,7 +20,8 @@ workflows_template.getWorkflows( }, { name: 'Install WinFSP', - run: 'choco install winfsp', + shell: 'powershell', + run: 'winget install --id=WinFsp.WinFsp --source=winget', 'if': "matrix.host.platform_name == 'windows_amd64'", }, { From 2a7ab4c39cb4d013db18f0c1bec300401563c176 Mon Sep 17 00:00:00 2001 From: Fredrik Medley Date: Thu, 2 Apr 2026 23:48:05 +0200 Subject: [PATCH 5/5] Try the unix variant --- .github/workflows/pull-requests.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pull-requests.yaml b/.github/workflows/pull-requests.yaml index 3ffc9a4..acd4a5e 100644 --- a/.github/workflows/pull-requests.yaml +++ b/.github/workflows/pull-requests.yaml @@ -37,7 +37,13 @@ { "if": "matrix.host.platform_name == 'windows_amd64'", "name": "Override .bazelrc", - "run": "echo \"startup --output_base=D:/bazel_output\" >> .bazelrc" + "run": "echo \"startup --output_base=D:/bazel_output\" >> .bazelrc", + "continue-on-error": true, + }, + { + "name": "Test bare deployment (Unix)", + "run": "tools/test-deployment-bare.sh", + "shell": "bash" }, { "if": "matrix.host.platform_name == 'windows_amd64'",