Skip to content

Commit

Permalink
Merge bd5eb5b into 9a5ba7b
Browse files Browse the repository at this point in the history
  • Loading branch information
benthecarman committed Dec 6, 2020
2 parents 9a5ba7b + bd5eb5b commit 5dc4d4a
Show file tree
Hide file tree
Showing 4 changed files with 326 additions and 104 deletions.
304 changes: 304 additions & 0 deletions .github/workflows/main.yml
@@ -0,0 +1,304 @@
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
if: "!startsWith(github.event.head_commit.message, 'docs:') && !startsWith(github.event.head_commit.message, 'trivial:')"
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

docs:
runs-on: ubuntu-latest
if: "startsWith(github.event.head_commit.message, 'docs:')"
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

trivial:
runs-on: ubuntu-latest
if: "startsWith(github.event.head_commit.message, 'trivial:')"
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

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
20 changes: 20 additions & 0 deletions .github/workflows/release.yml
@@ -0,0 +1,20 @@
name: Release
on:
push:
branches: [master, main]
tags: ["*"]
jobs:
publish:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2.3.4
with:
fetch-depth: 0
- uses: olafurpg/setup-scala@v10
- uses: olafurpg/setup-gpg@v3
- run: sbt ci-release docs/publishWebsite
env:
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
PGP_SECRET: ${{ secrets.PGP_SECRET }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}

0 comments on commit 5dc4d4a

Please sign in to comment.