Skip to content
This repository has been archived by the owner on Feb 8, 2025. It is now read-only.

Commit

Permalink
Merge pull request #9 from jonhoo/ci-bump
Browse files Browse the repository at this point in the history
Ci bump
  • Loading branch information
jonhoo authored Sep 9, 2023
2 parents 6b0a00f + 54f2568 commit 89bcce9
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 67 deletions.
41 changes: 20 additions & 21 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,40 @@
permissions:
contents: read
on:
push:
branches: [main]
pull_request:
# Spend CI time only on latest ref: https://github.com/jonhoo/rust-ci-conf/pull/5
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
name: check
jobs:
fmt:
runs-on: ubuntu-latest
name: stable / fmt
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true
- name: Install stable
uses: dtolnay/rust-toolchain@stable
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:
toolchain: [stable, beta]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true
- name: Install ${{ matrix.toolchain }}
Expand All @@ -44,51 +50,44 @@ jobs:
runs-on: ubuntu-latest
name: nightly / doc
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true
- 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:
runs-on: ubuntu-latest
name: ubuntu / stable / features
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true
- name: Install stable
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 check --lib --tests
run: cargo hack --feature-powerset check
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.42.0]
msrv: ["1.42.0"]
name: ubuntu / ${{ matrix.msrv }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true
- name: Install ${{ matrix.msrv }}
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.msrv }}
- name: cargo +${{ matrix.msrv }} check
uses: actions-rs/cargo@v1
with:
command: check
run: cargo check
28 changes: 12 additions & 16 deletions .github/workflows/scheduled.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,32 @@
permissions:
contents: read
on:
push:
branches: [main]
pull_request:
schedule:
- cron: '7 7 * * *'
# Spend CI time only on latest ref: https://github.com/jonhoo/rust-ci-conf/pull/5
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
name: rolling
jobs:
# https://twitter.com/mycoliza/status/1571295690063753218
nightly:
runs-on: ubuntu-latest
name: ubuntu / nightly
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true
- name: Install nightly
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 @@ -35,22 +36,17 @@ jobs:
# Unfortunately, hashFiles only works in if on steps, so we reepeat it.
# if: hashFiles('Cargo.lock') != ''
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true
- name: Install beta
if: hashFiles('Cargo.lock') != ''
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 --all-features --all-targets
run: cargo test --locked --all-features --all-targets
env:
RUSTFLAGS: -D deprecated
53 changes: 23 additions & 30 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
permissions:
contents: read
on:
push:
branches: [main]
pull_request:
# Spend CI time only on latest ref: https://github.com/jonhoo/rust-ci-conf/pull/5
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
name: test
jobs:
required:
Expand All @@ -11,7 +17,7 @@ jobs:
matrix:
toolchain: [stable, beta]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true
- name: Install ${{ matrix.toolchain }}
Expand All @@ -20,20 +26,15 @@ 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 --all-features
run: cargo test --locked --all-features
minimal:
runs-on: ubuntu-latest
name: ubuntu / stable / minimal-versions
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true
- name: Install stable
Expand All @@ -43,16 +44,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 --all-features
run: cargo test --locked --all-features
os-check:
runs-on: ${{ matrix.os }}
name: ${{ matrix.os }} / stable
Expand All @@ -61,26 +55,27 @@ jobs:
matrix:
os: [macos-latest, windows-latest]
steps:
- uses: actions/checkout@v3
# if your project needs OpenSSL, uncommment this to fix Windows builds.
# it's commented out by default as tthe install command takes 5-10m.
# - run: echo "VCPKG_ROOT=$env:VCPKG_INSTALLATION_ROOT" | Out-File -FilePath $env:GITHUB_ENV -Append
# if: runner.os == 'Windows'
# - run: vcpkg install openssl:x64-windows-static-md
# if: runner.os == 'Windows'
- uses: actions/checkout@v4
with:
submodules: true
- name: Install stable
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 --all-features
run: cargo test --locked --all-features
coverage:
runs-on: ubuntu-latest
name: ubuntu / stable / coverage
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true
- name: Install stable
Expand All @@ -91,9 +86,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 --all-features --lcov --output-path lcov.info
- name: Upload to codecov.io
Expand Down

0 comments on commit 89bcce9

Please sign in to comment.