Skip to content

Commit

Permalink
merge master and update workflow to skip std on cross-compile
Browse files Browse the repository at this point in the history
  • Loading branch information
bhesh committed Nov 17, 2023
2 parents 37ab4a6 + c61f066 commit 0dc174c
Show file tree
Hide file tree
Showing 35 changed files with 484 additions and 270 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/cms.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ jobs:
uses: RustCrypto/actions/.github/workflows/minimal-versions.yml@master
with:
working-directory: ${{ github.workflow }}
# TODO: re-enable benches build when min version of proc-macro2
# will be updated to 1.0.60+
nightly_cmd:

test:
runs-on: ubuntu-latest
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/pkcs12.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ jobs:
uses: RustCrypto/actions/.github/workflows/minimal-versions.yml@master
with:
working-directory: ${{ github.workflow }}
# TODO: re-enable benches build when min version of proc-macro2
# will be updated to 1.0.60+
nightly_cmd:

test:
runs-on: ubuntu-latest
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/pkcs7.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ jobs:
uses: RustCrypto/actions/.github/workflows/minimal-versions.yml@master
with:
working-directory: ${{ github.workflow }}
# TODO: re-enable benches build when min version of proc-macro2
# will be updated to 1.0.60+
nightly_cmd:

test:
runs-on: ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/tls_codec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,4 @@ jobs:
- uses: RustCrypto/actions/cargo-hack-install@master
- run: cargo hack test --feature-powerset
- run: cargo hack test -p tls_codec_derive --feature-powerset --test encode\* --test decode\*
- run: cargo hack test -p tls_codec_derive --feature-powerset --doc
4 changes: 2 additions & 2 deletions .github/workflows/workspace.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ jobs:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.71.0
toolchain: 1.73.0
components: clippy
- run: cargo clippy --all-features
- run: cargo clippy --all --all-features --tests

doc:
runs-on: ubuntu-latest
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/x509-ocsp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,15 @@ jobs:
toolchain: ${{ matrix.rust }}
targets: ${{ matrix.target }}
- uses: RustCrypto/actions/cargo-hack-install@master
- run: cargo hack build --target ${{ matrix.target }} --feature-powerset
- run: cargo hack build --target ${{ matrix.target }} --feature-powerset --exclude-features std

minimal-versions:
uses: RustCrypto/actions/.github/workflows/minimal-versions.yml@master
with:
working-directory: ${{ github.workflow }}
# TODO: re-enable benches build when min version of proc-macro2
# will be updated to 1.0.60+
nightly_cmd:

test:
runs-on: ubuntu-latest
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/x509-tsp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ jobs:
uses: RustCrypto/actions/.github/workflows/minimal-versions.yml@master
with:
working-directory: ${{ github.workflow }}
# TODO: re-enable benches build when min version of proc-macro2
# will be updated to 1.0.60+
nightly_cmd:

test:
runs-on: ubuntu-latest
Expand Down
63 changes: 33 additions & 30 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion base32ct/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ rust-version = "1.60"

[dev-dependencies]
base32 = "0.4"
proptest = "1"
# pinned to preserve MSRV
proptest = { version = "=1.2.0", default-features = false, features = ["std"] }

[features]
alloc = []
Expand Down
3 changes: 2 additions & 1 deletion base64ct/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ rust-version = "1.60"

[dev-dependencies]
base64 = "0.21"
proptest = { version = "1", default-features = false, features = ["std"] }
# pinned to preserve MSRV
proptest = { version = "=1.2.0", default-features = false, features = ["std"] }

