diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index a7873ade..60fcd9e2 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,35 +1,42 @@ name: Continuous Integration -on: - pull_request: - types: [opened, synchronize, reopened] - push: - branches: - - master +on: + pull_request: + types: [opened, synchronize, reopened] + push: + branches: + - master jobs: report: name: Report runs-on: ubuntu-latest steps: - - name: ref - run: echo ${{ github.ref }} - - name: event_name - run: echo ${{ github.event_name }} + - name: ref + run: echo ${{ github.ref }} + - name: event_name + run: echo ${{ github.event_name }} build: name: Build - runs-on: ubuntu-latest + strategy: + matrix: + os: [macos-latest, windows-latest, ubuntu-latest] + runs-on: ${{ matrix.os }} steps: - - name: checkout - uses: actions/checkout@v2 - - uses: actions/setup-go@v2 - with: - go-version: ^1.16 - - name: vet - run: make vet - - name: lint - run: make lint - - name: image - run: make image - - name: test - run: make test - + - name: checkout + uses: actions/checkout@v2 + - uses: actions/setup-go@v2 + with: + go-version: ^1.16 + - run: go build + - name: vet + if: matrix.os != 'windows-latest' + run: make vet + - name: lint + if: matrix.os != 'windows-latest' + run: make lint + - name: image + if: matrix.os == 'ubuntu-latest' + run: make image + - name: test + if: matrix.os == 'ubuntu-latest' + run: make test diff --git a/Makefile b/Makefile index f7c608a8..78225dad 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,6 @@ GOBIN ?= $(shell go env GOPATH)/bin LINTER ?= $(GOBIN)/golangci-lint LINTER_VERSION ?= v1.49.0 - # BUILDARCH is the host architecture # ARCH is the target architecture # we need to keep track of them separately @@ -62,7 +61,6 @@ golangci-lint: $(LINTER) $(LINTER): curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GOBIN) $(LINTER_VERSION) - ## Check the file format fmt-check: @if [ -n "$(shell $(BUILD_CMD) gofmt -l ${GO_FILES})" ]; then \ diff --git a/diskfs_unix.go b/diskfs_unix.go index 31a94a40..3f364e1c 100644 --- a/diskfs_unix.go +++ b/diskfs_unix.go @@ -1,5 +1,5 @@ -//go:build !darwin || linux || solaris || aix || freebsd || illumos || netbsd || openbsd || plan9 -// +build !darwin linux solaris aix freebsd illumos netbsd openbsd plan9 +//go:build linux || solaris || aix || freebsd || illumos || netbsd || openbsd || plan9 +// +build linux solaris aix freebsd illumos netbsd openbsd plan9 package diskfs