33 push :
44 branches :
55 - main
6- - master
76 - ' release/**'
87 pull_request :
98 branches :
109 - main
11- - master
1210 - ' release/**'
1311
1412jobs :
2725
2826 steps :
2927 - uses : actions/checkout@v2
30- with :
31- path : src/github.com/containerd/containerd
32-
33- - name : Set env
34- shell : bash
35- run : |
36- echo "GOPATH=${{ github.workspace }}" >> $GITHUB_ENV
37- echo "${{ github.workspace }}/bin" >> $GITHUB_PATH
38-
3928 - uses : golangci/golangci-lint-action@v2
4029 with :
4130 version : v1.36.0
42- working-directory : src/github.com/containerd/containerd
4331 args : --timeout=5m
4432
4533 #
5543 with :
5644 go-version : ' 1.16.6'
5745
58- - shell : bash
59- run : |
60- echo "GOPATH=${{ github.workspace }}" >> $GITHUB_ENV
61- echo "${{ github.workspace }}/bin" >> $GITHUB_PATH
62-
6346 - uses : actions/checkout@v2
6447 with :
6548 path : src/github.com/containerd/containerd
@@ -124,21 +107,9 @@ jobs:
124107 - uses : actions/setup-go@v2
125108 with :
126109 go-version : ' 1.16.6'
127-
128- - name : Set env
129- shell : bash
130- run : |
131- echo "GOPATH=${{ github.workspace }}" >> $GITHUB_ENV
132- echo "${{ github.workspace }}/bin" >> $GITHUB_PATH
133-
134110 - uses : actions/checkout@v2
135- with :
136- path : src/github.com/containerd/containerd
137-
138- - run : GO111MODULE=on go get github.com/cpuguy83/go-md2man/v2@v2.0.1
139-
111+ - run : go get github.com/cpuguy83/go-md2man/v2@v2.0.1
140112 - run : make man
141- working-directory : src/github.com/containerd/containerd
142113
143114 # Make sure binaries compile with other platforms
144115 crossbuild :
@@ -170,14 +141,7 @@ jobs:
170141 - uses : actions/setup-go@v2
171142 with :
172143 go-version : ' 1.16.6'
173- - name : Set env
174- shell : bash
175- run : |
176- echo "GOPATH=${{ github.workspace }}" >> $GITHUB_ENV
177- echo "${{ github.workspace }}/bin" >> $GITHUB_PATH
178144 - uses : actions/checkout@v2
179- with :
180- path : src/github.com/containerd/containerd
181145 - run : |
182146 set -e -x
183147
@@ -211,9 +175,8 @@ jobs:
211175 if [ -n "${packages}" ]; then
212176 sudo apt-get update && sudo apt-get install -y ${packages}
213177 fi
214- name: install deps
178+ name: Install deps
215179 - name : Build
216- working-directory : src/github.com/containerd/containerd
217180 env :
218181 GOOS : ${{matrix.goos}}
219182 GOARCH : ${{matrix.goarch}}
@@ -360,24 +323,17 @@ jobs:
360323 go-version : ' 1.16.6'
361324
362325 - uses : actions/checkout@v2
363- with :
364- path : src/github.com/containerd/containerd
365-
366- - name : Set env
367- run : |
368- echo "GOPATH=${{ github.workspace }}" >> $GITHUB_ENV
369- echo "${{ github.workspace }}/bin" >> $GITHUB_PATH
370326
371327 - name : Install containerd dependencies
372328 env :
373329 RUNC_FLAVOR : ${{ matrix.runc }}
330+ GOFLAGS : -modcacherw
374331 run : |
375332 sudo apt-get install -y gperf
376333 sudo -E PATH=$PATH script/setup/install-seccomp
377334 sudo -E PATH=$PATH script/setup/install-runc
378- sudo -E PATH=$PATH script/setup/install-cni
335+ sudo -E PATH=$PATH script/setup/install-cni $(grep containernetworking/plugins go.mod | awk '{print $2}')
379336 sudo -E PATH=$PATH script/setup/install-critools
380- working-directory : src/github.com/containerd/containerd
381337
382338 - name : Install criu
383339 run : |
@@ -389,20 +345,17 @@ jobs:
389345 env :
390346 CGO_ENABLED : 1
391347 run : |
392- make binaries
348+ make binaries GO_BUILD_FLAGS="-mod=vendor"
393349 sudo -E PATH=$PATH make install
394- working-directory : src/github.com/containerd/containerd
395350
396351 - run : sudo -E PATH=$PATH script/setup/install-gotestsum
397- working-directory : src/github.com/containerd/containerd
398352 - name : Tests
399353 env :
400354 GOPROXY : direct
401355 GOTESTSUM_JUNITFILE : ${{github.workspace}}/test-unit-root-junit.xml
402356 run : |
403357 make test
404358 sudo -E PATH=$PATH make root-test
405- working-directory : src/github.com/containerd/containerd
406359
407360 - name : Integration 1
408361 env :
@@ -416,7 +369,6 @@ jobs:
416369 extraflags="EXTRA_TESTFLAGS=-no-criu";
417370 }
418371 sudo -E PATH=$PATH make integration ${extraflags} TESTFLAGS_RACE=-race
419- working-directory : src/github.com/containerd/containerd
420372
421373 # Run the integration suite a second time. See discussion in github.com/containerd/containerd/pull/1759
422374 - name : Integration 2
@@ -431,14 +383,12 @@ jobs:
431383 extraflags="EXTRA_TESTFLAGS=-no-criu";
432384 }
433385 sudo -E PATH=$PATH TESTFLAGS_PARALLEL=1 make integration ${extraflags}
434- working-directory : src/github.com/containerd/containerd
435386
436387 - name : CRI Integration Test
437388 env :
438389 TEST_RUNTIME : ${{ matrix.runtime }}
439390 run : |
440391 CONTAINERD_RUNTIME=$TEST_RUNTIME make cri-integration
441- working-directory : src/github.com/containerd/containerd
442392
443393 - name : cri-tools critest
444394 env :
@@ -490,25 +440,13 @@ jobs:
490440 - uses : actions/setup-go@v2
491441 with :
492442 go-version : ' 1.16.6'
493-
494443 - uses : actions/checkout@v2
495- with :
496- path : src/github.com/containerd/containerd
497-
498- - name : Set env
499- run : |
500- echo "GOPATH=${{ github.workspace }}" >> $GITHUB_ENV
501- echo "${{ github.workspace }}/bin" >> $GITHUB_PATH
502-
503444 - run : sudo -E PATH=$PATH script/setup/install-gotestsum
504- working-directory : src/github.com/containerd/containerd
505445 - name : Tests
506446 env :
507447 GOPROXY : direct
508448 GOTESTSUM_JUNITFILE : " ${{ github.workspace }}/macos-test-junit.xml"
509- run : |
510- make test
511- working-directory : src/github.com/containerd/containerd
449+ run : make test
512450 - uses : actions/upload-artifact@v2
513451 if : always()
514452 with :
0 commit comments