[features]
alloc = []
Expand Down
2 changes: 1 addition & 1 deletion cms/tests/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ fn test_build_pkcs7_scep_pkcsreq() {
values: message_type_value,
};
let mut sender_nonce_value: SetOfVec<AttributeValue> = Default::default();
let nonce = OctetString::new(*&[42; 32]).unwrap();
let nonce = OctetString::new([42; 32]).unwrap();
sender_nonce_value
.insert(Any::new(Tag::OctetString, nonce.as_bytes()).unwrap())
.unwrap();
Expand Down
5 changes: 1 addition & 4 deletions cms/tests/compressed_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,7 @@ fn reencode_compressed_data_test() {
// assemble a new ContentInfo and encode it
let ci2 = ContentInfo {
content_type: ci.content_type,
content: AnyRef::try_from(reencoded_data.as_slice())
.unwrap()
.try_into()
.unwrap(),
content: AnyRef::try_from(reencoded_data.as_slice()).unwrap().into(),
};
let reencoded_data_inci = ci2.to_der().unwrap();

Expand Down
5 changes: 1 addition & 4 deletions cms/tests/digested_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,7 @@ fn reencode_digested_data_test() {
// assemble a new ContentInfo and encode it
let ci2 = ContentInfo {
content_type: ci.content_type,
content: AnyRef::try_from(reencoded_data.as_slice())
.unwrap()
.try_into()
.unwrap(),
content: AnyRef::try_from(reencoded_data.as_slice()).unwrap().into(),
};
let reencoded_data_inci = ci2.to_der().unwrap();

Expand Down
5 changes: 1 addition & 4 deletions cms/tests/encrypted_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,7 @@ fn reencode_encrypted_data_test() {
// assemble a new ContentInfo and encode it
let ci2 = ContentInfo {
content_type: ci.content_type,
content: AnyRef::try_from(reencoded_data.as_slice())
.unwrap()
.try_into()
.unwrap(),
content: AnyRef::try_from(reencoded_data.as_slice()).unwrap().into(),
};
let reencoded_data_inci = ci2.to_der().unwrap();

Expand Down
25 changes: 5 additions & 20 deletions cms/tests/enveloped_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,7 @@ fn reencode_enveloped_data_ktri_test() {
// assemble a new ContentInfo and encode it
let ci2 = ContentInfo {
content_type: ci.content_type,
content: AnyRef::try_from(reencoded_data.as_slice())
.unwrap()
.try_into()
.unwrap(),
content: AnyRef::try_from(reencoded_data.as_slice()).unwrap().into(),
};
let reencoded_data_in_ci = ci2.to_der().unwrap();

Expand Down Expand Up @@ -180,10 +177,7 @@ fn reencode_enveloped_data_kari_test() {
// assemble a new ContentInfo and encode it
let ci2 = ContentInfo {
content_type: ci.content_type,
content: AnyRef::try_from(reencoded_data.as_slice())
.unwrap()
.try_into()
.unwrap(),
content: AnyRef::try_from(reencoded_data.as_slice()).unwrap().into(),
};
let reencoded_data_in_ci = ci2.to_der().unwrap();

Expand Down Expand Up @@ -270,10 +264,7 @@ fn reencode_enveloped_data_pwri_test() {
// assemble a new ContentInfo and encode it
let ci2 = ContentInfo {
content_type: ci.content_type,
content: AnyRef::try_from(reencoded_data.as_slice())
.unwrap()
.try_into()
.unwrap(),
content: AnyRef::try_from(reencoded_data.as_slice()).unwrap().into(),
};
let reencoded_data_in_ci = ci2.to_der().unwrap();

Expand Down Expand Up @@ -336,10 +327,7 @@ fn reencode_enveloped_data_kek_test() {
// assemble a new ContentInfo and encode it
let ci2 = ContentInfo {
content_type: ci.content_type,
content: AnyRef::try_from(reencoded_data.as_slice())
.unwrap()
.try_into()
.unwrap(),
content: AnyRef::try_from(reencoded_data.as_slice()).unwrap().into(),
};
let reencoded_data_in_ci = ci2.to_der().unwrap();

Expand Down Expand Up @@ -498,10 +486,7 @@ fn reencode_enveloped_data_multi_test() {
// assemble a new ContentInfo and encode it
let ci2 = ContentInfo {
content_type: ci.content_type,
content: AnyRef::try_from(reencoded_data.as_slice())
.unwrap()
.try_into()
.unwrap(),
content: AnyRef::try_from(reencoded_data.as_slice()).unwrap().into(),
};
let reencoded_data_in_ci = ci2.to_der().unwrap();

Expand Down
Loading

0 comments on commit 0dc174c

Please sign in to comment.