|
| 1 | +ci: { |
| 2 | + version: 1 |
| 3 | + steps: { |
| 4 | + nixexpr: { |
| 5 | + label: "ensure Nix expressions are up-to-date" |
| 6 | + command: [ "./update-nix.sh", "--check" ] |
| 7 | + outputs: [ |
| 8 | + "/local/repo/nix-expr.patch", |
| 9 | + ] |
| 10 | + } |
| 11 | + scalafix: { |
| 12 | + label: "scalafix & scalafmt" |
| 13 | + command: #sbt + ["formatCheck"] |
| 14 | + } |
| 15 | + compile: { |
| 16 | + label: "compile everything" |
| 17 | + command: #sbt + ["compile-all"] |
| 18 | + after: ["scalafix"] |
| 19 | + } |
| 20 | + scalastyle: { |
| 21 | + command: #sbt + ["coverage", "scalastyle", "test:scalastyle"] |
| 22 | + after: ["compile"] |
| 23 | + } |
| 24 | + test_bytes: { |
| 25 | + label: "bytes tests" |
| 26 | + after: ["compile"] |
| 27 | + command: #sbt + ["coverage", "bytes/test"] |
| 28 | + outputs: [ |
| 29 | + "/local/repo/bytes/target/test-reports/**/*", |
| 30 | + "/local/repo/bytes/target/scala-2.13/scoverage-report/**/*", |
| 31 | + "/local/repo/bytes/target/scala-2.13/coverage-report/**/*", |
| 32 | + ] |
| 33 | + } |
| 34 | + test_crypto: { |
| 35 | + label: "Crypto tests" |
| 36 | + after: ["compile"] |
| 37 | + command: #sbt + ["coverage", "crypto/test"] |
| 38 | + outputs: [ |
| 39 | + "/local/repo/crypto/target/test-reports/**/*", |
| 40 | + "/local/repo/crypto/target/scala-2.13/scoverage-report/**/*", |
| 41 | + "/local/repo/crypto/target/scala-2.13/coverage-report/**/*", |
| 42 | + ] |
| 43 | + } |
| 44 | + test_rlp: { |
| 45 | + label: "RLP tests" |
| 46 | + after: ["compile"] |
| 47 | + command: #sbt + ["coverage", "rlp/test"] |
| 48 | + outputs: [ |
| 49 | + "/local/repo/rlp/target/test-reports/**/*", |
| 50 | + "/local/repo/rlp/target/scala-2.13/scoverage-report/**/*", |
| 51 | + "/local/repo/rlp/target/scala-2.13/coverage-report/**/*", |
| 52 | + ] |
| 53 | + } |
| 54 | + test_unit: { |
| 55 | + label: "Unit tests" |
| 56 | + after: ["compile"] |
| 57 | + command: #sbt + ["coverage", "test"] |
| 58 | + outputs: [ |
| 59 | + "/local/repo/target/test-reports/**/*", |
| 60 | + "/local/repo/target/scala-2.13/scoverage-report/**/*", |
| 61 | + "/local/repo/target/scala-2.13/coverage-report/**/*", |
| 62 | + ] |
| 63 | + } |
| 64 | + test_evm: { |
| 65 | + label: "EVM tests" |
| 66 | + after: ["compile"] |
| 67 | + command: #sbt + ["coverage", "evm:test"] |
| 68 | + outputs: [ |
| 69 | + "/local/repo/target/test-reports/**/*", |
| 70 | + "/local/repo/target/scala-2.13/scoverage-report/**/*", |
| 71 | + "/local/repo/target/scala-2.13/coverage-report/**/*", |
| 72 | + ] |
| 73 | + } |
| 74 | + test_ets: { |
| 75 | + label: "ETS tests" |
| 76 | + after: ["compile"] |
| 77 | + command: ["./test-ets-bitte.sh"] |
| 78 | + outputs: [ |
| 79 | + "/local/repo/mantis-log.txt", |
| 80 | + "/local/repo/retesteth-GeneralStateTests-log.txt", |
| 81 | + "/local/repo/retesteth-BlockchainTests-log.txt", |
| 82 | + ] |
| 83 | + } |
| 84 | + test_integration: { |
| 85 | + label: "integration tests" |
| 86 | + after: ["compile"] |
| 87 | + command: #sbt + ["coverageOff", "it:test"] |
| 88 | + outputs: [ |
| 89 | + "/local/repo/target/test-reports/**/*", |
| 90 | + ] |
| 91 | + } |
| 92 | + additional: { |
| 93 | + label: "additional compilation & dist" |
| 94 | + after: ["compile", "test_integration"] |
| 95 | + command: #sbt + ["coverageOff", "benchmark:compile dist"] |
| 96 | + outputs: [ |
| 97 | + "/local/repo/target/universal/mantis-*.zip", |
| 98 | + ] |
| 99 | + } |
| 100 | + publish: { |
| 101 | + label: "Publishing libraries to Maven" |
| 102 | + after: ["test_crypto", "test_rlp", "test_unit"] |
| 103 | + command: [ ".buildkite/publish.sh" ] // TODO |
| 104 | + outputs: [ |
| 105 | + "/local/repo/target/universal/mantis-*.zip", |
| 106 | + ] |
| 107 | + } |
| 108 | + } |
| 109 | +} |
| 110 | +// #sbt: ["sbt", "-v", "-mem", "2048", "-J-Xmx4g", "-Dsbt.ivy.home=/cache/ivy2", "-Dsbt.boot.directory=/cache/sbt", "-Dmaven.repo.local=/cache/maven", "-Dnix=true"] |
| 111 | +#sbt: ["sbt", "-v", "-mem", "8192", "-Dnix=true"] |
| 112 | + |
| 113 | +// https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#webhook-payload-object-33 |
| 114 | +#isNotDraft: pull_request.draft == false |
| 115 | + |
| 116 | +// shared defaults for all steps |
| 117 | +#step: { |
| 118 | + enable: pull_request.base.ref == "develop" && #isNotDraft |
| 119 | + cpu: 5000 |
| 120 | + memory: 9000 |
| 121 | + term_timeout: 60 * 60 * 3 |
| 122 | + kill_timeout: term_timeout + 30 |
| 123 | + flakes: "github:input-output-hk/mantis": [ |
| 124 | + "sbt", |
| 125 | + "coreutils", |
| 126 | + "gnused", |
| 127 | + "gnupg", |
| 128 | + "solc", |
| 129 | + "lllc", |
| 130 | + "jdk8", |
| 131 | + "retesteth", |
| 132 | + "netcat-gnu", |
| 133 | + "gnugrep", |
| 134 | + "protoc-wrapper", |
| 135 | + ] |
| 136 | +} |
0 commit comments