Fix Go compilation issues #417
Workflow file for this run
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: | |
- main | |
- "**" | |
pull_request: | |
workflow_dispatch: | |
# settings shared across all jobs | |
env: | |
dafny: "3.11.0" | |
go: "^1.20.0" | |
jobs: | |
verify: | |
name: Verify | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install Dafny | |
uses: dafny-lang/setup-dafny-action@v1 | |
with: | |
dafny-version: ${{ env.dafny }} | |
- uses: actions/checkout@v3 | |
- name: Verify | |
run: make -j2 verify | |
test-support: | |
name: Test dafny_go | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/setup-go@v3 | |
with: | |
go-version: ${{ env.go }} | |
- uses: actions/checkout@v3 | |
- name: Test support library | |
run: | | |
go test -v -timeout=1m ./dafny_go/... ./eval | |
test-compiled: | |
name: Test NFS server | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- name: Install Dafny | |
uses: dafny-lang/setup-dafny-action@v1 | |
with: | |
dafny-version: ${{ env.dafny }} | |
- uses: actions/setup-go@v3 | |
with: | |
go-version: ${{ env.go }} | |
- uses: actions/checkout@v3 | |
- name: Install goimports | |
run: | | |
go install golang.org/x/tools/cmd/goimports@latest | |
- name: Compile and test | |
run: | | |
echo "::group::Compile" | |
make compile | |
echo "::endgroup::" | |
echo "::group::Test compiled code" | |
go test -bench=. -timeout=1m -v ./tests | |
go build ./cmd/daisy-nfsd | |
echo "::endgroup::" | |
- name: Setup | |
run: | | |
echo "::group::Install NFS" | |
./etc/ci-install-nfs.sh | |
echo "::endgroup::" | |
- name: Run syscall tests | |
run: | | |
./bench/run-daisy-nfsd.sh go run ./cmd/fs-test /mnt/nfs | |
test-macos: | |
name: Test NFS server (macOS) | |
runs-on: macos-12 | |
timeout-minutes: 10 | |
steps: | |
- name: Install Dafny | |
uses: dafny-lang/setup-dafny-action@v1 | |
with: | |
dafny-version: ${{ env.dafny }} | |
- uses: actions/setup-go@v3 | |
with: | |
go-version: ${{ env.go }} | |
- uses: actions/checkout@v3 | |
- name: Install goimports | |
run: | | |
go install golang.org/x/tools/cmd/goimports@latest | |
- name: Compile | |
run: | | |
make compile | |
go build ./cmd/daisy-nfsd | |
- name: Setup | |
run: | | |
echo "::group::Start NFS services" | |
./etc/ci-macos-setup-nfs.sh | |
echo "::endgroup::" | |
- name: Run syscall tests | |
run: | | |
rpcinfo -p | |
./bench/run-daisy-nfsd.sh \ | |
-disk "/tmp/disk.img" \ | |
-nfs-mount-opts "nordirplus,locallocks,retrycnt=10" \ | |
-mount-path /tmp/nfs \ | |
go run ./cmd/fs-test /tmp/nfs |