switched to Makefile-based jobs

This commit is contained in:
Christian Mouchet
2022-05-17 13:31:06 +02:00
committed by Jean-Philippe Bossuat
parent 495cb4b1d5
commit 26a747a39d
2 changed files with 19 additions and 7 deletions

View File

@@ -9,9 +9,14 @@ jobs:
- uses: actions/checkout@v1
with:
fetch-depth: 1
- uses: dominikh/staticcheck-action@v1.2.0
with:
version: "2022.1"
- name: Setup Go
uses: actions/setup-go@v1
with:
go-version: 1.17
- name: Setup tools
run: make get_tools
- name: Run Makefile checks
run: make static_checks
tests:
name: Run Go ${{ matrix.go }} tests
@@ -22,6 +27,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Setup Go
uses: actions/setup-go@v1
with:
@@ -38,4 +44,4 @@ jobs:
run: go build ./...
- name: Run Makefile checks
run: make ci_test
run: make test

View File

@@ -22,12 +22,13 @@ test_examples:
go build -o /dev/null ./examples/ckks/advanced/rlwe_lwe_bridge_LHHMQ20
@echo ok
.PHONY: test_static_checks
test_static_checks:
.PHONY: static_checks
static_checks:
@echo Checking correct formatting of files
out=`go fmt ./...`; echo "$$out"; [ -z "$$out" ]
go vet ./...
out=`golint ./...`; echo "$$out"; [ -z "$$out" ]
staticcheck -go 1.17 ./...
go mod tidy
out=`git status --porcelain`; echo "$$out"; [ -z "$$out" ]
@@ -35,4 +36,9 @@ test_static_checks:
test: test_gotest test_examples
.PHONY: ci_test
ci_test: test_static_checks test_gotest test_examples
ci_test: static_checks test_gotest test_examples
.PHONY: get_tools
get_tools:
go install golang.org/x/lint/golint@latest
go install honnef.co/go/tools/cmd/staticcheck@2022.1.1