From 3335cdd194f8444ac759a43bdfcaf12d9d6c31a0 Mon Sep 17 00:00:00 2001 From: Hugo Caillard <911307+hugocaillard@users.noreply.github.com> Date: Thu, 23 Nov 2023 17:08:40 +0100 Subject: [PATCH 1/2] ci: fix devnet rustc version hash --- .github/workflows/ci.yaml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 002e5cdd7..f7048c646 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -365,9 +365,16 @@ jobs: - name: Install Rust toolchain if: github.event_name != 'pull_request' || matrix.target == 'x86_64-unknown-linux-gnu' - run: | - rustup toolchain install stable --profile minimal - echo "RUST_VERSION_HASH=$(rustc --version | sha256sum | awk '{print $1}')" >> $GITHUB_ENV‡ + run: rustup toolchain install stable --profile minimal + + - name: "Get Rust version (unix)" + if: matrix.os != 'windows-latest' + run: echo "RUST_VERSION_HASH=$(rustc --version | shasum -a 256 | awk '{print $1}')" >> $GITHUB_ENV + + - name: "Get Rust version (windows)" + if: matrix.os == 'windows-latest' + shell: bash + run: echo "RUST_VERSION_HASH=$(rustc --version | sha256sum | awk '{print $1}')" >> $GITHUB_ENV - name: Install and cache Node if: github.event_name != 'pull_request' && matrix.target != 'x86_64-unknown-linux-musl' From 44e6d13be4acb2ab6f8c90a4042840514793a2fc Mon Sep 17 00:00:00 2001 From: Hugo Caillard <911307+hugocaillard@users.noreply.github.com> Date: Thu, 23 Nov 2023 17:11:33 +0100 Subject: [PATCH 2/2] ci: only run repl release job when needed --- .github/workflows/ci.yaml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index f7048c646..a26dd61ee 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -464,6 +464,7 @@ jobs: dist_clarity_repl: name: Build Clarity REPL Distribution + if: startsWith(github.ref, 'refs/heads/main') && needs.get_release_info.outputs.tag != '' runs-on: ubuntu-latest needs: pre_run defaults: @@ -495,9 +496,6 @@ jobs: - name: Build - Cargo run: cargo build --release --locked --target x86_64-unknown-linux-gnu - - name: Unit Tests - Cargo - run: cargo test --workspace --release --locked --exclude clarinet-sdk-wasm --exclude clarity-jupyter-kernel --target x86_64-unknown-linux-gnu - - name: Compress cargo artifact working-directory: "." run: tar -C target/x86_64-unknown-linux-gnu/release -zcvf clarity-repl-${{ env.SHORT_TARGET_NAME }}.tar.gz clarity-repl @@ -509,7 +507,6 @@ jobs: path: clarity-repl-${{ env.SHORT_TARGET_NAME }}.tar.gz - name: Publish clarity-repl to crates.io - if: startsWith(github.ref, 'refs/heads/main') && needs.get_release_info.outputs.tag != '' run: | cargo login ${{ secrets.CARGO_CRATES_IO_API_KEY }} cargo publish