From 0ef229928515f761d78a04ea8becd4034c23d97b Mon Sep 17 00:00:00 2001 From: Mark Stopka Date: Fri, 24 Sep 2021 04:55:11 +0100 Subject: [PATCH] Add CNCLI build to CI --- .../workflows/build-application-cncli.yaml | 64 +++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 .github/workflows/build-application-cncli.yaml diff --git a/.github/workflows/build-application-cncli.yaml b/.github/workflows/build-application-cncli.yaml new file mode 100644 index 0000000..3011a0f --- /dev/null +++ b/.github/workflows/build-application-cncli.yaml @@ -0,0 +1,64 @@ +name: Test CNCLI compatibility + +on: + push: + release: + types: [created] + pull_request: + branches: [ master ] + +env: + CARGO_TERM_COLOR: always + +jobs: + build: + name: Build CNCLI with Cargo + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, macos-latest, macos-11] + rust: [stable, nightly] + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@v2 + with: + path: cardano_ouroboros_network + - uses: actions/checkout@v2 + with: + repository: AndrewWestberg/cncli + path: cncli + - name: Setup Rust + uses: actions-rs/toolchain@v1 + with: + toolchain: ${{ matrix.rust }} + override: true + - uses: actions/checkout@v2 + with: + repository: alexcrichton/cargo-edit-locally + path: cargo-edit-locally + - name: Install cargo-edit-locally + run: | + pushd cargo-edit-locally + cargo build -q + cargo install --path . + popd + - name: Update dependencies + run: | + pushd cncli + cargo edit-locally cardano_ouroboros_network --path ../cardano_ouroboros_network + rm Cargo.lock + cargo update + - name: Build CNCLI + run: cargo build --verbose + - name: Run CNCLI tests + run: | + cargo test --verbose + popd + + build_success: + name: Build CNCLI with Cargo - All environments + runs-on: ubuntu-latest + needs: build + steps: + - run: echo Done!