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

fix(actions): use rust-cache action #1974

Merged
merged 1 commit into from
Jul 14, 2022
Merged
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
65 changes: 16 additions & 49 deletions .github/workflows/sqlx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,10 @@ jobs:
toolchain: stable
override: true

- uses: actions/cache@v2
- uses: Swatinem/rust-cache@v1
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-check-${{ matrix.runtime }}-${{ matrix.tls }}-${{ hashFiles('**/Cargo.lock') }}

key: ${{ runner.os }}-check-${{ matrix.runtime }}-${{ matrix.tls }}

- uses: actions-rs/cargo@v1
with:
command: check
Expand Down Expand Up @@ -82,13 +78,9 @@ jobs:
toolchain: stable
override: true

- uses: actions/cache@v2
- uses: Swatinem/rust-cache@v1
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-test-${{ hashFiles('**/Cargo.lock') }}
key: ${{ runner.os }}-test

- uses: actions-rs/cargo@v1
with:
Expand Down Expand Up @@ -127,13 +119,9 @@ jobs:
target: ${{ matrix.target }}
override: true

- uses: actions/cache@v2
- uses: Swatinem/rust-cache@v1
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cli-${{ hashFiles('**/Cargo.lock') }}
key: ${{ runner.os }}-cli

- uses: actions-rs/cargo@v1
with:
Expand Down Expand Up @@ -162,13 +150,9 @@ jobs:
toolchain: stable
override: true

- uses: actions/cache@v2
- uses: Swatinem/rust-cache@v1
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-sqlite-${{ matrix.runtime }}-${{ matrix.tls }}-${{ hashFiles('**/Cargo.lock') }}
key: ${{ runner.os }}-sqlite-${{ matrix.runtime }}-${{ matrix.tls }}

- uses: actions-rs/cargo@v1
with:
Expand Down Expand Up @@ -199,13 +183,9 @@ jobs:
toolchain: stable
override: true

- uses: actions/cache@v2
- uses: Swatinem/rust-cache@v1
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-postgres-${{ matrix.runtime }}-${{ matrix.tls }}-${{ hashFiles('**/Cargo.lock') }}
key: ${{ runner.os }}-postgres-${{ matrix.runtime }}-${{ matrix.tls }}

- uses: actions-rs/cargo@v1
env:
Expand Down Expand Up @@ -263,13 +243,9 @@ jobs:
toolchain: stable
override: true

- uses: actions/cache@v2
- uses: Swatinem/rust-cache@v1
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-mysql-${{ matrix.runtime }}-${{ matrix.tls }}-${{ hashFiles('**/Cargo.lock') }}
key: ${{ runner.os }}-mysql-${{ matrix.runtime }}-${{ matrix.tls }}

- uses: actions-rs/cargo@v1
with:
Expand Down Expand Up @@ -307,14 +283,9 @@ jobs:
toolchain: stable
override: true

# same Cargo features as MySQL so the same cache can be used
- uses: actions/cache@v2
- uses: Swatinem/rust-cache@v1
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-mysql-${{ matrix.runtime }}-${{ matrix.tls }}-${{ hashFiles('**/Cargo.lock') }}
key: ${{ runner.os }}-mysql-${{ matrix.runtime }}-${{ matrix.tls }}

- uses: actions-rs/cargo@v1
with:
Expand Down Expand Up @@ -352,12 +323,8 @@ jobs:
toolchain: stable
override: true

- uses: actions/cache@v2
- uses: Swatinem/rust-cache@v1
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-mssql-${{ matrix.runtime }}-${{ matrix.tls }}-${{ hashFiles('**/Cargo.lock') }}

- uses: actions-rs/cargo@v1
Expand Down