]> Untitled Git - bdk/commitdiff
Use action-rs/toolchain in CI
authorDaniela Brozzoni <danielabrozzoni@protonmail.com>
Fri, 3 Mar 2023 14:59:02 +0000 (15:59 +0100)
committerDaniela Brozzoni <danielabrozzoni@protonmail.com>
Fri, 3 Mar 2023 16:44:11 +0000 (17:44 +0100)
.github/workflows/code_coverage.yml
.github/workflows/cont_integration.yml

index 0041cfea684e3ffde4898e9a8cf799dc9d3af2c8..dace6f3556ebda883ca0d7af80cbcfaa52192b43 100644 (file)
@@ -16,16 +16,13 @@ jobs:
         uses: actions/checkout@v2
       - name: Install lcov tools
         run: sudo apt-get install lcov -y
-      - name: Install rustup
-        run: curl https://sh.rustup.rs -sSf | sh -s -- -y
-      - name: Set default toolchain
-        run: rustup default nightly
-      - name: Set profile
-        run: rustup set profile minimal
-      - name: Add llvm tools
-        run: rustup component add llvm-tools-preview
-      - name: Update toolchain
-        run: rustup update
+      - name: Install Rust toolchain
+        uses: actions-rs/toolchain@v1
+        with:
+            toolchain: "1.65.0"
+            override: true
+            profile: minimal
+            components: llvm-tools-preview
       - name: Cache cargo
         uses: actions/cache@v3
         with:
@@ -53,7 +50,6 @@ jobs:
         run: mkdir coverage; grcov . --binary-path ./target/debug/ -s . -t lcov --branch --ignore-not-existing --ignore '/*' -o ./coverage/lcov.info
       - name: Generate HTML coverage report
         run: genhtml -o coverage-report.html ./coverage/lcov.info
-
       - name: Coveralls upload
         uses: coverallsapp/github-action@master
         with:
index f401eb9f6fb2d9df0cc62b15b893d0f76457db4f..4ce2ad47bc6bfd078c6a897592cdf9a093812d84 100644 (file)
@@ -30,15 +30,13 @@ jobs:
             ~/.cargo/git
             target
           key: ${{ runner.os }}-cargo-${{ hashFiles('.cache_key') }}-${{ hashFiles('**/Cargo.toml','**/Cargo.lock') }}
-      - name: Set default toolchain
-        run: rustup default ${{ matrix.rust.version }}
-      - name: Set profile
-        run: rustup set profile minimal
-      - name: Add clippy
-        if: ${{ matrix.rust.clippy }}
-        run: rustup component add clippy
-      - name: Update toolchain
-        run: rustup update
+      - name: Install Rust toolchain
+        uses: actions-rs/toolchain@v1
+        with:
+            toolchain: ${{ matrix.rust.version }}
+            override: true
+            components: clippy
+            profile: minimal
       - name: Build
         run: cargo build ${{ matrix.features }}
       - name: Clippy
@@ -69,14 +67,13 @@ jobs:
       - run: sudo apt-add-repository "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-10 main" || exit 1
       - run: sudo apt-get update || exit 1
       - run: sudo apt-get install -y libclang-common-10-dev clang-10 libc6-dev-i386 || exit 1
-      - name: Set default toolchain
-        run: rustup default 1.65.0 # STABLE
-      - name: Set profile
-        run: rustup set profile minimal
-      - name: Add target wasm32
-        run: rustup target add wasm32-unknown-unknown
-      - name: Update toolchain
-        run: rustup update
+      - name: Install Rust toolchain
+        uses: actions-rs/toolchain@v1
+        with:
+            toolchain: "1.65.0"
+            override: true
+            profile: minimal
+            target: "wasm32-unknown-unknown"
       - name: Check bdk
         working-directory: ./crates/bdk
         run: cargo check --target wasm32-unknown-unknown --features dev-getrandom-wasm
@@ -90,13 +87,12 @@ jobs:
     steps:
       - name: Checkout
         uses: actions/checkout@v2
-      - name: Set default toolchain
-        run: rustup default nightly
-      - name: Set profile
-        run: rustup set profile minimal
-      - name: Add rustfmt
-        run: rustup component add rustfmt
-      - name: Update toolchain
-        run: rustup update
+      - name: Install Rust toolchain
+        uses: actions-rs/toolchain@v1
+        with:
+            toolchain: "1.65.0"
+            override: true
+            profile: minimal
+            components: rustfmt
       - name: Check fmt
         run: cargo fmt --all -- --config format_code_in_doc_comments=true --check