Skip to content

Commit

Permalink
Merge pull request #123 from HdrHistogram/bump-ci
Browse files Browse the repository at this point in the history
Bump ci
  • Loading branch information
jonhoo committed Mar 20, 2023
2 parents 8c4ce2d + dd630d7 commit d56b823
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 55 deletions.
25 changes: 10 additions & 15 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
permissions:
contents: read
on:
push:
branches: [main]
Expand All @@ -16,13 +18,13 @@ jobs:
with:
components: rustfmt
- name: cargo fmt --check
uses: actions-rs/cargo@v1
with:
command: fmt
args: --check
run: cargo fmt --check
clippy:
runs-on: ubuntu-latest
name: ${{ matrix.toolchain }} / clippy
permissions:
contents: read
checks: write
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -50,10 +52,7 @@ jobs:
- name: Install nightly
uses: dtolnay/rust-toolchain@nightly
- name: cargo doc
uses: actions-rs/cargo@v1
with:
command: doc
args: --no-deps --all-features
run: cargo doc --no-deps --all-features
env:
RUSTDOCFLAGS: --cfg docsrs
hack:
Expand All @@ -67,11 +66,9 @@ jobs:
uses: dtolnay/rust-toolchain@stable
- 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
uses: actions-rs/cargo@v1
with:
command: hack
args: --feature-powerset --exclude-features bench_private check
run: cargo hack --feature-powerset --exclude-features bench_private check
msrv:
runs-on: ubuntu-latest
# we use a matrix here just because env can't be used in job names
Expand All @@ -89,6 +86,4 @@ jobs:
with:
toolchain: ${{ matrix.msrv }}
- name: cargo +${{ matrix.msrv }} check
uses: actions-rs/cargo@v1
with:
command: check
run: cargo check
20 changes: 6 additions & 14 deletions .github/workflows/scheduled.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
permissions:
contents: read
on:
push:
branches: [main]
Expand All @@ -18,14 +20,9 @@ jobs:
uses: dtolnay/rust-toolchain@nightly
- name: cargo generate-lockfile
if: hashFiles('Cargo.lock') == ''
uses: actions-rs/cargo@v1
with:
command: generate-lockfile
run: cargo generate-lockfile
- name: cargo test --locked
uses: actions-rs/cargo@v1
with:
command: test
args: --locked --all-features --all-targets
run: cargo test --locked --all-features --all-targets
# https://twitter.com/alcuadrado/status/1571291687837732873
update:
runs-on: ubuntu-latest
Expand All @@ -43,14 +40,9 @@ jobs:
uses: dtolnay/rust-toolchain@beta
- name: cargo update
if: hashFiles('Cargo.lock') != ''
uses: actions-rs/cargo@v1
with:
command: update
run: cargo update
- name: cargo test
if: hashFiles('Cargo.lock') != ''
uses: actions-rs/cargo@v1
with:
command: test
args: --locked
run: cargo test --locked
env:
RUSTFLAGS: -D deprecated
35 changes: 9 additions & 26 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
permissions:
contents: read
on:
push:
branches: [main]
Expand All @@ -20,15 +22,10 @@ jobs:
toolchain: ${{ matrix.toolchain }}
- name: cargo generate-lockfile
if: hashFiles('Cargo.lock') == ''
uses: actions-rs/cargo@v1
with:
command: generate-lockfile
run: cargo generate-lockfile
# https://twitter.com/jonhoo/status/1571290371124260865
- name: cargo test --locked
uses: actions-rs/cargo@v1
with:
command: test
args: --locked
run: cargo test --locked
minimal:
runs-on: ubuntu-latest
name: ubuntu / stable / minimal-versions
Expand All @@ -43,16 +40,9 @@ jobs:
- name: rustup default stable
run: rustup default stable
- name: cargo update -Zminimal-versions
uses: actions-rs/cargo@v1
with:
command: update
toolchain: nightly
args: -Zminimal-versions
run: cargo +nightly update -Zminimal-versions
- name: cargo test
uses: actions-rs/cargo@v1
with:
command: test
args: --locked
run: cargo test --locked
os-check:
runs-on: ${{ matrix.os }}
name: ${{ matrix.os }} / stable
Expand All @@ -68,14 +58,9 @@ jobs:
uses: dtolnay/rust-toolchain@stable
- name: cargo generate-lockfile
if: hashFiles('Cargo.lock') == ''
uses: actions-rs/cargo@v1
with:
command: generate-lockfile
run: cargo generate-lockfile
- name: cargo test
uses: actions-rs/cargo@v1
with:
command: test
args: --locked
run: cargo test --locked
coverage:
runs-on: ubuntu-latest
name: ubuntu / stable / coverage
Expand All @@ -91,9 +76,7 @@ jobs:
uses: taiki-e/install-action@cargo-llvm-cov
- name: cargo generate-lockfile
if: hashFiles('Cargo.lock') == ''
uses: actions-rs/cargo@v1
with:
command: generate-lockfile
run: cargo generate-lockfile
- name: cargo llvm-cov
run: cargo llvm-cov --locked --lcov --output-path lcov.info
- name: Upload to codecov.io
Expand Down

0 comments on commit d56b823

Please sign in to comment.