2121env :
2222 GO_VERSION : " 1.21"
2323 TESTFLAGS : " -v --parallel=6 --timeout=60m"
24- GOTESTSUM_VERSION : " v1.9.0" # same as one in Dockerfile
2524 GOTESTSUM_FORMAT : " standard-verbose"
2625 DESTDIR : " ./bin"
2726
2827jobs :
29- test :
30- runs-on : ${{ matrix.os }}
31- strategy :
32- fail-fast : false
33- matrix :
34- os :
35- # - ubuntu-22.04
36- # - macOS-11
37- - windows-2022
28+ build-windows-amd64 :
29+ runs-on : ubuntu-22.04
30+ steps :
31+ -
32+ name : Checkout
33+ uses : actions/checkout@v4
34+ -
35+ name : Set up Docker Buildx
36+ uses : docker/setup-buildx-action@v3
37+ -
38+ name : Build
39+ uses : docker/bake-action@v4
40+ with :
41+ provenance : false
42+ targets : binaries-for-test
43+ set : |
44+ *.platform=windows/amd64
45+ *.cache-from=type=gha,scope=binaries-test-windows
46+ *.cache-to=type=gha,scope=binaries-test-windows
47+ -
48+ name : Upload artifacts
49+ uses : actions/upload-artifact@v4
50+ with :
51+ name : buildkit-windows-amd64
52+ path : ${{ env.DESTDIR }}/*
53+ if-no-files-found : error
54+ retention-days : 1
55+
56+ test-windows-amd64 :
57+ runs-on : windows-2022
58+ needs :
59+ - build-windows-amd64
3860 steps :
3961 -
4062 name : Checkout
@@ -45,40 +67,19 @@ jobs:
4567 with :
4668 go-version : " ${{ env.GO_VERSION }}"
4769 -
48- name : Install gotestsum
49- run : |
50- go install gotest.tools/gotestsum@${{ env.GOTESTSUM_VERSION }}
51- -
52- name : Install buildkitd.exe binary
53- run : |
54- go install .\cmd\buildkitd
70+ name : Download artifacts
71+ uses : actions/download-artifact@v4
72+ with :
73+ name : buildkit-windows-amd64
74+ path : ${{ github.workspace }}\bin
5575 -
56- name : Install containerd.exe binary
57- run : |
58- $goModFileContent = Get-Content go.mod -Raw
59- $pattern = '(?<=github\.com/containerd/containerd v)[\d\.]+'
60- $version = [regex]::Match($goModFileContent, $pattern).Value
61- mkdir -p .\bin\installs -f
62- cd .\bin\installs
63- git clone https://github.com/containerd/containerd.git
64- cd containerd
65- git checkout tags/v$version
66- go install .\cmd\...
67- cd ..\..\..
68- -
69- name : Install registry.exe (distribution/distribution) binary
76+ name : Add bin folder to Path
7077 run : |
71- mkdir -p .\bin\installs -f
72- cd .\bin\installs
73- git clone https://github.com/distribution/distribution.git
74- cd distribution
75- go install .\cmd\...
76- cd ..\..\..
78+ echo "${{ github.workspace }}\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
7779 -
7880 name : Test
7981 env :
8082 TMPDIR : ${{ runner.temp }}
81- # SKIP_INTEGRATION_TESTS: 1
8283 run : |
8384 mkdir -p ./bin/testreports
8485 gotestsum \
0 commit comments