Skip to content

Commit c61b8c0

Browse files
committedFeb 10, 2025
Move windows build to separate job
Don't block other linux steps on building the windows binary Signed-off-by: Brad Davidson <brad.davidson@rancher.com> (cherry picked from commit 20a9a6b) Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
1 parent ad668b3 commit c61b8c0

File tree

2 files changed

+19
-7
lines changed

2 files changed

+19
-7
lines changed
 

‎.github/workflows/build-k3s.yaml

+18-6
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,14 @@ jobs:
1919
build:
2020
name: Build
2121
runs-on: ${{ inputs.arch }} # defaults to ubuntu-latest, for arm64 use ubuntu-24.04-arm
22-
timeout-minutes: 30
22+
timeout-minutes: 20
2323
steps:
2424
- name: Checkout K3s
2525
uses: actions/checkout@v4
2626
- name: Build K3s binary
2727
run: |
2828
DOCKER_BUILDKIT=1 SKIP_IMAGE=1 SKIP_AIRGAP=1 SKIP_VALIDATE=1 GOCOVER=1 make
2929
sha256sum dist/artifacts/k3s | sed 's|dist/artifacts/||' > dist/artifacts/k3s.sha256sum
30-
- name: Build K3s binary (windows)
31-
if: inputs.arch == 'ubuntu-latest'
32-
run: |
33-
DOCKER_BUILDKIT=1 SKIP_IMAGE=1 SKIP_AIRGAP=1 SKIP_VALIDATE=1 GOCOVER=1 GOOS=windows make
34-
sha256sum dist/artifacts/k3s.exe | sed 's|dist/artifacts/||' > dist/artifacts/k3s.exe.sha256sum
3530
- name: Build K3s image
3631
if: inputs.upload-image == true
3732
run: make package-image
@@ -50,3 +45,20 @@ jobs:
5045
with:
5146
name: k3s-arm64
5247
path: dist/artifacts/k3s*
48+
build-windows:
49+
name: Build (windows)
50+
if: inputs.arch == 'ubuntu-latest'
51+
runs-on: ${{ inputs.arch }} # defaults to ubuntu-latest, for arm64 use ubuntu-24.04-arm
52+
timeout-minutes: 20
53+
steps:
54+
- name: Checkout K3s
55+
uses: actions/checkout@v4
56+
- name: Build K3s binary
57+
run: |
58+
DOCKER_BUILDKIT=1 SKIP_IMAGE=1 SKIP_AIRGAP=1 SKIP_VALIDATE=1 GOCOVER=1 GOOS=windows make
59+
sha256sum dist/artifacts/k3s.exe | sed 's|dist/artifacts/||' > dist/artifacts/k3s.exe.sha256sum
60+
- name: "Upload K3s Artifacts"
61+
uses: actions/upload-artifact@v4
62+
with:
63+
name: k3s-windows
64+
path: dist/artifacts/k3s*

‎.github/workflows/install.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ jobs:
117117
- name: "Download k3s binary"
118118
uses: actions/download-artifact@v4
119119
with:
120-
name: k3s
120+
name: k3s-windows
121121
path: dist/artifacts/
122122
- name: "Run K3s"
123123
timeout-minutes: 5

0 commit comments

Comments
 (0)
Please sign in to comment.