-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add a simple staging test * add buildkite stuff * buildkite setup like in the [example](https://github.com/buildkite/golang-example) * yamllint * add running geth for 1m as a buildkite command * fixups post go mod * workaround a stupid go issue * add 1 hour test * fix bash maths * run the job for 5 hours
- Loading branch information
Showing
3 changed files
with
62 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/bin/bash | ||
|
||
set +u | ||
|
||
echo "--- :golang: Setting up Golang build environment" | ||
|
||
if [[ ! -z "${BUILDKITE_GOLANG_IMPORT_PATH:-}" ]] && [[ "$BUILDKITE_GOLANG_IMPORT_PATH" != "" ]]; then | ||
NEW_GOPATH="$(pwd)/tmp/go" | ||
NEW_BUILD_CHECKOUT_PATH="$NEW_GOPATH/src/$BUILDKITE_GOLANG_IMPORT_PATH" | ||
|
||
# Create the regular GOPATH folders | ||
mkdir -p "$NEW_GOPATH/bin" | ||
mkdir -p "$NEW_GOPATH/src" | ||
|
||
# Create the /src/x.com/project/name path, and create a symlink of the | ||
# current build to that new directory | ||
mkdir -p "$NEW_BUILD_CHECKOUT_PATH" | ||
rm -rf "$NEW_BUILD_CHECKOUT_PATH" | ||
ln -s "$(pwd)" "$NEW_BUILD_CHECKOUT_PATH" | ||
|
||
export GOPATH=$NEW_GOPATH | ||
echo "New \$GOPATH is set to $NEW_GOPATH" | ||
echo "Build will now be at $NEW_BUILD_CHECKOUT_PATH" | ||
|
||
export BUILDKITE_BUILD_CHECKOUT_PATH=$NEW_BUILD_CHECKOUT_PATH | ||
else | ||
echo "No \$BUILDKITE_GOLANG_IMPORT_PATH set, skipping..." | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
steps: | ||
- command: './nightly.sh' | ||
label: 'build & run geth' | ||
env: | ||
BUILDKITE_GOLANG_IMPORT_PATH: "github.com/ledgerwatch/turbo-geth" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/usr/bin/env bash | ||
|
||
# running the job for 5 hours | ||
let SLEEP_TIME=5*60*60 | ||
|
||
# GOFLAGS=-modcacherw is required for our CI | ||
# to be able to remove go modules cache | ||
GOFLAGS=-modcacherw make geth | ||
|
||
echo "running geth..." | ||
./build/bin/geth > tgeth.log 2>&1 & | ||
|
||
GETH_PID=$! | ||
|
||
echo "sleeping for $SLEEP_TIME seconds" | ||
|
||
sleep $SLEEP_TIME | ||
|
||
echo "killing GETH (pid=$GETH_PID)" | ||
kill $GETH_PID | ||
echo "boom" | ||
|
||
wait $GETH_PID | ||
|
||
GETH_STATUS=$? | ||
echo "The exit status of the process was $GETH_STATUS" | ||
|
||
exit $GETH_STATUS |