Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .buildkite/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import (import ../nix/sources.nix).nixkite
88 changes: 88 additions & 0 deletions .buildkite/pipeline.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
{ cfg, pkgs, ... }:

with cfg.steps.commands;

let
commonAttrs = {
retry.automatic = true;
agents.queue = "project42";
};
in

{
steps.commands = {
compile = commonAttrs // {
label = "compile everything";
command = ''
nix-shell --run '$SBT compile-all'
'';
};

style = commonAttrs // {
dependsOn = [ compile ];
label = "scalastyle";
command = ''
nix-shell --run '$SBT scalastyle test:scalastyle'
'';
};

test-unit = commonAttrs // {
dependsOn = [ compile ];
label = "unit tests";
command = ''
nix-shell --run '$SBT coverage test'
'';
artifactPaths = [
"target/test-reports/**/*"
"target/scala/2.12/scoverage-report/**/*"
"target/scala/2.12/coverage-report/**/*"
];
};

test-evm = commonAttrs // {
dependsOn = [ compile ];
label = "EVM tests";
command = ''
nix-shell --run '$SBT coverage evm:test'
'';
artifactPaths = [
"target/test-reports/**/*"
"target/scala/2.12/scoverage-report/**/*"
"target/scala/2.12/coverage-report/**/*"
];
};

test-integration = commonAttrs // {
dependsOn = [ compile ];
label = "integration tests";
command = ''
nix-shell --run '$SBT coverageOff it:test'
'';
artifactPaths = [ "target/test-reports/**/*" ];
};

test-ets = commonAttrs // {
dependsOn = [ compile ];
label = "ETS";
command = ''
nix-shell --run './test-ets.sh'
'';
};

coverageReport = commonAttrs // {
dependsOn = [ test-unit test-evm ];
label = "coverage report";
command = ''
nix-shell --run '$SBT coverageReport coverageAggregate'
'';
};

additional = commonAttrs // {
dependsOn = [ compile ];
label = "additional compilation & dist";
command = ''
nix-shell --run '$SBT benchmark:compile snappy:compile dist'
'';
};
};
}
8 changes: 8 additions & 0 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
steps:
- label: ":nix::point_right::pipeline:"
command: |
export NIX_PATH="nixpkgs=$(nix eval --raw '(import nix/sources.nix).nixpkgs')"
nix eval --json '(import ./.buildkite { pipeline = ./.buildkite/pipeline.nix; })' \
| buildkite-agent pipeline upload --no-interpolation
agents:
queue: project42
30 changes: 30 additions & 0 deletions .buildkite/shell.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{ pkgs }:

let

# TODO, share this code with mantis build in this project
# sbt-protoc puts the scala plugin in /tmp/protobridge<some-random-number>.
# it is in fact a shell script with a standard `#!/usr/bin/env sh` shebang
# that makes the Nix sandbox ANGRY and breaks all the things in a cryptic,
# hairpull-inducing way. So we gotta sed it out. Not the prettiest thing
# but it works.
protoc-wrapper = pkgs.writeShellScriptBin "protoc" ''
set -e

for f in "$@"; do
echo ''${f##*=}
done | grep protocbridge | xargs sed -i "1s|.*|#!${pkgs.bash}/bin/bash|"

exec ${pkgs.protobuf}/bin/protoc "$@"
'';

in

with pkgs;

mkShell {

buildInputs = [ sbt solc jdk8 protoc-wrapper ];
# SBT = "sbt -v -mem 2048 -J-Xmx4g -Dsbt.ivy.home=/cache/ivy2 -Dsbt.boot.directory=/cache/sbt -Dmaven.repo.local=/cache/maven -Dnix=true";
SBT = "sbt -v -mem 2048 -J-Xmx4g -Dnix=true";
}
28 changes: 0 additions & 28 deletions .circleci/Dockerfile

This file was deleted.

100 changes: 0 additions & 100 deletions .circleci/config.yml

This file was deleted.

12 changes: 12 additions & 0 deletions nix/sources.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,18 @@
"url": "https://github.com/nmattia/niv/archive/f73bf8d584148677b01859677a63191c31911eae.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"nixkite": {
"branch": "master",
"description": "Nixkite is a Buildkite pipeline generation tool using the NixOS module system",
"homepage": null,
"owner": "input-output-hk",
"repo": "nixkite",
"rev": "11c40d1591e294a2da275aaeb9e21a45319a4673",
"sha256": "1cfiqv4n54g9xkm5zvypxfrr8ajpbggvpjn6dp1l9kfc2aknpgiz",
"type": "tarball",
"url": "https://github.com/input-output-hk/nixkite/archive/11c40d1591e294a2da275aaeb9e21a45319a4673.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"nixpkgs": {
"branch": "nixos-20.03",
"description": "Nixpkgs/NixOS branches that track the Nixpkgs/NixOS channels",
Expand Down
2 changes: 1 addition & 1 deletion project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ object Dependencies {
"org.scala-sbt.ipcsocket" % "ipcsocket" % "1.1.0",
"com.google.guava" % "guava" % "29.0-jre",
"org.xerial.snappy" % "snappy-java" % "1.1.7.7",
"org.web3j" % "core" % "5.0.0" % Test
"org.web3j" % "core" % "3.4.0" % Test
)

val prometheus: Seq[ModuleID] = {
Expand Down
Loading