Skip to content

Commit 4468207

Browse files
author
Vladimir Smirnov
authored
Merge pull request #97 from lomik/build
Tiny build improvements
2 parents c4431ef + babf6b4 commit 4468207

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

.github/workflows/release.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
env:
1313
BINARY: ${{ github.event.repository.name }}
14+
CGO_ENABLED: 0
1415

1516
outputs:
1617
matrix: ${{ steps.build.outputs.matrix }}
@@ -23,6 +24,11 @@ jobs:
2324
- uses: actions/checkout@v2
2425
name: Checkout
2526

27+
- name: Test
28+
run: make test
29+
env:
30+
CGO_ENABLED: 1
31+
2632
- name: Set up Ruby
2733
uses: ruby/setup-ruby@v1
2834
with:

.github/workflows/tests.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,16 @@ on:
99
jobs:
1010

1111
tests:
12+
env:
13+
CGO_ENABLED: 0
1214
name: Test code
1315
runs-on: ubuntu-latest
1416
strategy:
1517
matrix:
1618
go:
17-
- ^1.14
1819
- ^1.15
1920
- ^1.16
21+
- ^1.17
2022
- ^1
2123
steps:
2224

@@ -43,6 +45,8 @@ jobs:
4345

4446
- name: Test
4547
run: make test
48+
env:
49+
CGO_ENABLED: 1
4650

4751
- name: Set up Ruby
4852
uses: ruby/setup-ruby@v1

Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ else
1515
VERSION:=$(shell sh -c 'git describe --always --tags | sed -e "s/^v//i"')
1616
endif
1717

18+
SRCS:=$(shell find . -name '*.go')
19+
1820
all: $(NAME)
1921

2022
.PHONY: clean
@@ -24,7 +26,7 @@ clean:
2426
rm -f *deb *rpm
2527
rm -f sha256sum md5sum
2628

27-
$(NAME): $(shell find . -name '*.go')
29+
$(NAME): $(SRCS)
2830
$(GO) build $(MODULE)
2931

3032
e2e-test: $(NAME)

0 commit comments

Comments
 (0)