diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 000000000000..fdf42659a61b --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,264 @@ +name: CI +env: + SCALA_2_13: 2.13.4 + SCALA_2_12: 2.12.12 + COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} + +on: + pull_request: + +jobs: + compile: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Setup Scala + uses: olafurpg/setup-scala@v10 + - name: Cache + uses: actions/cache@v2 + with: + path: | + ~/.ivy2/cache + ~/.sbt + ~/.bitcoin-s/binaries + key: ${{ runner.os }}-cache + - name: Compile and Check Formatting + run: sbt ++${SCALA_2_12} test:compile scalafmtCheckAll + + Compile-Website: + needs: compile + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Setup Scala + uses: olafurpg/setup-scala@v10 + - name: Cache + uses: actions/cache@v2 + with: + path: | + ~/.ivy2/cache + ~/.sbt + ~/.bitcoin-s/binaries + key: ${{ runner.os }}-cache + - name: Compile website + run: sbt ++${SCALA_2_13} docs/mdoc + + Linux_2-13_Bitcoind_and_Eclair_RPC_Tests: + needs: compile + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Setup Scala + uses: olafurpg/setup-scala@v10 + - name: Cache + uses: actions/cache@v2 + with: + path: | + ~/.ivy2/cache + ~/.sbt + ~/.bitcoin-s/binaries + key: ${{ runner.os }}-cache + - name: Linux 2.13 bitcoind and eclair rpc tests + run: sbt ++${SCALA_2_13} downloadBitcoind downloadEclair coverage bitcoindRpcTest/test bitcoindRpc/coverageReport bitcoindRpc/coverageAggregate bitcoindRpc/coveralls eclairRpcTest/test eclairRpc/coverageReport eclairRpc/coverageAggregate eclairRpc/coveralls + + Linux_2-12_Bitcoind_and_Eclair_RPC_Tests: + needs: compile + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Setup Scala + uses: olafurpg/setup-scala@v10 + - name: Cache + uses: actions/cache@v2 + with: + path: | + ~/.ivy2/cache + ~/.sbt + ~/.bitcoin-s/binaries + key: ${{ runner.os }}-cache + - name: Linux 2.12 bitcoind and eclair rpc tests + run: sbt ++${SCALA_2_12} downloadBitcoind downloadEclair coverage bitcoindRpcTest/test bitcoindRpc/coverageReport bitcoindRpc/coverageAggregate bitcoindRpc/coveralls eclairRpcTest/test eclairRpc/coverageReport eclairRpc/coverageAggregate eclairRpc/coveralls + + Linux_2-13_App_Chain_Node_and_Core_Tests: + needs: compile + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Setup Scala + uses: olafurpg/setup-scala@v10 + - name: Cache + uses: actions/cache@v2 + with: + path: | + ~/.ivy2/cache + ~/.sbt + ~/.bitcoin-s/binaries + key: ${{ runner.os }}-cache + - name: Linux 2.13 App, Chain, Node, and Core Tests + run: sbt ++${SCALA_2_13} downloadBitcoind coverage chainTest/test chain/coverageReport chain/coverageAggregate chain/coveralls nodeTest/test node/coverageReport node/coverageAggregate node/coveralls cryptoTest/test crypto/coverageReport crypto/coverageAggregate crypto/coveralls coreTest/test core/coverageReport core/coverageAggregate core/coveralls secp256k1jni/test zmq/test zmq/coverageReport zmq/coverageAggregate zmq/coveralls appCommonsTest/test appServerTest/test + + Linux_2-12_App_Chain_Node_and_Core_Tests: + needs: compile + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Setup Scala + uses: olafurpg/setup-scala@v10 + - name: Cache + uses: actions/cache@v2 + with: + path: | + ~/.ivy2/cache + ~/.sbt + ~/.bitcoin-s/binaries + key: ${{ runner.os }}-cache + - name: Linux 2.12 App, Chain, Node, and Core Tests + run: sbt ++${SCALA_2_12} downloadBitcoind coverage chainTest/test chain/coverageReport chain/coverageAggregate chain/coveralls nodeTest/test node/coverageReport node/coverageAggregate node/coveralls cryptoTest/test crypto/coverageReport crypto/coverageAggregate crypto/coveralls coreTest/test core/coverageReport core/coverageAggregate core/coveralls secp256k1jni/test zmq/test zmq/coverageReport zmq/coverageAggregate zmq/coveralls appCommonsTest/test appServerTest/test + + Linux_2-13_KeyManager_Wallet_and_DLC_Tests: + needs: compile + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Setup Scala + uses: olafurpg/setup-scala@v10 + - name: Cache + uses: actions/cache@v2 + with: + path: | + ~/.ivy2/cache + ~/.sbt + ~/.bitcoin-s/binaries + key: ${{ runner.os }}-cache + - name: Linux 2.13 KeyManager, Wallet, and DLC tests + run: sbt ++${SCALA_2_13} downloadBitcoind coverage keyManagerTest/test keyManager/coverageReport keyManager/coverageAggregate keyManager/coveralls feeProviderTest/test walletTest/test wallet/coverageReport wallet/coverageAggregate wallet/coveralls dlcOracleTest/test dlcOracle/coverageReport dlcOracle/coverageAggregate dlcOracle/coveralls + + Linux_2-12_KeyManager_Wallet_and_DLC_Tests: + needs: compile + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Setup Scala + uses: olafurpg/setup-scala@v10 + - name: Cache + uses: actions/cache@v2 + with: + path: | + ~/.ivy2/cache + ~/.sbt + ~/.bitcoin-s/binaries + key: ${{ runner.os }}-cache + - name: Linux 2.12 KeyManager, Wallet, and DLC tests + run: sbt ++${SCALA_2_12} downloadBitcoind coverage keyManagerTest/test keyManager/coverageReport keyManager/coverageAggregate keyManager/coveralls feeProviderTest/test walletTest/test wallet/coverageReport wallet/coverageAggregate wallet/coveralls dlcOracleTest/test dlcOracle/coverageReport dlcOracle/coverageAggregate dlcOracle/coveralls + + Secp256k1_Disabled_Tests: + needs: compile + runs-on: ubuntu-latest + env: + DISABLE_SECP256K1: "true" + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Setup Scala + uses: olafurpg/setup-scala@v10 + - name: Cache + uses: actions/cache@v2 + with: + path: | + ~/.ivy2/cache + ~/.sbt + ~/.bitcoin-s/binaries + key: ${{ runner.os }}-cache + - name: Secp256k1 Disabled Core Test + run: sbt ++${SCALA_2_13} cryptoTest/test coreTest/test + + PostgreSQL_Tests: + needs: compile + runs-on: ubuntu-latest + env: + PG_ENABLED: "1" + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Setup Scala + uses: olafurpg/setup-scala@v10 + - name: Cache + uses: actions/cache@v2 + with: + path: | + ~/.ivy2/cache + ~/.sbt + ~/.bitcoin-s/binaries + key: ${{ runner.os }}-cache + - name: PostgreSQL tests + run: sbt ++${SCALA_2_13} downloadBitcoind dbCommonsTest/test walletTest/test chainTest/test nodeTest/test + + Mac_2-13_Bitcoind_and_Eclair_RPC_Tests: + needs: compile + runs-on: macos-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Setup Scala + uses: olafurpg/setup-scala@v10 + - name: Cache + uses: actions/cache@v2 + with: + path: | + ~/.ivy2/cache + ~/.sbt + ~/.bitcoin-s/binaries + key: ${{ runner.os }}-cache + - name: Mac 2.13 bitcoind and eclair rpc tests + run: sbt ++${SCALA_2_13} downloadBitcoind downloadEclair coverage cryptoTest/test coreTest/test appCommonsTest/test bitcoindRpcTest/test bitcoindRpc/coverageReport bitcoindRpc/coverageAggregate bitcoindRpc/coveralls eclairRpcTest/test eclairRpc/coverageReport eclairRpc/coverageAggregate eclairRpc/coveralls + + Mac_2-13_Wallet_Node_and_DLC_Tests: + needs: compile + runs-on: macos-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Setup Scala + uses: olafurpg/setup-scala@v10 + - name: Cache + uses: actions/cache@v2 + with: + path: | + ~/.ivy2/cache + ~/.sbt + ~/.bitcoin-s/binaries + key: ${{ runner.os }}-cache + - name: Mac 2.13 Wallet, Node, and DLC tests + run: sbt ++${SCALA_2_13} downloadBitcoind coverage walletTest/test wallet/coverageReport wallet/coverageAggregate wallet/coveralls nodeTest/test node/coverageReport node/coverageAggregate node/coveralls dlcOracleTest/test dlcOracle/coverageReport dlcOracle/coveralls + +# FIXME Need new secp256k1 bindings on windows +# WindowsTest: +# needs: compile +# runs-on: windows-latest +# steps: +# - name: Configure git +# run: "git config --global core.autocrlf false" +# shell: bash +# - name: Checkout +# uses: actions/checkout@v2 +# - name: Setup Scala +# uses: olafurpg/setup-scala@v10 +# - name: Cache +# uses: actions/cache@v2 +# with: +# path: | +# ~/.ivy2/cache +# ~/.sbt +# ~/.bitcoin-s/binaries +# key: ${{ runner.os }}-cache +# - name: Windows Crypto, Core, and Database tests +# run: sbt ++${SCALA_2_13} cryptoTest/test coreTest/test dbCommonsTest/test +# shell: bash diff --git a/.travis.yml b/.travis.yml index e58a42d85df4..6603dda68814 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,92 +18,92 @@ jobs: - TEST_COMMAND="test:compile scalafmtCheck test:scalafmtCheck" scala: 2.12.12 - - stage: compile - os: linux - name: "Compile & Formatting Check" - env: - - TEST_COMMAND="test:compile scalafmtCheck test:scalafmtCheck" - scala: 2.12.12 - - # compile website, to check for documentation regressions - - stage: test - name: Compile website - env: - - TEST_COMMAND="docs/mdoc" - scala: 2.13.4 - - - stage: test - name: Linux 2.13.4 bitcoind and eclair rpc tests - os: linux - env: - - TEST_COMMAND="bitcoindRpcTest/test bitcoindRpc/coverageReport bitcoindRpc/coverageAggregate bitcoindRpc/coveralls eclairRpcTest/test eclairRpc/coverageReport eclairRpc/coverageAggregate eclairRpc/coveralls" - scala: 2.13.4 - - - stage: test - name: Linux 2.12.12 bitcoind and eclair rpc tests - os: linux - env: - - TEST_COMMAND="bitcoindRpcTest/test bitcoindRpc/coverageReport bitcoindRpc/coverageAggregate bitcoindRpc/coveralls eclairRpcTest/test eclairRpc/coverageReport eclairRpc/coverageAggregate eclairRpc/coveralls" - scala: 2.12.12 - - - stage: test - name: Linux 2.13.4 App, Chain, Node, and Core Tests - os: linux - env: - - TEST_COMMAND="chainTest/test chain/coverageReport chain/coverageAggregate chain/coveralls nodeTest/test node/coverageReport node/coverageAggregate node/coveralls cryptoTest/test crypto/coverageReport crypto/coverageAggregate crypto/coveralls coreTest/test core/coverageReport core/coverageAggregate core/coveralls secp256k1jni/test zmq/test zmq/coverageReport zmq/coverageAggregate zmq/coveralls appCommonsTest/test appServerTest/test" - scala: 2.13.4 - - - stage: test - name: Linux 2.12.12 App, Chain, Node, and Core Tests - os: linux - env: - - TEST_COMMAND="chainTest/test chain/coverageReport chain/coverageAggregate chain/coveralls nodeTest/test node/coverageReport node/coverageAggregate node/coveralls cryptoTest/test crypto/coverageReport crypto/coverageAggregate crypto/coveralls coreTest/test core/coverageReport core/coverageAggregate core/coveralls secp256k1jni/test zmq/test zmq/coverageReport zmq/coverageAggregate zmq/coveralls appCommonsTest/test appServerTest/test" - scala: 2.12.12 - - stage: test - name: Linux 2.13.4 KeyManager Wallet, dlc tests - os: linux - env: - - TEST_COMMAND="keyManagerTest/test keyManager/coverageReport keyManager/coverageAggregate keyManager/coveralls walletTest/test wallet/coverageReport wallet/coverageAggregate wallet/coveralls dlcOracleTest/test dlcOracle/coverageReport dlcOracle/coverageAggregate dlcOracle/coveralls" - scala: 2.13.4 - - - stage: test - name: Linux 2.12.12 KeyManager, Wallet, dlc tests - os: linux - env: - - TEST_COMMAND="keyManagerTest/test keyManager/coverageReport keyManager/coverageAggregate keyManager/coveralls walletTest/test wallet/coverageReport wallet/coverageAggregate wallet/coveralls dlcOracleTest/test dlcOracle/coverageReport dlcOracle/coverageAggregate dlcOracle/coveralls" - scala: 2.12.12 - - - stage: test - os: linux - name: "Secp256k1 Disabled Core Test" - env: - - DISABLE_SECP256K1="true" - - TEST_COMMAND="coreTest/test cryptoTest/test" - scala: 2.13.4 - - - stage: test - os: linux - name: "PostgreSQL tests" - env: - - PG_ENABLED="1" - - TEST_COMMAND="dbCommonsTest/test chainTest/test nodeTest/test walletTest/test" - scala: 2.13.4 - - - stage: test - os: osx - name: "macOS bitcoind and eclair tests" - env: - - TEST_COMMAND="cryptoTest/test coreTest/test appCommonsTest/test bitcoindRpcTest/test bitcoindRpc/coverageReport bitcoindRpc/coverageAggregate bitcoindRpc/coveralls eclairRpcTest/test eclairRpc/coverageReport eclairRpc/coverageAggregate eclairRpc/coveralls" - scala: 2.13.4 - - # skip all test tagged as UsesExperimentalBitcoind - # TODO remove this condition once we have a neutrino enabled bitcoind binary for OSX - - stage: test - os: osx - name: "macOS wallet, node, dlc tests" - env: - - TEST_COMMAND="walletTest/test wallet/coverageReport wallet/coverageAggregate wallet/coveralls nodeTest/test node/coverageReport node/coverageAggregate node/coveralls dlcOracleTest/test dlcOracle/coverageReport dlcOracle/coveralls" - scala: 2.13.4 +# - stage: compile +# os: linux +# name: "Compile & Formatting Check" +# env: +# - TEST_COMMAND="test:compile scalafmtCheck test:scalafmtCheck" +# scala: 2.12.12 + +# # compile website, to check for documentation regressions +# - stage: test +# name: Compile website +# env: +# - TEST_COMMAND="docs/mdoc" +# scala: 2.13.4 +# +# - stage: test +# name: Linux 2.13.4 bitcoind and eclair rpc tests +# os: linux +# env: +# - TEST_COMMAND="bitcoindRpcTest/test bitcoindRpc/coverageReport bitcoindRpc/coverageAggregate bitcoindRpc/coveralls eclairRpcTest/test eclairRpc/coverageReport eclairRpc/coverageAggregate eclairRpc/coveralls" +# scala: 2.13.4 +# +# - stage: test +# name: Linux 2.12.12 bitcoind and eclair rpc tests +# os: linux +# env: +# - TEST_COMMAND="bitcoindRpcTest/test bitcoindRpc/coverageReport bitcoindRpc/coverageAggregate bitcoindRpc/coveralls eclairRpcTest/test eclairRpc/coverageReport eclairRpc/coverageAggregate eclairRpc/coveralls" +# scala: 2.12.12 +# +# - stage: test +# name: Linux 2.13.4 App, Chain, Node, and Core Tests +# os: linux +# env: +# - TEST_COMMAND="chainTest/test chain/coverageReport chain/coverageAggregate chain/coveralls nodeTest/test node/coverageReport node/coverageAggregate node/coveralls cryptoTest/test crypto/coverageReport crypto/coverageAggregate crypto/coveralls coreTest/test core/coverageReport core/coverageAggregate core/coveralls secp256k1jni/test zmq/test zmq/coverageReport zmq/coverageAggregate zmq/coveralls appCommonsTest/test appServerTest/test" +# scala: 2.13.4 +# +# - stage: test +# name: Linux 2.12.12 App, Chain, Node, and Core Tests +# os: linux +# env: +# - TEST_COMMAND="chainTest/test chain/coverageReport chain/coverageAggregate chain/coveralls nodeTest/test node/coverageReport node/coverageAggregate node/coveralls cryptoTest/test crypto/coverageReport crypto/coverageAggregate crypto/coveralls coreTest/test core/coverageReport core/coverageAggregate core/coveralls secp256k1jni/test zmq/test zmq/coverageReport zmq/coverageAggregate zmq/coveralls appCommonsTest/test appServerTest/test" +# scala: 2.12.12 +# - stage: test +# name: Linux 2.13.4 KeyManager Wallet, dlc tests +# os: linux +# env: +# - TEST_COMMAND="keyManagerTest/test keyManager/coverageReport keyManager/coverageAggregate keyManager/coveralls walletTest/test wallet/coverageReport wallet/coverageAggregate wallet/coveralls dlcOracleTest/test dlcOracle/coverageReport dlcOracle/coverageAggregate dlcOracle/coveralls" +# scala: 2.13.4 +# +# - stage: test +# name: Linux 2.12.12 KeyManager, Wallet, dlc tests +# os: linux +# env: +# - TEST_COMMAND="keyManagerTest/test keyManager/coverageReport keyManager/coverageAggregate keyManager/coveralls walletTest/test wallet/coverageReport wallet/coverageAggregate wallet/coveralls dlcOracleTest/test dlcOracle/coverageReport dlcOracle/coverageAggregate dlcOracle/coveralls" +# scala: 2.12.12 +# +# - stage: test +# os: linux +# name: "Secp256k1 Disabled Core Test" +# env: +# - DISABLE_SECP256K1="true" +# - TEST_COMMAND="coreTest/test cryptoTest/test" +# scala: 2.13.4 +# +# - stage: test +# os: linux +# name: "PostgreSQL tests" +# env: +# - PG_ENABLED="1" +# - TEST_COMMAND="dbCommonsTest/test chainTest/test nodeTest/test walletTest/test" +# scala: 2.13.4 + +# - stage: test +# os: osx +# name: "macOS bitcoind and eclair tests" +# env: +# - TEST_COMMAND="cryptoTest/test coreTest/test appCommonsTest/test bitcoindRpcTest/test bitcoindRpc/coverageReport bitcoindRpc/coverageAggregate bitcoindRpc/coveralls eclairRpcTest/test eclairRpc/coverageReport eclairRpc/coverageAggregate eclairRpc/coveralls" +# scala: 2.13.4 +# +# # skip all test tagged as UsesExperimentalBitcoind +# # TODO remove this condition once we have a neutrino enabled bitcoind binary for OSX +# - stage: test +# os: osx +# name: "macOS wallet, node, dlc tests" +# env: +# - TEST_COMMAND="walletTest/test wallet/coverageReport wallet/coverageAggregate wallet/coveralls nodeTest/test node/coverageReport node/coverageAggregate node/coveralls dlcOracleTest/test dlcOracle/coverageReport dlcOracle/coveralls" +# scala: 2.13.4 # Release snapshots/versions of all libraries # run ci-release only if previous stages passed - stage: release