Skip to content

build: add Makefile #525

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
Mar 14, 2025
Merged
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
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@ jobs:
- uses: actions/setup-go@v5
with:
go-version-file: ./go.mod
- run: ./ci/fmt.sh
- run: make fmt

lint:
runs-on: ubuntu-latest
@@ -28,7 +28,7 @@ jobs:
- uses: actions/setup-go@v5
with:
go-version-file: ./go.mod
- run: ./ci/lint.sh
- run: make lint

test:
runs-on: ubuntu-latest
@@ -43,7 +43,7 @@ jobs:
- uses: actions/setup-go@v5
with:
go-version-file: ./go.mod
- run: ./ci/test.sh
- run: make test
- uses: actions/upload-artifact@v4
with:
name: coverage.html
@@ -56,4 +56,4 @@ jobs:
- uses: actions/setup-go@v5
with:
go-version-file: ./go.mod
- run: ./ci/bench.sh
- run: make bench
8 changes: 4 additions & 4 deletions .github/workflows/daily.yml
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@ jobs:
- uses: actions/setup-go@v5
with:
go-version-file: ./go.mod
- run: AUTOBAHN=1 ./ci/bench.sh
- run: AUTOBAHN=1 make bench
test:
runs-on: ubuntu-latest
steps:
@@ -29,7 +29,7 @@ jobs:
- uses: actions/setup-go@v5
with:
go-version-file: ./go.mod
- run: AUTOBAHN=1 ./ci/test.sh
- run: AUTOBAHN=1 make test
- uses: actions/upload-artifact@v4
with:
name: coverage.html
@@ -43,7 +43,7 @@ jobs:
- uses: actions/setup-go@v5
with:
go-version-file: ./go.mod
- run: AUTOBAHN=1 ./ci/bench.sh
- run: AUTOBAHN=1 make bench
test-dev:
runs-on: ubuntu-latest
steps:
@@ -59,7 +59,7 @@ jobs:
- uses: actions/setup-go@v5
with:
go-version-file: ./go.mod
- run: AUTOBAHN=1 ./ci/test.sh
- run: AUTOBAHN=1 make test
- uses: actions/upload-artifact@v4
with:
name: coverage-dev.html
2 changes: 1 addition & 1 deletion .github/workflows/static.yml
Original file line number Diff line number Diff line change
@@ -38,7 +38,7 @@ jobs:
go-version-file: ./go.mod
- name: Generate coverage and badge
run: |
./ci/test.sh
make test
mkdir -p ./ci/out/static
cp ./ci/out/coverage.html ./ci/out/static/coverage.html
percent=$(go tool cover -func ./ci/out/coverage.prof | tail -n1 | awk '{print $3}' | tr -d '%')
18 changes: 18 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
.PHONY: all
all: fmt lint test

.PHONY: fmt
fmt:
./ci/fmt.sh

.PHONY: lint
lint:
./ci/lint.sh

.PHONY: test
test:
./ci/test.sh

.PHONY: bench
bench:
./ci/bench.sh
1 change: 0 additions & 1 deletion ci/lint.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/bin/sh
set -x
set -eu
cd -- "$(dirname "$0")/.."

12 changes: 0 additions & 12 deletions make.sh

This file was deleted.