Skip to content

Commit

Permalink
testing updates from structures branch (#346)
Browse files Browse the repository at this point in the history
* adding simple setter-getter example for testing implementation of new

* using java -jar instead of sbt for running obsidian in the testing loop for ganache tests; trying to get travis to run tests in parallel

* second shot at travis parallel jobs

* third shot at travis parallel jobs

* small changes, another travis round

* debugging travis

* refining travis job

* refining travis job 3

* updating checks, travis job fussing 4

* removing SBT hack

* sbt hack seems to no longer be needed, so removing the commented out version

* trying jdk13 for laughs

* jdk 13 does not work and i do not want to fix it right now

* horsing around with changing what gets built when in each testing path

* taking a quick stab at moving the protobuf install out of the ganache tests to save a little more time

* updating travis yaml

* updating travis yaml

* updating travis yaml

* updating travis yaml

* updating travis

* working on travis build

* travis updates; removing npm audit that wasnt doing anything, taking a pass at conditional jobs

* fixing travis yaml syntax

* updating travis yaml and test scripts per comments on #346
  • Loading branch information
ivoysey committed Jun 10, 2021
1 parent 26e3bc4 commit e911c9f
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 21 deletions.
18 changes: 7 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,22 @@ node_js:
- 15.11.0

jdk:
- oraclejdk12 ## as of 9 march 2021, up to jdk12 seems to work but 13/14/15 fail

before_install:
- ./travis_specific/install-protobuf.sh
- curl -sSL http://bit.ly/2ysbOFE | bash -s 1.4.1 -s
- mv bin/* $HOME/bin/
- export PATH=${PATH}:${HOME}/protobuf/
- export PATH=${PATH}:${HOME}/bin/
- ./travis_specific/install_ganache.sh
- oraclejdk12 # as of 10 june 2021, up to jdk12 works but 13+ fail

install:
- gradle publish -b Obsidian_Runtime/build.gradle
- sbt ++$TRAVIS_SCALA_VERSION assembly # this builds the Obsidian jar

env:
- TEST_SUITE=tests.sh
- TEST_SUITE=fabric_tests.sh
- TEST_SUITE=ganache_tests.sh

script: "travis_specific/$TEST_SUITE"

jobs:
exclude:
- if: branch != master
env: TEST_SUITE=fabric_tests.sh

cache:
directories:
- $HOME/.cache/coursier
Expand Down
16 changes: 16 additions & 0 deletions travis_specific/fabric_tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash

./travis_specific/install-protobuf.sh
curl -sSL http://bit.ly/2ysbOFE | bash -s 1.4.1 -s
mv bin/* $HOME/bin/
export PATH=${PATH}:${HOME}/protobuf/
export PATH=${PATH}:${HOME}/bin/

sbt ++$TRAVIS_SCALA_VERSION assembly

# Fabric tests
cd resources/tests/FabricTests || exit 1

bash IntContainerTest.sh
bash MultipleConstructorsTest.sh
bash TransactionInConstructorTest.sh
9 changes: 9 additions & 0 deletions travis_specific/ganache_tests.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
#!/bin/bash

# travis makes this env var available to all builds, so this stops us from installing things locally
if [[ $CI == "true" ]]
then
./travis_specific/install_ganache.sh
fi

# note: this won't be set locally so either set it on your machine to make
# sense or run this only via travis.
cd "$TRAVIS_BUILD_DIR" || exit 1
Expand Down Expand Up @@ -36,6 +42,9 @@ fi
# keep track of which tests fail so that we can output that at the bottom of the log
failed=()

# build a jar of Obsidian but removing all the tests; that happens in the other Travis matrix job, so we can assume it works here.
sbt 'set assembly / test := {}' ++$TRAVIS_SCALA_VERSION assembly

# check that the jar file for obsidian exists; `sbt assembly` ought to have been run before this script gets run
obsidian_jar="$(find target/scala* -name obsidianc.jar | head -n1)"
if [[ ! "$obsidian_jar" ]]
Expand Down
2 changes: 0 additions & 2 deletions travis_specific/install_ganache.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
#!/bin/bash

npm install -g npm
npm install
npm install -g ganache-cli
npm audit fix

sudo snap install jq # a commandline JSON tool

Expand Down
8 changes: 0 additions & 8 deletions travis_specific/tests.sh

This file was deleted.

0 comments on commit e911c9f

Please sign in to comment.