Skip to content

Commit

Permalink
Merge pull request #9 from rgallor/chore/update-deps
Browse files Browse the repository at this point in the history
update deps and MSRV
  • Loading branch information
harlem88 authored May 29, 2024
2 parents 3c25312 + 70ef91f commit beed00b
Show file tree
Hide file tree
Showing 8 changed files with 69 additions and 48 deletions.
3 changes: 2 additions & 1 deletion .github/dependabot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: /
directory: "/"
schedule:
# Check for updates to GitHub Actions every week
interval: weekly
- package-ecosystem: cargo
directory: "/rust"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codegen-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
env:
CARGO_TERM_COLOR: always
PB_REL: https://github.com/protocolbuffers/protobuf/releases
PB_VERSION: 24.4
PB_VERSION: 26.1

jobs:
check:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/reuse-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@ permissions:

on:
workflow_call:
workflow_dispatch:

jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: REUSE Compliance Check
uses: fsfe/reuse-action@v2
uses: fsfe/reuse-action@v3
53 changes: 29 additions & 24 deletions .github/workflows/rust-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ on:
workflow_call:
env:
CARGO_TERM_COLOR: always
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"
defaults:
run:
working-directory: rust
Expand All @@ -23,13 +25,10 @@ jobs:
with:
components: rustfmt
- name: Check formatting
run: cargo fmt --check
run: cargo fmt --check --all
clippy:
runs-on: ubuntu-latest
name: ${{ matrix.toolchain }} / clippy
permissions:
contents: read
checks: write
strategy:
fail-fast: false
matrix:
Expand All @@ -41,20 +40,21 @@ jobs:
with:
toolchain: ${{ matrix.toolchain }}
components: clippy
- name: Install sccache-cache
uses: mozilla-actions/sccache-action@v0.0.4
- name: cargo clippy
uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --manifest-path rust/Cargo.toml --all-targets --all-features -- -D warnings
run: cargo clippy --all-targets --all-features --workspace -- -D warnings
doc:
runs-on: ubuntu-latest
name: nightly / doc
steps:
- uses: actions/checkout@v4
- name: Install nightly
uses: dtolnay/rust-toolchain@nightly
- name: Install sccache-cache
uses: mozilla-actions/sccache-action@v0.0.4
- name: cargo doc
run: cargo doc --no-deps --all-features
run: cargo doc --no-deps --all-features --workspace
env:
RUSTDOCFLAGS: --cfg docsrs -D warnings
hack:
Expand All @@ -64,41 +64,46 @@ jobs:
- uses: actions/checkout@v4
- name: Install stable
uses: dtolnay/rust-toolchain@stable
- name: Install sccache-cache
uses: mozilla-actions/sccache-action@v0.0.4
- name: cargo install cargo-hack
uses: taiki-e/install-action@cargo-hack
# intentionally no target specifier; see https://github.com/jonhoo/rust-ci-conf/pull/4
- name: cargo hack
run: cargo hack --feature-powerset check
run: cargo hack --workspace --feature-powerset check
minimal-versions:
runs-on: ubuntu-latest
name: ubuntu / nightly / minimal-versions
name: ubuntu / stable / minimal-versions
steps:
- uses: actions/checkout@v4
- name: Install nightly
- name: Install stable
uses: dtolnay/rust-toolchain@stable
- name: Install nightly for -Zminimal-versions
uses: dtolnay/rust-toolchain@nightly
- name: cargo install cargo-hack
- name: Install cargo hack
uses: taiki-e/install-action@cargo-hack
- name: remove dev-deps
run: cargo hack --remove-dev-deps
- name: update to minimal deps
run: cargo update -Z direct-minimal-versions
- name: cargo check
run: cargo check --all-features
- name: Install cargo minimal-versions
uses: taiki-e/install-action@cargo-minimal-versions
- name: Install sccache-cache
uses: mozilla-actions/sccache-action@v0.0.4
- name: rustup default stable
run: rustup default stable
- name: Check minimal versions
run: cargo minimal-versions check --workspace --ignore-private --detach-path-deps=skip-exact --direct
env:
RUSTDOCFLAGS: -D warnings
RUSTFLAGS: -D warnings
msrv:
runs-on: ubuntu-latest
# we use a matrix here just because env can't be used in job names
# https://docs.github.com/en/actions/learn-github-actions/contexts#context-availability
strategy:
matrix:
msrv: [1.66.1]
msrv: [ 1.72.0 ]
name: ubuntu / ${{ matrix.msrv }}
steps:
- uses: actions/checkout@v4
- name: Install ${{ matrix.msrv }}
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.msrv }}
- name: Install sccache-cache
uses: mozilla-actions/sccache-action@v0.0.4
- name: cargo +${{ matrix.msrv }} check
run: cargo check --all-features --package edgehog-device-forwarder-proto
45 changes: 29 additions & 16 deletions rust/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions rust/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ members = [
[workspace.package]
edition = "2021"
license = "Apache-2.0"
rust-version = "1.66.1"
rust-version = "1.72.0"

[workspace.dependencies]
clap = "4.4.6"
color-eyre = "0.6.2"
prost = "0.12.1"
prost-build = "0.12.1"
prost = "0.12.0"
prost-build = "0.12.0"
3 changes: 2 additions & 1 deletion rust/rust-codegen/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ name = "rust-codegen"
version = "0.1.0"
edition = { workspace = true }
license = { workspace = true }
rust-version = { workspace = true }
publish = false
rust-version = { workspace = true }
description = "Edgehog device runtime forwarder protocol code generator for Rust"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand Down
2 changes: 1 addition & 1 deletion scripts/protoc_check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

set -eEuo pipefail

PROTOC_VERSION='24.4'
PROTOC_VERSION='26.1'
# check only major version of protoc
version=$(protoc --version | cut -d ' ' -f 2)

Expand Down

0 comments on commit beed00b

Please sign in to comment.