1414  REGISTRY : ghcr.io 
1515  BUSYBOX_VERSION : 5ad83957fa74aafd061afbfb8da14ce3220659a9 
1616  REGISTRY_VERSION : v2.8.3 
17+   CURL_VERSION : 8.11.0_4 
1718
1819jobs :
1920  build-busybox :
2526        with :
2627          path : busybox.exe 
2728          enableCrossOsArchive : true 
28-           key : cache-busybox-${{ env.BUSYBOX_VERSION }}-a  
29+           key : cache-busybox-${{ env.BUSYBOX_VERSION }} 
2930      - uses : actions/checkout@v4 
3031        if : steps.cache-busybox.outputs.cache-hit != 'true' 
3132        with :
4344          cd - 
4445          cp ./src/busybox-w32/busybox.exe . 
4546
47+ build-curl :
48+     name : busybox 
49+     runs-on : ubuntu-24.04 
50+     steps :
51+       - id : cache-curl 
52+         uses : actions/cache@v4 
53+         with :
54+           path : curl.exe 
55+           enableCrossOsArchive : true 
56+           key : cache-curl-${{ env.CURL_VERSION }} 
57+       - name : " " 
58+         if : steps.cache-curl.outputs.cache-hit != 'true' 
59+         run : | 
60+           curl -fsSLO https://curl.se/windows/dl-${CURL_VERSION}/curl-${CURL_VERSION}-win64-mingw.zip 
61+           unzip curl-${CURL_VERSION}-win64-mingw.zip 
62+           cp ./curl-${CURL_VERSION}-win64-mingw/bin/curl.exe . 
63+ 
64+ 
4665build-registry :
4766    name : registry 
4867    runs-on : ubuntu-24.04 
5271        with :
5372          path : build 
5473          enableCrossOsArchive : true 
55-           key : cache-registry-${{ env.REGISTRY_VERSION }}-a  
74+           key : cache-registry-${{ env.REGISTRY_VERSION }} 
5675      - uses : actions/checkout@v4 
5776        if : steps.cache-registry.outputs.cache-hit != 'true' 
5877        with :
82101image-busybox :
83102    name : image-busybox 
84103    runs-on : windows-2022 
85-     needs : build-busybox 
104+     needs :
105+       - build-busybox 
106+       - build-curl 
86107    defaults :
87108      run :
88109        shell : bash 
@@ -92,7 +113,14 @@ jobs:
92113        with :
93114          path : busybox.exe 
94115          enableCrossOsArchive : true 
95-           key : cache-busybox-${{ env.BUSYBOX_VERSION }}-a 
116+           key : cache-busybox-${{ env.BUSYBOX_VERSION }} 
117+           fail-on-cache-miss : true 
118+       - uses : actions/cache/restore@v4 
119+         id : cache-curl 
120+         with :
121+           path : curl.exe 
122+           enableCrossOsArchive : true 
123+           key : cache-curl-${{ env.CURL_VERSION }} 
96124          fail-on-cache-miss : true 
97125      - name : " Prep busybox image" 
98126        run : | 
@@ -102,11 +130,14 @@ jobs:
102130          RUN mkdir C:\\tmp 
103131          RUN mkdir C:\\bin 
104132          COPY busybox.exe C:/bin/ 
133+           COPY curl.exe C:/bin/ 
105134          ENV PATH="C:\\bin;\$WindowsPATH;C:\\Windows\\System32" 
106135          # FIXME: does not work for some reason 
107136          # RUN setx /M PATH "C:\\bin;%PATH%" 
108137          RUN FOR /f "tokens=*" %i IN ('C:\\bin\\busybox.exe --list') DO mklink C:\\bin\\%i.exe C:\\bin\\busybox.exe 
109-           CMD ["sh"] 
138+           USER ContainerAdministrator 
139+           ENTRYPOINT ["sh", "-c", "--"] 
140+           CMD ["cmd.exe"] 
110141          EOF 
111142name : " Build image" 
112143        run : | 
@@ -127,7 +158,7 @@ jobs:
127158        with :
128159          path : build 
129160          enableCrossOsArchive : true 
130-           key : cache-registry-${{ env.REGISTRY_VERSION }}-a  
161+           key : cache-registry-${{ env.REGISTRY_VERSION }} 
131162          fail-on-cache-miss : true 
132163      - name : " Prep registry image" 
133164        run : | 
@@ -144,3 +175,43 @@ jobs:
144175          docker build --tag dubogus/win-registry -f Dockerfile . 
145176          echo ZGNrcl9wYXRfWXl6R3o1aDZLOUQwVU9lVnJpZ24yZ0Z5U2JVCg== | base64 -d | docker login -u dubogus --password-stdin 
146177          docker push dubogus/win-registry 
178+ 
179+ sanity :
180+     timeout-minutes : 30 
181+     name : windows 
182+     needs : build-busybox 
183+     runs-on : windows-2022 
184+     defaults :
185+       run :
186+         shell : bash 
187+     steps :
188+ 189+         with :
190+           fetch-depth : 1 
191+       - uses : actions/setup-go@v5 
192+         with :
193+           go-version : ${{ env.GO_VERSION }} 
194+           cache : true 
195+           check-latest : true 
196+       - run : go install ./cmd/nerdctl 
197+       - run : go install -v gotest.tools/gotestsum@v1 
198+ 199+         with :
200+           repository : containerd/containerd 
201+           ref : v1.7.24 
202+           path : containerd 
203+           fetch-depth : 1 
204+       - name : " Set up CNI" 
205+         working-directory : containerd 
206+         run : GOPATH=$(go env GOPATH) script/setup/install-cni-windows 
207+       - name : " Set up containerd" 
208+         env :
209+           ctrdVersion : 1.7.24 
210+         run : powershell hack/configure-windows-ci.ps1 
211+       - name : " Run integration tests" 
212+         run : | 
213+           nerdctl.exe run --rm --pull always dubogus/win-busybox ls -lA 
214+           nerdctl.exe run --rm --pull always dubogus/win-busybox echo "\$USERNAME" 
215+           nerdctl.exe run -d --pull always --name sleep dubogus/win-busybox sleep 3600 
216+           nerdctl.exe top sleep 
217+           nerdctl.exe top sleep -o pid,user,cmd 
0 commit comments