Skip to content

Update GHA for matrix build #151

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 32 additions & 25 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 0 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 \
Expand Down
4 changes: 2 additions & 2 deletions diskfs_unix.go
Original file line number Diff line number Diff line change
@@ -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

Expand Down