diff options
73 files changed, 337 insertions, 294 deletions
diff --git a/.github/workflows/build-workflow.yml b/.github/workflows/build-workflow.yml index d45936bd..f1ff16aa 100644 --- a/.github/workflows/build-workflow.yml +++ b/.github/workflows/build-workflow.yml @@ -19,7 +19,7 @@ jobs: uses: actions/checkout@v3 - name: Enable toolchain via github action - uses: dtolnay/rust-toolchain@1.58.1 + uses: dtolnay/rust-toolchain@1.63.0 - name: Enable cache # https://github.com/marketplace/actions/rust-cache @@ -55,7 +55,7 @@ jobs: uses: actions/checkout@v3 - name: Enable toolchain via github action - uses: dtolnay/rust-toolchain@1.58.1 + uses: dtolnay/rust-toolchain@1.63.0 with: targets: ${{ matrix.target }} diff --git a/.github/workflows/ci_pipeline.yml b/.github/workflows/ci_pipeline.yml index da164d16..b5265197 100644 --- a/.github/workflows/ci_pipeline.yml +++ b/.github/workflows/ci_pipeline.yml @@ -26,7 +26,7 @@ jobs: uses: actions/checkout@v3 - name: Enable toolchain via github action - uses: dtolnay/rust-toolchain@1.58.1 + uses: dtolnay/rust-toolchain@1.63.0 - name: Enable cache # https://github.com/marketplace/actions/rust-cache @@ -88,7 +88,7 @@ jobs: uses: actions/checkout@v3 - name: Enable toolchain via github action - uses: dtolnay/rust-toolchain@1.58.1 + uses: dtolnay/rust-toolchain@1.63.0 with: targets: ${{ matrix.target }} diff --git a/.github/workflows/hosted-post-merge_version_update.yml b/.github/workflows/hosted-post-merge_version_update.yml index af90319a..48430697 100644 --- a/.github/workflows/hosted-post-merge_version_update.yml +++ b/.github/workflows/hosted-post-merge_version_update.yml @@ -20,7 +20,7 @@ jobs: - name: enable toolchain via github action uses: actions-rs/toolchain@v1 with: - toolchain: 1.58.1 + toolchain: 1.63.0 components: cargo override: true diff --git a/.github/workflows/pull-request-checks.yml b/.github/workflows/pull-request-checks.yml index 49080505..e69fb710 100644 --- a/.github/workflows/pull-request-checks.yml +++ b/.github/workflows/pull-request-checks.yml @@ -44,6 +44,36 @@ jobs: workflows: - '.github/workflows/**' + # + # Checking that Cargo.lock is up to date + # + check-lockfile-uptodate: + name: Check whether Cargo.lock is up to date + runs-on: ubuntu-20.04 + outputs: + locks: ${{ steps.filter.outputs.locks }} + steps: + - uses: actions/checkout@v3 + - uses: dtolnay/rust-toolchain@1.58.1 + with: + targets: armv7-unknown-linux-gnueabihf + + - uses: Swatinem/rust-cache@v1 + + - uses: dorny/paths-filter@v2 + id: filter + with: + filters: | + locks: + - '**/Cargo.toml' + + - name: Check whether lockfile is up to date + if: steps.filter.outputs.locks == 'true' + uses: actions-rs/cargo@v1 + with: + command: check + args: --locked + udeps: name: Check for unused dependencies runs-on: ubuntu-latest @@ -138,7 +168,7 @@ jobs: uses: actions/checkout@v3 - name: enable toolchain via github action - uses: dtolnay/rust-toolchain@1.58.1 + uses: dtolnay/rust-toolchain@1.63.0 with: components: rustfmt, clippy @@ -150,7 +180,7 @@ jobs: uses: actions-rs/cargo@v1 # https://github.com/marketplace/actions/rust-cargo with: - toolchain: 1.58.1 + toolchain: 1.63.0 command: clippy args: --version @@ -158,7 +188,7 @@ jobs: uses: actions-rs/cargo@v1 # https://github.com/marketplace/actions/rust-cargo with: - toolchain: 1.58.1 + toolchain: 1.63.0 command: clippy args: --all-features @@ -190,7 +220,7 @@ jobs: uses: actions/checkout@v3 - name: enable toolchain via github action - uses: dtolnay/rust-toolchain@1.58.1 + uses: dtolnay/rust-toolchain@1.63.0 - name: Enable cache # https://github.com/marketplace/actions/rust-cache @@ -228,7 +258,7 @@ jobs: uses: actions/checkout@v3 - name: enable toolchain via github action - uses: dtolnay/rust-toolchain@1.58.1 + uses: dtolnay/rust-toolchain@1.63.0 - name: Enable cache # https://github.com/marketplace/actions/rust-cache @@ -259,7 +289,7 @@ jobs: uses: actions/checkout@v3 - name: enable toolchain via github action - uses: dtolnay/rust-toolchain@1.58.1 + uses: dtolnay/rust-toolchain@1.63.0 with: targets: armv7-unknown-linux-gnueabihf @@ -287,7 +317,7 @@ jobs: uses: actions/checkout@v3 - name: enable toolchain via github action - uses: dtolnay/rust-toolchain@1.58.1 + uses: dtolnay/rust-toolchain@1.63.0 with: target: armv7-unknown-linux-gnueabihf @@ -312,8 +342,8 @@ jobs: # - name: Checkout # uses: actions/checkout@v3 # -# - name: Install rust v1.58.1 -# uses: dtolnay/rust-toolchain@1.58.1 +# - name: Install rust v1.63.0 +# uses: dtolnay/rust-toolchain@1.63.0 # # - name: Enable cache # # https://github.com/marketplace/actions/rust-cache diff --git a/.github/workflows/update-tedge-ref-docs.yml b/.github/workflows/update-tedge-ref-docs.yml index 2f37f29e..a644339c 100644 --- a/.github/workflows/update-tedge-ref-docs.yml +++ b/.github/workflows/update-tedge-ref-docs.yml @@ -6,36 +6,36 @@ on: # runs automatically on 00:00 UTC on 1st of every month schedule: - cron: "0 0 1 * *" - + jobs: build-tedge-create-ref-docs: runs-on: Ubuntu-20.04 - + steps: - name: Checkout uses: actions/checkout@v3 - run: | git config --global user.email "info@thin-edge.io" git config --global user.name "Versioneer" - + - name: enable toolchain via github action # https://github.com/actions-rs/toolchain uses: actions-rs/toolchain@v1 with: - toolchain: 1.58.1 + toolchain: 1.63.0 override: true - name: Enable cache # https://github.com/marketplace/actions/rust-cache uses: Swatinem/rust-cache@v1 - + - name: Build tedge uses: actions-rs/cargo@v1 # https://github.com/marketplace/actions/rust-cargo with: command: build args: --release -p tedge - + - name: run the update script run: ./docs/gen-ref-docs.sh - name: Create Pull Request diff --git a/crates/common/certificate/src/lib.rs b/crates/common/certificate/src/lib.rs index 0c81a73d..ecfbd88a 100644 --- a/crates/common/certificate/src/lib.rs +++ b/crates/common/certificate/src/lib.rs @@ -110,7 +110,7 @@ impl KeyCertPair { id: &str, not_before: OffsetDateTime, ) -> Result<KeyCertPair, CertificateError> { - let () = KeyCertPair::check_identifier(id, config.max_cn_size)?; + KeyCertPair::check_identifier(id, config.max_cn_size)?; let mut distinguished_name = rcgen::DistinguishedName::new(); distinguished_name.push(rcgen::DnType::CommonName, id); distinguished_name.push(rcgen::DnType::OrganizationName, &config.organization_name); diff --git a/crates/common/download/examples/simple_download.rs b/crates/common/download/examples/simple_download.rs index e583b0eb..763a91c0 100644 --- a/crates/common/download/examples/simple_download. |