Skip to content
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
20 changes: 7 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,8 @@ jobs:
- name: Checkout
uses: actions/checkout@v7

- name: Set up Go
uses: actions/setup-go@v7
with:
go-version: "1.26.2"
- name: Set up mise
uses: jdx/mise-action@v4

- name: Build
run: make build
Expand All @@ -27,15 +25,13 @@ jobs:
- name: Checkout
uses: actions/checkout@v7

- name: Set up Go
uses: actions/setup-go@v7
with:
go-version: "1.26.2"
- name: Set up mise
uses: jdx/mise-action@v4

- name: golangci-lint
uses: golangci/golangci-lint-action@v9
with:
version: latest
version: v2.13.2

test:
runs-on: ubuntu-latest
Expand All @@ -44,10 +40,8 @@ jobs:
- name: Checkout
uses: actions/checkout@v7

- name: Set up Go
uses: actions/setup-go@v7
with:
go-version: "1.26.2"
- name: Set up mise
uses: jdx/mise-action@v4

- name: Unit tests
run: go test -race -coverprofile=coverage.out ./...
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,8 @@ jobs:
fi
ls -l /dev/kvm

- name: Set up Go
uses: actions/setup-go@v7
with:
go-version: "1.26.2"
- name: Set up mise
uses: jdx/mise-action@v4

- name: Install host dependencies
run: |
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,13 @@ jobs:
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v7
with:
go-version: "1.26.2"
- name: Set up mise
uses: jdx/mise-action@v4

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v7
with:
version: latest
version: v2.18.0
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ GOFLAGS := CGO_ENABLED=0
BINDIR := bin
PLATFORMS := linux/amd64 linux/arm64

.PHONY: all build host test e2e vet fmt lint clean release
.PHONY: all build host test e2e vet fmt lint tools clean release

all: build

Expand Down Expand Up @@ -36,6 +36,12 @@ lint: vet
printf '%s\n' "$$files"; \
exit 1; \
fi
golangci-lint run

# Run once (or after mise.toml changes) to install pinned Go/golangci-lint/goreleaser via mise.
tools:
@command -v mise >/dev/null 2>&1 || { echo "mise not found: https://mise.jdx.dev/getting-started.html"; exit 1; }
mise install

# Static multi-arch release builds.
release:
Expand Down
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,24 @@ make release # linux/amd64 + linux/arm64 static binaries
make test
```

## Development

This repo pins its Go toolchain and build tooling (Go, golangci-lint,
goreleaser) via [mise](https://mise.jdx.dev). Install mise, then run:

```sh
mise install # or: make tools
```

to put the correct `go`, `golangci-lint`, and `goreleaser` versions on your
`PATH` for this repo. Then use the existing Makefile targets as usual:

```sh
make build # build guest-agent + vsock-connect
make test # unit tests
make lint # vet + gofmt check + golangci-lint
```

## Releases

Tagged releases (`vX.Y.Z`) publish to
Expand Down
4 changes: 4 additions & 0 deletions mise.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[tools]
go = "1.26.2"
golangci-lint = "2.13.2"
goreleaser = "2.18.0"
Loading