-
Notifications
You must be signed in to change notification settings - Fork 278
ci: drop really old trick and ensure MSRV for all feature combo #676
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
Changes from 5 commits
e52ac8d
26f6625
f1372a8
2cac1dd
828abbc
6eb2731
28026bf
d70c00c
5932509
5173090
faca8cb
6f4bab1
b9c84e8
50c2018
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,101 +1,77 @@ | ||
| name: CI | ||
| on: [push, pull_request] | ||
|
|
||
| permissions: | ||
| contents: read # to fetch code (actions/checkout) | ||
|
|
||
| jobs: | ||
| test: | ||
| name: Test | ||
| runs-on: ${{ matrix.os }} | ||
| strategy: | ||
| matrix: | ||
| build: [stable, beta, nightly, macos, win32, win64, mingw] | ||
| include: | ||
| - build: stable | ||
| os: ubuntu-latest | ||
| os: ubuntu-24.04 | ||
| rust: stable | ||
| - build: beta | ||
| os: ubuntu-latest | ||
| os: ubuntu-24.04 | ||
| rust: beta | ||
| - build: nightly | ||
| os: ubuntu-latest | ||
| os: ubuntu-24.04 | ||
| rust: nightly | ||
| - build: macos | ||
| os: macos-latest | ||
| os: macos-14 | ||
| rust: stable | ||
| - build: win32 | ||
| os: windows-latest | ||
| os: windows-2022 | ||
| rust: stable-i686-pc-windows-msvc | ||
| - build: win64 | ||
| os: windows-latest | ||
| os: windows-2022 | ||
| rust: stable-x86_64-pc-windows-msvc | ||
| - build: mingw | ||
| os: windows-latest | ||
| os: windows-2022 | ||
| rust: stable-x86_64-pc-windows-gnu | ||
| steps: | ||
| - uses: actions/checkout@master | ||
| - name: Install Rust | ||
| run: | | ||
| rustup update ${{ matrix.rust }} --no-self-update | ||
| rustup default ${{ matrix.rust }} | ||
| cargo install cargo-hack | ||
| - uses: actions/checkout@v4 | ||
| - name: Install toolchain | ||
| uses: dtolnay/rust-toolchain@master | ||
| with: | ||
| toolchain: ${{ matrix.rust }} | ||
| - uses: taiki-e/install-action@cargo-hack | ||
tisonkun marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| - run: cargo hack test --feature-powerset --lib --exclude-features max_level_off,max_level_error,max_level_warn,max_level_info,max_level_debug,max_level_trace,release_max_level_off,release_max_level_error,release_max_level_warn,release_max_level_info,release_max_level_debug,release_max_level_trace | ||
| - run: cargo run --verbose --manifest-path test_max_level_features/Cargo.toml | ||
| - run: cargo run --verbose --manifest-path test_max_level_features/Cargo.toml --release | ||
|
|
||
| rustfmt: | ||
| name: Rustfmt | ||
| runs-on: ubuntu-latest | ||
| check: | ||
| name: Check Format and Clippy | ||
| runs-on: ubuntu-24.04 | ||
| steps: | ||
| - uses: actions/checkout@master | ||
| - name: Install Rust | ||
| run: | | ||
| rustup update stable --no-self-update | ||
| rustup default stable | ||
| rustup component add rustfmt | ||
| # log repo does not use Cargo workspaces, so `cargo fmt` will not check all the code | ||
| # perhaps this should be changed in the future | ||
| - uses: actions/checkout@v4 | ||
| - uses: dtolnay/rust-toolchain@stable | ||
| with: | ||
| components: clippy,rustfmt | ||
| - run: cargo fmt -- --check | ||
| - run: cargo fmt --manifest-path test_max_level_features/Cargo.toml -- --check | ||
| - run: cargo fmt --manifest-path tests/Cargo.toml -- --check | ||
|
|
||
| clippy: | ||
| name: Clippy | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@master | ||
| - name: Install Rust | ||
| run: | | ||
| rustup update stable --no-self-update | ||
| rustup default stable | ||
| rustup component add clippy | ||
| - run: cargo clippy --verbose | ||
| - run: cargo clippy --verbose --manifest-path test_max_level_features/Cargo.toml | ||
| - run: cargo clippy --verbose --manifest-path tests/Cargo.toml | ||
|
|
||
| doc: | ||
| name: Check Documentation | ||
| runs-on: ubuntu-latest | ||
| runs-on: ubuntu-24.04 | ||
| steps: | ||
| - uses: actions/checkout@master | ||
| - name: Install Rust | ||
| run: | | ||
| rustup update stable --no-self-update | ||
| rustup default stable | ||
| rustup component add rust-docs | ||
| - uses: actions/checkout@v4 | ||
| - uses: dtolnay/rust-toolchain@stable | ||
| with: | ||
| components: rust-docs | ||
| - name: Run rustdoc | ||
| run: RUSTDOCFLAGS="-D warnings" cargo doc --verbose --features std,serde,sval,sval_ref,value-bag,kv,kv_std,kv_sval,kv_serde | ||
| env: | ||
| RUSTDOCFLAGS: "-D warnings" | ||
| run: cargo doc --verbose --features std,serde,sval,sval_ref,value-bag,kv,kv_std,kv_sval,kv_serde | ||
|
|
||
| features: | ||
| name: Feature check | ||
| runs-on: ubuntu-latest | ||
| runs-on: ubuntu-24.04 | ||
| steps: | ||
| - uses: actions/checkout@master | ||
| - name: Install Rust | ||
| run: | | ||
| rustup update nightly --no-self-update | ||
| rustup default nightly | ||
| - uses: actions/checkout@v4 | ||
| - uses: dtolnay/rust-toolchain@nightly | ||
| - run: cargo build --verbose -Z avoid-dev-deps --features kv | ||
| - run: cargo build --verbose -Z avoid-dev-deps --features "kv std" | ||
| - run: cargo build --verbose -Z avoid-dev-deps --features "kv kv_sval" | ||
|
|
@@ -105,13 +81,10 @@ jobs: | |
|
|
||
| minimalv: | ||
| name: Minimal versions | ||
| runs-on: ubuntu-latest | ||
| runs-on: ubuntu-24.04 | ||
| steps: | ||
| - uses: actions/checkout@master | ||
| - name: Install Rust | ||
| run: | | ||
| rustup update nightly --no-self-update | ||
| rustup default nightly | ||
| - uses: actions/checkout@v4 | ||
| - uses: dtolnay/rust-toolchain@nightly | ||
| - run: cargo build --verbose -Z minimal-versions --features kv | ||
| - run: cargo build --verbose -Z minimal-versions --features "kv std" | ||
| - run: cargo build --verbose -Z minimal-versions --features "kv kv_sval" | ||
|
|
@@ -121,26 +94,24 @@ jobs: | |
|
|
||
| msrv: | ||
| name: MSRV | ||
| runs-on: ubuntu-latest | ||
| runs-on: ubuntu-24.04 | ||
tisonkun marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| steps: | ||
| - uses: actions/checkout@master | ||
| - name: Install Rust | ||
| run: | | ||
| rustup update 1.60.0 --no-self-update | ||
| rustup default 1.60.0 | ||
| - run: | | ||
| cargo test --verbose --manifest-path tests/Cargo.toml | ||
| cargo test --verbose --manifest-path tests/Cargo.toml --features kv | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Previously we check MSRV only for a subset.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If we agree that MSRV is only valid for no feature / with kv, I can revert the test targets and undo MSRV -> 1.61 and the sval PR is unnecessary.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Previously we only applied it to a subset, but now that the key-value API is stable I’m happy to add one for it. What do you think @Thomasdezeeuw?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for your information! I'd emphasize that ensuring MSRV for sval/serde would require bumping MSRV to 1.61, mainly for const fn. You may take it into consideration whether it's possible, since I see:
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we haven't done an MSRV bump in some time, so it should be safe to move up to
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Technically a MSRV bump is a breaking change, but since 1.61 came out in May 2022, I think it's fine we increase it.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't know why you say it is "technically" a breaking change. The See also: https://doc.rust-lang.org/cargo/reference/rust-version.html#setting-and-updating-rust-version
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure why you're questioning whether or not bumping MSRV is a breaking change or not. It is. If I run Rust 1.60 then I can run log 0.4.26, but not 0.4.27, that's a breaking change. Whether or not it's allowed by our own policy is a different question.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The topic has been discussed to death. Search the libs team repo or the api guidelines repo. I'm on mobile or I would link you. Increasing toolchain requirements is broadly not considered a breaking change. |
||
| - uses: actions/checkout@v4 | ||
| - name: Install toolchain | ||
| uses: dtolnay/rust-toolchain@master | ||
| with: | ||
| toolchain: 1.61.0 | ||
| - uses: taiki-e/install-action@cargo-hack | ||
| - run: cargo hack test --feature-powerset --lib --exclude-features max_level_off,max_level_error,max_level_warn,max_level_info,max_level_debug,max_level_trace,release_max_level_off,release_max_level_error,release_max_level_warn,release_max_level_info,release_max_level_debug,release_max_level_trace | ||
| - run: cargo run --verbose --manifest-path test_max_level_features/Cargo.toml | ||
| - run: cargo run --verbose --manifest-path test_max_level_features/Cargo.toml --release | ||
|
|
||
| embedded: | ||
| name: Embedded | ||
| runs-on: ubuntu-latest | ||
| runs-on: ubuntu-24.04 | ||
| steps: | ||
| - uses: actions/checkout@master | ||
| - name: Install Rust | ||
| run: | | ||
| rustup update stable --no-self-update | ||
| rustup default stable | ||
| - uses: actions/checkout@v4 | ||
| - uses: dtolnay/rust-toolchain@stable | ||
| - run: rustup target add thumbv6m-none-eabi riscv32imc-unknown-none-elf | ||
| - run: cargo build --verbose --target=thumbv6m-none-eabi | ||
| - run: cargo build --verbose --target=riscv32imc-unknown-none-elf | ||
This file was deleted.
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yak shaving from here .. even from rustc 1.60.0 we don't need this trick I think.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Glad to see this get cleaned up! I think we were previously only testing these in our MSRV job. To get them working this way we may need to pull that
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do you provide any change here? Cargo would detect See https://doc.rust-lang.org/book/ch11-03-test-organization.html#integration-tests |
This file was deleted.
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.