Skip to content

Commit

Permalink
Fix GitHub deprecation warnings (#704)
Browse files Browse the repository at this point in the history
  • Loading branch information
nwagner84 committed Sep 30, 2023
1 parent 24e229d commit 9893f2f
Show file tree
Hide file tree
Showing 5 changed files with 122 additions and 210 deletions.
207 changes: 72 additions & 135 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: abbbi/github-actions-tune@v1
- uses: actions/cache@v2
- uses: actions/cache@v3
with:
key: ${{ env.CACHE_KEY }}-${{ hashFiles('**/Cargo.toml') }}
path: |
Expand All @@ -39,16 +39,9 @@ jobs:
~/.cargo/registry/cache/
~/.cargo/registry/index/
target/
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
target: x86_64-unknown-linux-gnu
profile: minimal
override: true
- uses: actions-rs/cargo@v1
with:
command: check
args: --workspace
- uses: dtolnay/rust-toolchain@nightly
- run: |
make check
test:
name: test ${{ matrix.target.triple }} (${{ matrix.target.toolchain }})
Expand All @@ -66,10 +59,10 @@ jobs:
- { os: windows-latest, toolchain: stable, triple: i686-pc-windows-msvc }
runs-on: ${{ matrix.target.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: abbbi/github-actions-tune@v1
if: ${{ matrix.target.os == 'ubuntu-latest' }}
- uses: actions/cache@v2
- uses: actions/cache@v3
with:
key: ${{ runner.os }}-cargo-${{ matrix.target.toolchain }}-${{ matrix.target.triple }}-${{ hashFiles('**/Cargo.toml') }}
path: |
Expand All @@ -78,18 +71,14 @@ jobs:
~/.cargo/registry/cache/
~/.cargo/registry/index/
target/
- uses: actions-rs/toolchain@v1
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.target.toolchain }}
target: ${{ matrix.target.triple }}
profile: minimal
override: true
targets: ${{ matrix.target.triple }}
- name: "Run prepare tests"
run: ci/prepare-tests.sh
- uses: actions-rs/cargo@v1
with:
command: test
args: --workspace --all-features --no-fail-fast
- run: |
make test
cross:
if: ${{ github.event_name == 'push' || !github.event.pull_request.draft }}
Expand All @@ -106,10 +95,10 @@ jobs:
- { os: ubuntu-latest, toolchain: stable, triple: aarch64-unknown-linux-gnu }
- { os: ubuntu-latest, toolchain: stable, triple: aarch64-unknown-linux-musl }
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: abbbi/github-actions-tune@v1
if: ${{ matrix.target.os == 'ubuntu-latest' }}
- uses: actions/cache@v2
- uses: actions/cache@v3
with:
key: ${{ runner.os }}-cargo-cross-${{ matrix.target.toolchain }}-${{ matrix.target.triple }}-${{ hashFiles('**/Cargo.toml') }}
path: |
Expand All @@ -118,17 +107,14 @@ jobs:
~/.cargo/registry/cache/
~/.cargo/registry/index/
target/
- uses: actions-rs/toolchain@v1
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.target.toolchain }}
target: ${{ matrix.target.triple }}
profile: minimal
override: true
- uses: actions-rs/cargo@v1
with:
use-cross: true
command: build
args: --workspace --all-features
targets: ${{ matrix.target.triple }}
- name: "Install cross"
run: cargo install -f cross
- run: |
cross build --target ${{ matrix.target.triple }}
fuzz:
if: ${{ github.event_name == 'push' || !github.event.pull_request.draft }}
Expand All @@ -141,9 +127,9 @@ jobs:
- { name: record_ref, fuzz-dir: crates/pica-record/fuzz, target: fuzz_record_ref, max-total-time: 300 }
- { name: select_query, fuzz-dir: crates/pica-select/fuzz, target: fuzz_query, max-total-time: 300 }
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: abbbi/github-actions-tune@v1
- uses: actions/cache@v2
- uses: actions/cache@v3
with:
key: ${{ env.CACHE_KEY }}-${{ hashFiles('**/Cargo.toml') }}
path: |
Expand All @@ -152,27 +138,20 @@ jobs:
~/.cargo/registry/cache/
~/.cargo/registry/index/
target/
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
- uses: actions-rs/[email protected]
with:
crate: cargo-fuzz
version: latest
- uses: actions-rs/cargo@v1
with:
command: fuzz
args: run --fuzz-dir ${{ matrix.item.fuzz-dir }} --jobs 2 ${{ matrix.item.target }} -- -max_total_time=${{ matrix.item.max-total-time }}
- uses: dtolnay/rust-toolchain@nightly
- name: "Install cargo-fuzz"
run: |
cargo install -f cargo-fuzz
- run: |
cargo fuzz run --fuzz-dir ${{ matrix.item.fuzz-dir }} --jobs 2 ${{ matrix.item.target }} -- -max_total_time=${{ matrix.item.max-total-time }}
fmt:
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: abbbi/github-actions-tune@v1
- uses: actions/cache@v2
- uses: actions/cache@v3
with:
key: ${{ env.CACHE_KEY }}-${{ hashFiles('**/Cargo.toml') }}
path: |
Expand All @@ -181,24 +160,19 @@ jobs:
~/.cargo/registry/cache/
~/.cargo/registry/index/
target/
- uses: actions-rs/toolchain@v1
- uses: dtolnay/rust-toolchain@nightly
with:
profile: minimal
toolchain: nightly
override: true
components: rustfmt
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- run: |
cargo fmt --all -- --check
clippy:
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: abbbi/github-actions-tune@v1
- uses: actions/cache@v2
- uses: actions/cache@v3
with:
key: ${{ env.CACHE_KEY }}-${{ hashFiles('**/Cargo.toml') }}
path: |
Expand All @@ -207,25 +181,20 @@ jobs:
~/.cargo/registry/cache/
~/.cargo/registry/index/
target/
- uses: actions-rs/toolchain@v1
- uses: dtolnay/rust-toolchain@nightly
with:
profile: minimal
toolchain: nightly
override: true
components: clippy
- uses: actions-rs/cargo@v1
with:
command: clippy
args: --workspace -- -D warnings -D rust-2021-compatibility -W unreachable-pub
- run: |
cargo clippy --workspace -- -D warnings -D rust-2021-compatibility -W unreachable-pub
# udeps:
# if: ${{ github.event_name == 'push' || !github.event.pull_request.draft }}
# runs-on: ubuntu-latest
# needs: test
# steps:
# - uses: actions/checkout@v3
# - uses: actions/checkout@v4
# - uses: abbbi/github-actions-tune@v1
# - uses: actions/cache@v2
# - uses: actions/cache@v3
# with:
# key: ${{ env.CACHE_KEY }}-${{ hashFiles('**/Cargo.toml') }}
# path: |
Expand All @@ -234,28 +203,21 @@ jobs:
# ~/.cargo/registry/cache/
# ~/.cargo/registry/index/
# target/
# - uses: actions-rs/toolchain@v1
# with:
# profile: minimal
# toolchain: nightly
# override: true
# - uses: actions-rs/[email protected]
# with:
# crate: cargo-udeps
# version: latest
# - uses: actions-rs/cargo@v1
# with:
# command: udeps
# args: --workspace
# - uses: dtolnay/rust-toolchain@nightly
# - name: "Install `cargo-udeps`"
# run: |
# cargo install -f cargo-udeps
# - run: |
# cargo udeps --workspace

