Skip to content

Commit 6e838a8

Browse files
authored
Merge pull request #123 from rollandf/workflow
chore: add GH CI workflows
2 parents d2a41bb + 9819d23 commit 6e838a8

File tree

3 files changed

+71
-0
lines changed

3 files changed

+71
-0
lines changed

.github/workflows/checks.yaml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: "Checks"
2+
on: [push, pull_request]
3+
4+
jobs:
5+
lint-code:
6+
name: golangci-lint
7+
runs-on: ubuntu-24.04
8+
permissions:
9+
contents: read
10+
steps:
11+
- name: Set up Go 1.x
12+
uses: actions/setup-go@v5
13+
with:
14+
go-version: '1.24.x'
15+
- name: checkout
16+
uses: actions/checkout@v5
17+
- name: lint
18+
working-directory: ./entrypoint
19+
run: make lint
20+
diff-modules:
21+
name: check go modules
22+
runs-on: ubuntu-24.04
23+
permissions:
24+
contents: read
25+
steps:
26+
- name: Set up Go 1.x
27+
uses: actions/setup-go@v5
28+
with:
29+
go-version: '1.24.x'
30+
- name: checkout
31+
uses: actions/checkout@v5
32+
- name: check go modules
33+
working-directory: ./entrypoint
34+
run: make check-go-modules
35+
unit-tests:
36+
name: Unit-tests
37+
runs-on: ubuntu-24.04
38+
permissions:
39+
contents: read
40+
steps:
41+
- name: Set up Go 1.x
42+
uses: actions/setup-go@v5
43+
with:
44+
go-version: '1.24.x'
45+
- name: checkout
46+
uses: actions/checkout@v5
47+
- name: test
48+
working-directory: ./entrypoint
49+
run: make unit-test
50+
- name: Generate LCOV report
51+
working-directory: ./entrypoint
52+
run: |
53+
go install github.com/jandelgado/gcov2lcov@latest
54+
gcov2lcov -infile=cover.out -outfile=coverage.lcov
55+
- name: Upload coverage to Coveralls
56+
uses: coverallsapp/[email protected]
57+
with:
58+
github-token: ${{ secrets.GITHUB_TOKEN }}
59+
path-to-lcov: entrypoint/coverage.lcov

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0)
2+
[![Coverage Status](https://coveralls.io/repos/github/Mellanox/doca-driver-build/badge.svg)](https://coveralls.io/github/Mellanox/doca-driver-build)
3+
[![Go Report Card](https://goreportcard.com/badge/github.com/Mellanox/doca-driver-build/entrypoint)](https://goreportcard.com/report/github.com/Mellanox/doca-driver-build/entrypoint)
4+
15
# Precompiled Container Build Instructions for NVIDIA NIC Drivers
26

37
This document provides instructions on how to build container with NVIDIA NIC drivers, precompiled for **specific kernel version**.

entrypoint/Makefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,3 +109,11 @@ generate-mocks: mockery ## generate mock objects
109109
.PHONY: build
110110
build: $(BUILDDIR) ## Build manager binary.
111111
$(GO_BUILD_OPTS) go build -ldflags $(GO_LDFLAGS) -gcflags="$(GO_GCFLAGS)" -o $(BUILDDIR)/entrypoint cmd/main.go
112+
113+
.PHONY: check-go-modules
114+
check-go-modules: generate-go-modules
115+
git diff --quiet --exit-code HEAD go.sum ||(echo "go.sum is out of date. Please commit after running 'make generate-go-modules' command"; exit 1;)
116+
117+
.PHONY: generate-go-modules
118+
generate-go-modules:
119+
go mod tidy

0 commit comments

Comments
 (0)