From 8928f86f2a7a55f19e8aa4de9916416214ab6202 Mon Sep 17 00:00:00 2001 From: Parker Timmerman Date: Wed, 25 Oct 2023 09:53:25 -0400 Subject: [PATCH] fix: Merge skew and MSRV workflow (#331) * start, fix merge skew * bump msrv CI workflow * fix xplat targets --- .github/workflows/cross_platform.yml | 16 ++++++++++++---- .github/workflows/msrv.yml | 9 ++++++--- compact_str/src/repr/mod.rs | 10 +++++----- 3 files changed, 23 insertions(+), 12 deletions(-) diff --git a/.github/workflows/cross_platform.yml b/.github/workflows/cross_platform.yml index a8d44b88..a1ae664b 100644 --- a/.github/workflows/cross_platform.yml +++ b/.github/workflows/cross_platform.yml @@ -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 @@ -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: diff --git a/.github/workflows/msrv.yml b/.github/workflows/msrv.yml index 98396d99..e503ab8a 100644 --- a/.github/workflows/msrv.yml +++ b/.github/workflows/msrv.yml @@ -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 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: diff --git a/compact_str/src/repr/mod.rs b/compact_str/src/repr/mod.rs index 9e42e74d..f24ed18d 100644 --- a/compact_str/src/repr/mod.rs +++ b/compact_str/src/repr/mod.rs @@ -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());