Fix IO performance regression #118
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ci | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- '*' | |
jobs: | |
gofmt: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Go | |
uses: actions/[email protected] | |
with: | |
go-version: ^1.19 | |
id: go | |
# Check the codebase has been formatted by `gofmt`. | |
# We run two `gofmt` commands for different purposes: | |
# 1. `gofmt -d .`: to print diffs in the CI log if any. | |
# 2. `gofmt -l`: to test there is a diff in the codebase. This is because | |
# `gofmt` exits with exit status 0 even if there is a diff. | |
# This is recommended in https://github.com/golang/go/issues/24230) | |
- name: Run gofmt | |
run: | | |
gofmt -d . | |
test -z $(gofmt -l .) | |
linux-tests: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Go | |
uses: actions/[email protected] | |
with: | |
go-version: ^1.19 | |
id: go | |
- name: Install fuse | |
run: sudo apt-get update && sudo apt-get install -y fuse3 libfuse-dev | |
- name: Build | |
run: go build ./... | |
# Disabled running `go test` because running tests hung at random, | |
# preventing us from running the tests in CI reliably. | |
# (cf. https://github.com/jacobsa/fuse/issues/97) | |
macos-build: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Go | |
uses: actions/[email protected] | |
with: | |
go-version: ^1.19 | |
id: go | |
- name: Install macfuse | |
run: HOMEBREW_NO_AUTO_UPDATE=1 brew install macfuse | |
- name: Build | |
run: | | |
go build ./... | |
go build ./samples/mount_hello/... ./samples/mount_roloopbackfs/... ./samples/mount_sample/... | |
# Skip running tests as `go test` hung in macOS. |