forked from actix/actix
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
63 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,24 +30,20 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup mold linker | ||
if: matrix.target.os == 'ubuntu-latest' | ||
uses: rui314/setup-mold@v1 | ||
|
||
- name: Install Rust | ||
uses: actions-rust-lang/[email protected] | ||
with: | ||
toolchain: ${{ matrix.version }} | ||
|
||
- name: Install cargo-hack | ||
- name: Install just, cargo-hack, cargo-nextest | ||
uses: taiki-e/install-action@v2 | ||
with: | ||
tool: cargo-hack | ||
|
||
- name: Install cargo-nextest | ||
uses: taiki-e/[email protected] | ||
with: | ||
tool: cargo-nextest | ||
|
||
- name: Check minimal | ||
run: cargo hack --clean-per-run check --workspace --no-default-features | ||
tool: just,cargo-hack,cargo-nextest | ||
|
||
- name: Tests | ||
run: cargo nextest run --workspace --all-features --no-fail-fast | ||
run: just test | ||
timeout-minutes: 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,13 @@ concurrency: | |
cancel-in-progress: true | ||
|
||
jobs: | ||
msrv: | ||
name: Read MSRV | ||
uses: actions-rust-lang/msrv/.github/workflows/[email protected] | ||
|
||
test: | ||
needs: msrv | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
|
@@ -26,7 +32,7 @@ jobs: | |
- { name: macOS, os: macos-latest, triple: x86_64-apple-darwin } | ||
- { name: Windows, os: windows-latest, triple: x86_64-pc-windows-msvc } | ||
version: | ||
- { name: msrv, version: 1.68.0 } | ||
- { name: msrv, version: "${{ needs.msrv.outputs.msrv }}" } | ||
- { name: stable, version: stable } | ||
|
||
name: ${{ matrix.target.name }} / ${{ matrix.version.name }} | ||
|
@@ -35,26 +41,26 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup mold linker | ||
if: matrix.target.os == 'ubuntu-latest' | ||
uses: rui314/setup-mold@v1 | ||
|
||
- name: Install Rust (${{ matrix.version.name }}) | ||
uses: actions-rust-lang/[email protected] | ||
with: | ||
toolchain: ${{ matrix.version.version }} | ||
|
||
- name: Install cargo-hack, cargo-nextest | ||
- name: Install just, cargo-hack, cargo-nextest | ||
uses: taiki-e/[email protected] | ||
with: | ||
tool: cargo-hack,cargo-nextest | ||
tool: just,cargo-hack,cargo-nextest | ||
|
||
- name: workaround MSRV issues | ||
- name: Workaround MSRV issues | ||
if: matrix.version.name == 'msrv' | ||
run: | | ||
cargo update -p=trybuild --precise=1.0.89 | ||
- name: Check minimal | ||
run: cargo hack --clean-per-run check --workspace --no-default-features | ||
run: just downgrade-for-msrv | ||
|
||
- name: Tests | ||
run: cargo nextest run --workspace --all-features --no-fail-fast | ||
run: just test | ||
timeout-minutes: 10 | ||
|
||
doc_test: | ||
|
@@ -69,6 +75,11 @@ jobs: | |
with: | ||
toolchain: nightly | ||
|
||
- name: Install just | ||
uses: taiki-e/[email protected] | ||
with: | ||
tool: just | ||
|
||
- name: Test documentation | ||
run: cargo test --workspace --doc --all-features --no-fail-fast | ||
run: just test-docs | ||
timeout-minutes: 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
msrv := ``` | ||
cargo metadata --format-version=1 \ | ||
| jq -r 'first(.packages[] | select(.source == null and .rust_version)) | .rust_version' \ | ||
| sed -E 's/^1\.([0-9]{2})$/1\.\1\.0/' | ||
``` | ||
msrv_rustup := "+" + msrv | ||
|
||
# Downgrade dev-dependencies necessary to run MSRV checks/tests. | ||
[private] | ||
downgrade-for-msrv: | ||
@ echo "No MSRV downgrades currently required." | ||
# cargo update -p=trybuild --precise=1.0.89 | ||
|
||
# Test workspace using MSRV. | ||
test-msrv: downgrade-for-msrv (test msrv_rustup) | ||
|
||
# Test workspace code. | ||
test toolchain="": | ||
cargo {{ toolchain }} test -p=actix_derive --lib --tests --all-features | ||
cargo {{ toolchain }} nextest run --workspace --exclude=actix_derive --no-default-features | ||
cargo {{ toolchain }} nextest run --workspace --exclude=actix_derive --all-features | ||
|
||
# Test workspace docs. | ||
test-docs toolchain="": && doc | ||
cargo {{ toolchain }} test --doc --workspace --all-features --no-fail-fast -- --nocapture | ||
|
||
# Document crates in workspace. | ||
doc *args: | ||
RUSTDOCFLAGS="--cfg=docsrs -Dwarnings" cargo +nightly doc --no-deps --workspace --all-features {{ args }} | ||
|
||
# Test workspace. | ||
test-all toolchain="": (test toolchain) (test-docs toolchain) |