17
17
- name : Install Compilers
18
18
run : |
19
19
sudo apt-get update
20
- sudo apt-get install --yes build-essential pkgconf libelf-dev llvm-9 clang-9 linux-tools-common linux-tools-generic
20
+ sudo apt-get install --yes build-essential pkgconf libelf-dev llvm-9 clang-9 linux-tools-common linux-tools-generic gcc
21
21
for tool in "clang" "llc" "llvm-strip"
22
22
do
23
23
sudo rm -f /usr/bin/$tool
@@ -28,35 +28,18 @@ jobs:
28
28
with :
29
29
submodules : ' recursive'
30
30
fetch-depth : 0
31
- - name : Build
31
+ - name : Build && golangci-lint
32
32
run : |
33
33
make clean
34
34
make env
35
35
make nocore -j4
36
- - name : golangci-lint
37
- uses : golangci/golangci-lint-action@v4
38
- with :
39
- # Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
40
- # version: v3.2.0
41
-
42
- # Optional: working directory, useful for monorepos
43
- # working-directory: somedir
44
-
45
- # Optional: golangci-lint command line arguments.
46
- args : --disable-all -E errcheck
47
-
48
- # Optional: show only new issues if it's a pull request. The default value is `false`.
49
- # only-new-issues: true
50
-
51
- # Optional: if set to true then the all caching functionality will be complete disabled,
52
- # takes precedence over all other caching options.
53
- skip-cache : true
54
-
55
- # Optional: if set to true then the action don't cache or restore ~/go/pkg.
56
- skip-pkg-cache : true
57
-
58
- # Optional: if set to true then the action don't cache or restore ~/.cache/go-build.
59
- skip-build-cache : true
36
+ CGO_CFLAGS="-O2 -g -gdwarf-4 -I$GITHUB_WORKSPACE/lib/libpcap/"
37
+ CGO_LDFLAGS="-O2 -g -L$GITHUB_WORKSPACE/lib/libpcap -lpcap -static"
38
+ echo $CGO_CFLAGS
39
+ echo $CGO_LDFLAGS
40
+ echo $CC
41
+ curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.56.2
42
+ $(go env GOPATH)/bin/golangci-lint run --disable-all -E errcheck
60
43
- name : Build NOCORE
61
44
run : |
62
45
make clean
75
58
- name : Install Compilers
76
59
run : |
77
60
sudo apt-get update
78
- sudo apt-get install --yes build-essential pkgconf libelf-dev llvm-14 clang-14 linux-tools-common linux-tools-generic
61
+ sudo apt-get install --yes build-essential pkgconf libelf-dev llvm-14 clang-14 linux-tools-common linux-tools-generic gcc
79
62
for tool in "clang" "llc" "llvm-strip"
80
63
do
81
64
sudo rm -f /usr/bin/$tool
93
76
make -j8
94
77
- name : golangci-lint
95
78
uses : golangci/golangci-lint-action@v4
79
+ env :
80
+ CGO_CFLAGS : -O2 -g -gdwarf-4 -I$GITHUB_WORKSPACE/lib/libpcap/
81
+ CGO_LDFLAGS : -O2 -g -L$GITHUB_WORKSPACE/lib/libpcap/ -lpcap -static
82
+ CC : /usr/bin/clang
96
83
with :
97
84
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
98
85
# version: v3.2.0
0 commit comments