Skip to content

Commit a773c8a

Browse files
authored
Merge pull request #21 from kushthedude/build
feat: build nighthawk in ci, add nighthawk assets
2 parents ef86ae9 + 6aaea1b commit a773c8a

File tree

7 files changed

+65
-13
lines changed

7 files changed

+65
-13
lines changed

.github/workflows/ci.yml

Lines changed: 42 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -29,23 +29,52 @@ jobs:
2929

3030
# Optional: show only new issues if it's a pull request. The default value is `false`.
3131
only-new-issues: true
32-
tests:
33-
name: Tests
34-
runs-on: ubuntu-latest
32+
build:
33+
strategy:
34+
matrix:
35+
go-version: [1.14.x]
36+
platform: [ubuntu-latest]
37+
runs-on: ${{ matrix.platform }}
3538
steps:
3639
- name: Check out code
37-
uses: actions/checkout@master
40+
uses: actions/checkout@v2
3841
with:
3942
fetch-depth: 1
4043
- name: Setup Go
41-
uses: actions/setup-go@v1
44+
uses: actions/setup-go@v2
45+
with:
46+
go-version: ${{ matrix.go-version }}
47+
- name: start build
48+
run: |
49+
chmod +x ./ci/build.sh
50+
./ci/build.sh
51+
/usr/local/bin/bazel version
52+
bazel version
53+
go get -u github.com/bazelbuild/buildtools/buildifier
54+
export BUILDIFIER_BIN=$GOPATH/bin/buildifier
55+
go get -u github.com/bazelbuild/buildtools/buildozer
56+
export BUILDOZER_BIN=$GOPATH/bin/buildozer
57+
git clone https://github.com/envoyproxy/envoy
58+
cd envoy
59+
bazel build //source/exe:envoy-static -c opt
60+
test-assets:
61+
strategy:
62+
matrix:
63+
go-version: [1.14.x]
64+
platform: [ubuntu-latest]
65+
runs-on: ${{ matrix.platform }}
66+
steps:
67+
- name: Check out code
68+
uses: actions/checkout@v2
4269
with:
43-
go-version: ${{ secrets.GO_VERSION }}
44-
- name: Setup Cache
45-
uses: actions/cache@v1
70+
fetch-depth: 1
71+
- name: Setup Go
72+
uses: actions/setup-go@v2
4673
with:
47-
path: ~/go/pkg/mod
48-
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
49-
restore-keys: |
50-
${{ runner.os }}-go-
51-
- run: GOPROXY=direct GOSUMDB=off GO111MODULE=on go test -tags draft ./...
74+
go-version: ${{ matrix.go-version }}
75+
- name: start build
76+
run: |
77+
chmod +x ./apinighthawk/bin/nighthawk_client
78+
cd apinighthawk/bin
79+
chmod +x nighthawk_client
80+
./nighthawk_client --rps 3 --concurrency 5 --duration 30 https://github.com

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,5 @@
1616

1717
# Ignore OS-X Trash
1818
*.DS_Store
19+
20+
.idea/

apinighthawk/bin/nighthawk_client

30.7 MB
Binary file not shown.
27.6 MB
Binary file not shown.

apinighthawk/bin/nighthawk_service

30.9 MB
Binary file not shown.
31.4 MB
Binary file not shown.

ci/build.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/bin/bash -ex
2+
3+
#####################################
4+
#
5+
# Build nighthawk binary
6+
#
7+
#####################################
8+
9+
sudo wget -O /usr/local/bin/bazel https://github.com/bazelbuild/bazelisk/releases/latest/download/bazelisk-linux-amd64
10+
sudo chmod +x /usr/local/bin/bazel
11+
12+
sudo apt-get install \
13+
libtool \
14+
cmake \
15+
automake \
16+
autoconf \
17+
make \
18+
ninja-build \
19+
curl \
20+
unzip \
21+
virtualenv

0 commit comments

Comments
 (0)