19
19
timeout-minutes : 5
20
20
21
21
steps :
22
- #
23
- # Install Go
24
- #
25
- - name : Install Go
26
- uses : actions/setup-go@v3
27
- with :
28
- go-version : ' 1.20.x'
29
-
30
- - name : Set env
31
- shell : bash
32
- run : |
33
- echo "GOPATH=${{ github.workspace }}" >> $GITHUB_ENV
34
- echo "${{ github.workspace }}/bin" >> $GITHUB_PATH
35
-
36
22
#
37
23
# Checkout repos
38
24
#
42
28
path : src/github.com/containerd/cgroups
43
29
fetch-depth : 25
44
30
31
+ #
32
+ # Install Go
33
+ #
34
+ - name : Install Go
35
+ uses : actions/setup-go@v4
36
+ with :
37
+ go-version : ' 1.20.x'
38
+ cache-dependency-path : src/github.com/containerd/cgroups
39
+
45
40
- name : Project checks
46
41
uses : containerd/project-checks@v1.1.0
47
42
with :
@@ -58,16 +53,17 @@ jobs:
58
53
go-version : [1.19.x, 1.20.x]
59
54
60
55
steps :
61
- - name : Install Go
62
- uses : actions/setup-go@v3
63
- with :
64
- go-version : ${{ matrix.go }}
65
-
66
56
- name : Checkout cgroups
67
57
uses : actions/checkout@v3
68
58
with :
69
59
path : src/github.com/containerd/cgroups
70
60
61
+ - name : Install Go
62
+ uses : actions/setup-go@v4
63
+ with :
64
+ go-version : ${{ matrix.go }}
65
+ cache-dependency-path : src/github.com/containerd/cgroups
66
+
71
67
- name : golangci-lint
72
68
uses : golangci/golangci-lint-action@v3
73
69
with :
@@ -88,22 +84,18 @@ jobs:
88
84
89
85
runs-on : ${{ matrix.os }}
90
86
steps :
91
- - name : Install Go
92
- uses : actions/setup-go@v3
93
- with :
94
- go-version : ${{ matrix.go }}
95
-
96
- - name : Set env
97
- shell : bash
98
- run : |
99
- echo "GOPATH=${{ github.workspace }}" >> $GITHUB_ENV
100
- echo "${{ github.workspace }}/bin" >> $GITHUB_PATH
101
-
102
87
- name : Checkout cgroups
103
88
uses : actions/checkout@v3
104
89
with :
105
90
path : src/github.com/containerd/cgroups
106
91
92
+ - name : Install Go
93
+ uses : actions/setup-go@v4
94
+ with :
95
+ go-version : ${{ matrix.go }}
96
+ # Disable Go caching feature when compiling across Linux distributions due to collisions until https://github.com/actions/setup-go/issues/368 is resolved.
97
+ cache : false
98
+
107
99
- name : Run cgroup tests
108
100
run : |
109
101
$(command -v go) test -exec sudo -v -race -coverprofile=coverage.txt -covermode=atomic ./...
@@ -118,22 +110,23 @@ jobs:
118
110
runs-on : ubuntu-22.04
119
111
120
112
steps :
113
+ - name : Checkout cgroups
114
+ uses : actions/checkout@v3
115
+ with :
116
+ path : src/github.com/containerd/cgroups
117
+
121
118
- name : Install Go
122
- uses : actions/setup-go@v3
119
+ uses : actions/setup-go@v4
123
120
with :
124
121
go-version : ' 1.19.x'
122
+ cache-dependency-path : src/github.com/containerd/cgroups
125
123
126
124
- name : Set env
127
125
shell : bash
128
126
run : |
129
127
echo "GOPATH=${{ github.workspace }}" >> $GITHUB_ENV
130
128
echo "${{ github.workspace }}/bin" >> $GITHUB_PATH
131
129
132
- - name : Checkout cgroups
133
- uses : actions/checkout@v3
134
- with :
135
- path : src/github.com/containerd/cgroups
136
-
137
130
- name : Install protoc
138
131
run : |
139
132
curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v21.5/protoc-21.5-linux-x86_64.zip
0 commit comments