Skip to content

Commit

Permalink
Merge pull request #21 from kushthedude/build
Browse files Browse the repository at this point in the history
 feat: build nighthawk in ci, add nighthawk assets
  • Loading branch information
kushthedude authored Dec 15, 2020
2 parents ef86ae9 + 6aaea1b commit a773c8a
Show file tree
Hide file tree
Showing 7 changed files with 65 additions and 13 deletions.
55 changes: 42 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,23 +29,52 @@ jobs:

# Optional: show only new issues if it's a pull request. The default value is `false`.
only-new-issues: true
tests:
name: Tests
runs-on: ubuntu-latest
build:
strategy:
matrix:
go-version: [1.14.x]
platform: [ubuntu-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Check out code
uses: actions/checkout@master
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Setup Go
uses: actions/setup-go@v1
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: start build
run: |
chmod +x ./ci/build.sh
./ci/build.sh
/usr/local/bin/bazel version
bazel version
go get -u github.com/bazelbuild/buildtools/buildifier
export BUILDIFIER_BIN=$GOPATH/bin/buildifier
go get -u github.com/bazelbuild/buildtools/buildozer
export BUILDOZER_BIN=$GOPATH/bin/buildozer
git clone https://github.com/envoyproxy/envoy
cd envoy
bazel build //source/exe:envoy-static -c opt
test-assets:
strategy:
matrix:
go-version: [1.14.x]
platform: [ubuntu-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Check out code
uses: actions/checkout@v2
with:
go-version: ${{ secrets.GO_VERSION }}
- name: Setup Cache
uses: actions/cache@v1
fetch-depth: 1
- name: Setup Go
uses: actions/setup-go@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- run: GOPROXY=direct GOSUMDB=off GO111MODULE=on go test -tags draft ./...
go-version: ${{ matrix.go-version }}
- name: start build
run: |
chmod +x ./apinighthawk/bin/nighthawk_client
cd apinighthawk/bin
chmod +x nighthawk_client
./nighthawk_client --rps 3 --concurrency 5 --duration 30 https://github.com
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@

# Ignore OS-X Trash
*.DS_Store

.idea/
Binary file added apinighthawk/bin/nighthawk_client
Binary file not shown.
Binary file added apinighthawk/bin/nighthawk_output_transform
Binary file not shown.
Binary file added apinighthawk/bin/nighthawk_service
Binary file not shown.
Binary file added apinighthawk/bin/nighthawk_test_server
Binary file not shown.
21 changes: 21 additions & 0 deletions ci/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash -ex

#####################################
#
# Build nighthawk binary
#
#####################################

sudo wget -O /usr/local/bin/bazel https://github.com/bazelbuild/bazelisk/releases/latest/download/bazelisk-linux-amd64
sudo chmod +x /usr/local/bin/bazel

sudo apt-get install \
libtool \
cmake \
automake \
autoconf \
make \
ninja-build \
curl \
unzip \
virtualenv

0 comments on commit a773c8a

Please sign in to comment.