Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump dependencies and update CI #8

Merged
merged 2 commits into from
Mar 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 4 additions & 18 deletions .github/workflows/release-rust.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,25 +53,12 @@ jobs:
TARGET_FLAGS: ""

steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- uses: dtolnay/rust-toolchain@nightly
with:
targets: ${{matrix.target}}

- uses: actions/checkout@v4
- run: rustup default nightly && rustup target add ${{ matrix.target }}
- uses: Swatinem/rust-cache@v2
- name: Configure cross
if: matrix.cargo == 'cross'
run: |
cargo install cross

uses: taiki-e/install-action@cross
- name: Show commands
run: |
echo pwd:
Expand All @@ -81,7 +68,6 @@ jobs:
echo "cargo command is: ${{ matrix.cargo }}"
echo "target flags are: ${{ env.TARGET_FLAGS }}"
echo "target dir is: ${{ env.TARGET_DIR }}"

# Perform build
- name: Build binary
run: ${{ matrix.cargo }} build --release --verbose --target ${{ matrix.target }}
Expand Down
52 changes: 13 additions & 39 deletions .github/workflows/validation-rust.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,19 +50,9 @@ jobs:
env:
MAKE_DIST: "1"
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- uses: dtolnay/rust-toolchain@stable
with:
targets: ${{matrix.target}}
- uses: actions/checkout@v4
- run: rustup default 1.74 && rustup component add clippy && rustup target add ${{ matrix.target }}
- uses: Swatinem/rust-cache@v2
- name: Run clippy
run: cargo clippy --all-features --all-targets --target ${{ matrix.target }} -- -D warnings
- name: Run tests
Expand Down Expand Up @@ -153,43 +143,27 @@ jobs:
name: "Format (cargo fmt)"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt
- uses: actions/checkout@v4
- run: rustup default nightly && rustup component add rustfmt
- uses: Swatinem/rust-cache@v2
- run: cargo fmt --all -- --check

doc:
name: "Docs (cargo doc)"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- uses: dtolnay/rust-toolchain@nightly
- uses: actions/checkout@v4
- run: rustup default nightly
- uses: Swatinem/rust-cache@v2
- run: cargo doc --document-private-items

outdated:
name: Outdated
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- uses: actions/checkout@v3
- uses: dtolnay/install@cargo-outdated
- uses: actions/checkout@v4
- uses: taiki-e/install-action@v2
with:
tool: cargo-outdated
- run: cargo outdated --workspace --exit-code 1
Loading