Skip to content
Merged

Cache #253

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 29 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:

env:
RUST_BACKTRACE: 1
CARGO_PROFILE_DEV_DEBUG: 0

jobs:
test:
Expand All @@ -26,7 +27,8 @@ jobs:
with:
toolchain: ${{ matrix.rust }}

- uses: actions/cache@v5
- uses: actions/cache/restore@v5
name: Cache crates.io
with:
path: |
~/.cargo/registry/index
Expand All @@ -38,12 +40,18 @@ jobs:
cargo update -p time --precise 0.3.41
cargo update -p time-core --precise 0.1.4

- name: Run cargo test
run: cargo test --all-features --all
- uses: actions/cache@v5
name: Cache build dir
with:
path: target
key: tests-${{ runner.os }}-${{ matrix.rust }}-${{ hashFiles('Cargo.lock') }}

- name: Check default features
run: cargo check --all

- name: Run cargo test
run: cargo test --all-features --all

lints:
name: Lints and Breaking Changes
runs-on: macos-latest
Expand All @@ -59,6 +67,7 @@ jobs:
components: clippy, rustfmt

- uses: actions/cache@v5
name: Cache crates.io
with:
path: |
~/.cargo/registry/index
Expand All @@ -68,6 +77,14 @@ jobs:
- name: DO NOT USE RUSTFMT
run: "if cargo fmt --quiet --check -- --config-path=/dev/null; then echo >&2 'Do not reformat the code with rustfmt. This project does not use rustfmt.'; fi"

- run: cargo generate-lockfile

- uses: actions/cache@v5
name: Cache build dir
with:
path: target
key: lints-${{ runner.os }}-${{ matrix.rust }}-${{ hashFiles('Cargo.lock') }}

- name: SemVer check
uses: obi1kenobi/cargo-semver-checks-action@v2

Expand All @@ -88,12 +105,21 @@ jobs:
target: aarch64-apple-ios,x86_64-apple-darwin

- uses: actions/cache/restore@v5
name: Cache crates.io
with:
path: |
~/.cargo/registry/index
~/.cargo/registry/cache
key: cratesio-${{ runner.os }}-${{ hashFiles('Cargo.toml') }}

- run: cargo generate-lockfile

- uses: actions/cache@v5
name: Cache build dir
with:
path: target
key: lints-${{ runner.os }}-${{ matrix.rust }}-${{ hashFiles('Cargo.lock') }}

- name: Run check iOS
run: cargo check --all-features -p security-framework --target aarch64-apple-ios

Expand Down
6 changes: 4 additions & 2 deletions security-framework/src/os/macos/import_export.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ use crate::key::SecKey;
use crate::os::macos::access::SecAccess;
use crate::os::macos::keychain::SecKeychain;

// TODO: deprecate
#[doc(hidden)]
#[deprecated(note = "Obsolete. Use Pkcs12ImportOptions directly.")]
/// Obsolete. Use Pkcs12ImportOptions directly.
pub trait Pkcs12ImportOptionsExt {
/// Specifies the keychain in which to import the identity.
Expand All @@ -30,11 +29,14 @@ pub trait Pkcs12ImportOptionsExt {
fn access(&mut self, access: SecAccess) -> &mut Self;
}

#[allow(deprecated)]
impl Pkcs12ImportOptionsExt for Pkcs12ImportOptions {
/// Moved to Pkcs12ImportOptions. Remove Pkcs12ImportOptionsExt trait.
fn keychain(&mut self, keychain: SecKeychain) -> &mut Self {
Self::keychain(self, keychain)
}

/// Moved to Pkcs12ImportOptions. Remove Pkcs12ImportOptionsExt trait.
fn access(&mut self, access: SecAccess) -> &mut Self {
Self::access(self, access)
}
Expand Down
Loading