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
28 changes: 28 additions & 0 deletions .github/workflows/codegen.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Codegen

on:
pull_request:
push:
branches: ["main"]
workflow_dispatch:

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event_name == 'push' && github.sha || github.ref }}
cancel-in-progress: true

jobs:
codegen:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
# Run `go generate` and fail if the committed generated files (e.g.
# bucket/cbor_gen.go) are stale. Unlike libforge, ingot's generator is a
# plain package built by the standard go-check/go-test workflows, so no
# separate generator-compile step is needed here.
- run: make gen-check
16 changes: 16 additions & 0 deletions .github/workflows/workspace-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Workspace Test

on:
pull_request:
workflow_dispatch:

permissions:
contents: read

concurrency:
group: workspace-test-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
workspace-test:
uses: fil-forge/libforge/.github/workflows/go-workspace-test.yml@v1
9 changes: 8 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ GO ?= go

.DEFAULT_GOAL := build

.PHONY: build test itest gen clean help
.PHONY: build test itest gen gen-check clean help

## build: compile the daemon binary (-> ./ingot)
build:
Expand All @@ -29,6 +29,13 @@ itest:
gen:
$(GO) generate ./...

## gen-check: regenerate, then fail if the committed generated files are stale
gen-check: gen
@git diff --exit-code -- bucket/cbor_gen.go || { \
echo "bucket/cbor_gen.go is stale; run 'make gen' and commit the result"; \
exit 1; \
}

## clean: remove the go build/test cache
clean:
$(GO) clean -cache -testcache
Expand Down
Loading