File tree 3 files changed +38
-33
lines changed
3 files changed +38
-33
lines changed Original file line number Diff line number Diff line change 1
1
name : Continuous Integration
2
- on :
3
- pull_request :
4
- types : [opened, synchronize, reopened]
5
- push :
6
- branches :
7
- - master
2
+ on :
3
+ pull_request :
4
+ types : [opened, synchronize, reopened]
5
+ push :
6
+ branches :
7
+ - master
8
8
9
9
jobs :
10
10
report :
11
11
name : Report
12
12
runs-on : ubuntu-latest
13
13
steps :
14
- - name : ref
15
- run : echo ${{ github.ref }}
16
- - name : event_name
17
- run : echo ${{ github.event_name }}
14
+ - name : ref
15
+ run : echo ${{ github.ref }}
16
+ - name : event_name
17
+ run : echo ${{ github.event_name }}
18
18
build :
19
19
name : Build
20
- runs-on : ubuntu-latest
20
+ strategy :
21
+ matrix :
22
+ os : [macos-latest, windows-latest, ubuntu-latest]
23
+ runs-on : ${{ matrix.os }}
21
24
steps :
22
- - name : checkout
23
- uses : actions/checkout@v2
24
- - uses : actions/setup-go@v2
25
- with :
26
- go-version : ^1.16
27
- - name : vet
28
- run : make vet
29
- - name : lint
30
- run : make lint
31
- - name : image
32
- run : make image
33
- - name : test
34
- run : make test
35
-
25
+ - name : checkout
26
+ uses : actions/checkout@v2
27
+ - uses : actions/setup-go@v2
28
+ with :
29
+ go-version : ^1.16
30
+ - run : go build
31
+ - name : vet
32
+ if : matrix.os != 'windows-latest'
33
+ run : make vet
34
+ - name : lint
35
+ if : matrix.os != 'windows-latest'
36
+ run : make lint
37
+ - name : image
38
+ if : matrix.os == 'ubuntu-latest'
39
+ run : make image
40
+ - name : test
41
+ if : matrix.os == 'ubuntu-latest'
42
+ run : make test
Original file line number Diff line number Diff line change @@ -8,7 +8,6 @@ GOBIN ?= $(shell go env GOPATH)/bin
8
8
LINTER ?= $(GOBIN ) /golangci-lint
9
9
LINTER_VERSION ?= v1.49.0
10
10
11
-
12
11
# BUILDARCH is the host architecture
13
12
# ARCH is the target architecture
14
13
# we need to keep track of them separately
@@ -30,10 +29,10 @@ OS ?= $(BUILDOS)
30
29
31
30
# canonicalized names for target architecture
32
31
ifeq ($(ARCH ) ,aarch64)
33
- override ARCH =arm64
32
+ override ARCH=arm64
34
33
endif
35
34
ifeq ($(ARCH ) ,x86_64)
36
- override ARCH =amd64
35
+ override ARCH=amd64
37
36
endif
38
37
39
38
BUILD_CMD = CGO_ENABLED=0 GOOS=$(OS ) GOARCH=$(ARCH )
@@ -62,12 +61,11 @@ golangci-lint: $(LINTER)
62
61
$(LINTER ) :
63
62
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GOBIN ) $(LINTER_VERSION )
64
63
65
-
66
64
# # Check the file format
67
65
fmt-check :
68
66
@if [ -n " $( shell $( BUILD_CMD) gofmt -l ${GO_FILES} ) " ]; then \
69
- $(BUILD_CMD ) gofmt -s -e -d ${GO_FILES} ; \
70
- exit 1; \
67
+ $(BUILD_CMD ) gofmt -s -e -d ${GO_FILES} ; \
68
+ exit 1; \
71
69
fi
72
70
73
71
# # Lint the files
Original file line number Diff line number Diff line change 1
- //go:build !darwin || linux || solaris || aix || freebsd || illumos || netbsd || openbsd || plan9
2
- // +build !darwin linux solaris aix freebsd illumos netbsd openbsd plan9
1
+ //go:build linux || solaris || aix || freebsd || illumos || netbsd || openbsd || plan9
2
+ // +build linux solaris aix freebsd illumos netbsd openbsd plan9
3
3
4
4
package diskfs
5
5
You can’t perform that action at this time.
0 commit comments