From 3eced14e38f75b74577ad78e68d19fa1b99d9125 Mon Sep 17 00:00:00 2001 From: Christian Decker Date: Tue, 25 Jan 2022 13:44:34 +0100 Subject: [PATCH] gci: Add rust configuration to Github actions --- .github/scripts/setup.sh | 7 +++++++ .github/workflows/ci.yaml | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) diff --git a/.github/scripts/setup.sh b/.github/scripts/setup.sh index 3833cdd80..928c6e2ec 100755 --- a/.github/scripts/setup.sh +++ b/.github/scripts/setup.sh @@ -3,6 +3,8 @@ export DEBIAN_FRONTEND=noninteractive export BITCOIN_VERSION=0.20.1 export ELEMENTS_VERSION=0.18.1.8 +export RUST_VERSION=nightly + sudo useradd -ms /bin/bash tester sudo apt-get update -qq @@ -66,3 +68,8 @@ sudo chmod 0440 /etc/sudoers.d/tester elements-$ELEMENTS_VERSION-x86_64-linux-gnu.tar.bz2 \ elements-$ELEMENTS_VERSION ) + +if [ "$RUST" == "1" ]; then + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- \ + -y --default-toolchain ${RUST_VERSION} +fi diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 225c9cd9a..d388208d8 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -338,3 +338,35 @@ jobs: with: name: Junit Report ${{ github.run_number }}.${{ matrix.cfg }} path: report.* + + rust-test: + name: Rust Test Config + runs-on: ubuntu-20.04 + needs: [smoke-test] + env: + DEVELOPER: 1 + RUST: 1 + VALGRIND: 0 + steps: + - name: Checkout + uses: actions/checkout@v2.0.0 + + - name: Set up Python 3.6 + uses: actions/setup-python@v2 + with: + python-version: 3.6 + + - name: Install dependencies + run: | + bash -x .github/scripts/setup.sh + + - name: Build + run: | + bash -x .github/scripts/build.sh + + - name: Upload Unit Test Results + if: always() + uses: actions/upload-artifact@v2 + with: + name: Junit Report ${{ github.run_number }}.${{ matrix.cfg }} + path: report.*