浏览代码

CI: Actually use the specified Matrix CI version (#107)

Philipp Schuster 2 年之前
父节点
当前提交
bc80a9b984
共有 1 个文件被更改,包括 27 次插入0 次删除
  1. 27 0
      .github/workflows/rust.yml

+ 27 - 0
.github/workflows/rust.yml

@@ -20,6 +20,15 @@ jobs:
           - 1.52.1 # MSVR
     steps:
       - uses: actions/checkout@v2
+      # Important preparation step: override the latest default Rust version in GitHub CI
+      # with the current value of the iteration in the "strategy.matrix.rust"-array.
+      - uses: actions-rs/toolchain@v1
+        with:
+          profile: default
+          toolchain: ${{ matrix.rust }}
+          override: true
+      # helps to identify if the right cargo version is actually used
+      - run: cargo version
       - name: Build
         run: cargo build --verbose
       - name: Run tests
@@ -35,6 +44,15 @@ jobs:
           - 1.52.1 # MSVR
     steps:
       - uses: actions/checkout@v2
+      # Important preparation step: override the latest default Rust version in GitHub CI
+      # with the current value of the iteration in the "strategy.matrix.rust"-array.
+      - uses: actions-rs/toolchain@v1
+        with:
+          profile: default
+          toolchain: ${{ matrix.rust }}
+          override: true
+      # helps to identify if the right cargo version is actually used
+      - run: cargo version
       - name: "Rustup: install some no_std target"
         run: rustup target add thumbv7em-none-eabihf
       - name: Build (no_std)
@@ -50,6 +68,15 @@ jobs:
           - stable
     steps:
       - uses: actions/checkout@v2
+      # Important preparation step: override the latest default Rust version in GitHub CI
+      # with the current value of the iteration in the "strategy.matrix.rust"-array.
+      - uses: actions-rs/toolchain@v1
+        with:
+          profile: default
+          toolchain: ${{ matrix.rust }}
+          override: true
+      # helps to identify if the right cargo version is actually used
+      - run: cargo version
       - name: Rustfmt
         run: cargo fmt -- --check
       - name: Clippy