Skip to content

Commit

Permalink
fix: Merge skew and MSRV workflow (#331)
Browse files Browse the repository at this point in the history
* start, fix merge skew

* bump msrv CI workflow

* fix xplat targets
  • Loading branch information
ParkMyCar authored Oct 25, 2023
1 parent 84eac94 commit 8928f86
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 12 deletions.
16 changes: 12 additions & 4 deletions .github/workflows/cross_platform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ jobs:
OS: ubuntu-latest
target: i686-unknown-linux-gnu
cross: true
- name: Linux MIPS Big Endian 32-bit
- name: Linux ARMv6 32-bit
OS: ubuntu-latest
target: mips-unknown-linux-gnu
target: arm-unknown-linux-gnueabihf
cross: true
- name: Linux MIPS Little Endian 32-bit
- name: Linux ARMv7-A 32-bit
OS: ubuntu-latest
target: mipsel-unknown-linux-gnu
target: armv7-unknown-linux-gnueabihf
cross: true
- name: Linux PowerPC Big Endian 32-bit
OS: ubuntu-latest
Expand All @@ -51,6 +51,14 @@ jobs:
OS: ubuntu-latest
target: powerpc64le-unknown-linux-gnu
cross: true
- name: Linux ARM64 Little Endian 64-bit
OS: ubuntu-latest
target: aarch64-unknown-linux-gnu
cross: true
- name: Linux PowerPC Big Endian 64-bit
OS: ubuntu-latest
target: powerpc64-unknown-linux-gnu
cross: true
name: ${{ matrix.name }}
runs-on: ${{ matrix.OS }}
steps:
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/msrv.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,19 @@ jobs:
- uses: Swatinem/rust-cache@v2

- name: cargo test msrv..
# note: we exclude both `arbitrary` and `proptest` from here because their MSRVs were both
# Note: we exclude both `arbitrary` and `proptest` from here because their MSRVs were both
# bumped on a minor version release:
#
# - abitrary >= 1.1.14 has an MSRV >= 1.63
# - proptest >= 1.1.0 has an MSRV >= 1.60
#
# Instead of pinning to a specific version of `arbitrary` or `proptest`, we'll let user's
# deps decide the version since the API should still be semver compatible
# deps decide the version since the API should still be semver compatible.
#
# Note2: Even though our MSRV is 1.59, we only test from 1.60 because we hit the issue
# described in <https://github.com/rust-lang/cargo/issues/10189> when using 1.59.
run: |
cargo hack check --features bytes,markup,quickcheck,rkyv,serde,smallvec --manifest-path=compact_str/Cargo.toml --version-range 1.59..
cargo hack check --features bytes,markup,quickcheck,rkyv,serde,smallvec --manifest-path=compact_str/Cargo.toml --version-range 1.60..
cargo hack check --features bytes,markup,quickcheck,rkyv,serde,smallvec,proptest,arbitrary --manifest-path=compact_str/Cargo.toml --version-range 1.64..
feature_powerset:
Expand Down
10 changes: 5 additions & 5 deletions compact_str/src/repr/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1069,13 +1069,13 @@ mod tests {

#[test_case(Repr::from_static_str(""), Repr::from_static_str(""); "empty clone from static")]
#[test_case(Repr::new_inline("abc"), Repr::from_static_str("efg"); "short clone from static")]
#[test_case(Repr::new("i am a longer string that will be on the heap"), Repr::from_static_str(EIGHTEEN_MB_STR); "long clone from static")]
#[test_case(Repr::new("i am a longer string that will be on the heap").unwrap(), Repr::from_static_str(EIGHTEEN_MB_STR); "long clone from static")]
#[test_case(Repr::from_static_str(""), Repr::new_inline(""); "empty clone from inline")]
#[test_case(Repr::new_inline("abc"), Repr::new_inline("efg"); "short clone from inline")]
#[test_case(Repr::new("i am a longer string that will be on the heap"), Repr::new_inline("small"); "long clone from inline")]
#[test_case(Repr::from_static_str(""), Repr::new(EIGHTEEN_MB_STR); "empty clone from heap")]
#[test_case(Repr::new_inline("abc"), Repr::new(EIGHTEEN_MB_STR); "short clone from heap")]
#[test_case(Repr::new("i am a longer string that will be on the heap"), Repr::new(EIGHTEEN_MB_STR); "long clone from heap")]
#[test_case(Repr::new("i am a longer string that will be on the heap").unwrap(), Repr::new_inline("small"); "long clone from inline")]
#[test_case(Repr::from_static_str(""), Repr::new(EIGHTEEN_MB_STR).unwrap(); "empty clone from heap")]
#[test_case(Repr::new_inline("abc"), Repr::new(EIGHTEEN_MB_STR).unwrap(); "short clone from heap")]
#[test_case(Repr::new("i am a longer string that will be on the heap").unwrap(), Repr::new(EIGHTEEN_MB_STR).unwrap(); "long clone from heap")]
fn test_clone_from(mut initial: Repr, source: Repr) {
initial.clone_from(&source);
assert_eq!(initial.as_str(), source.as_str());
Expand Down

0 comments on commit 8928f86

Please sign in to comment.