audit:
if: ${{ github.ref == 'refs/heads/main' }}
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: abbbi/github-actions-tune@v1
- uses: actions/cache@v2
- uses: actions/cache@v3
with:
key: ${{ env.CACHE_KEY }}-${{ hashFiles('**/Cargo.toml') }}
path: |
Expand All @@ -264,12 +226,8 @@ jobs:
~/.cargo/registry/cache/
~/.cargo/registry/index/
target/
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
- uses: actions-rs/audit-check@v1
- uses: dtolnay/rust-toolchain@nightly
- uses: rustsec/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -278,9 +236,9 @@ jobs:
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: abbbi/github-actions-tune@v1
- uses: actions/cache@v2
- uses: actions/cache@v3
with:
key: ${{ env.CACHE_KEY }}-${{ hashFiles('**/Cargo.toml') }}
path: |
Expand All @@ -289,25 +247,20 @@ jobs:
~/.cargo/registry/cache/
~/.cargo/registry/index/
target/
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
- uses: actions-rs/[email protected]
with:
crate: cargo-upgrades
version: latest
- uses: dtolnay/rust-toolchain@nightly
- name: "Install `cargo-upgrades`"
run: |
cargo install -f cargo-upgrades
- run: |
cargo upgrades
deny:
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: abbbi/github-actions-tune@v1
- uses: actions/cache@v2
- uses: actions/cache@v3
with:
key: ${{ env.CACHE_KEY }}-${{ hashFiles('**/Cargo.toml') }}
path: |
Expand All @@ -316,12 +269,7 @@ jobs:
~/.cargo/registry/cache/
~/.cargo/registry/index/
target/
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
components: clippy
- uses: dtolnay/rust-toolchain@nightly
- uses: EmbarkStudios/cargo-deny-action@v1
with:
log-level: warn
Expand All @@ -334,9 +282,8 @@ jobs:
needs: test
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install Rust
uses: dtolnay/rust-toolchain@miri
uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@miri
- run: cargo miri test --workspace --lib --verbose
env:
MIRIFLAGS: -Zmiri-strict-provenance
Expand All @@ -349,9 +296,9 @@ jobs:
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: abbbi/github-actions-tune@v1
- uses: actions/cache@v2
- uses: actions/cache@v3
with:
key: ${{ env.CACHE_KEY }}-${{ hashFiles('**/Cargo.toml') }}
path: |
Expand All @@ -360,15 +307,10 @@ jobs:
~/.cargo/registry/cache/
~/.cargo/registry/index/
target/
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
- uses: actions-rs/[email protected]
with:
version: latest
crate: mdbook
- uses: dtolnay/rust-toolchain@nightly
- name: "Install `mdbook`"
run: |
cargo install -f mdbook
- run: |
mdbook build docs/book
mdbook test docs/book
Expand All @@ -390,9 +332,9 @@ jobs:
- upgrades
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: abbbi/github-actions-tune@v1
- uses: actions/cache@v2
- uses: actions/cache@v3
with:
key: ${{ env.CACHE_KEY }}-${{ hashFiles('**/Cargo.toml') }}
path: |
Expand All @@ -401,15 +343,10 @@ jobs:
~/.cargo/registry/cache/
~/.cargo/registry/index/
target/
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
- uses: actions-rs/[email protected]
with:
version: latest
crate: mdbook
- uses: dtolnay/rust-toolchain@nightly
- name: "Install `mdbook`"
run: |
cargo install -f mdbook
- run: |
mkdir -p target/docs
cargo doc --all --no-deps --workspace --target-dir target/docs/api
Expand Down
Loading

0 comments on commit 9893f2f

Please sign in to comment.