Skip to content
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

Replace deprecated actions-rs/* GH Actions #133

Merged
merged 2 commits into from
Jan 22, 2024
Merged
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: 11 additions & 21 deletions .github/workflows/umbral-pre.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,10 @@ jobs:
- wasm32-unknown-unknown
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
- uses: dtolnay/rust-toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
target: ${{ matrix.target }}
override: true
targets: ${{ matrix.target }}
#- run: cp ../../Cargo.lock .. # Use same Cargo.lock resolution that's checked in
- run: cargo build --features bindings-wasm --release --target ${{ matrix.target }}

Expand All @@ -53,12 +51,10 @@ jobs:
- thumbv7em-none-eabi
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
- uses: dtolnay/rust-toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
target: ${{ matrix.target }}
override: true
targets: ${{ matrix.target }}
#- run: cp ../../Cargo.lock .. # Use same Cargo.lock resolution that's checked in
- run: cargo build --release --target ${{ matrix.target }} --no-default-features

Expand All @@ -71,7 +67,7 @@ jobs:
- stable
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- uses: dtolnay/rust-toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
Expand All @@ -89,12 +85,10 @@ jobs:

steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
- uses: dtolnay/rust-toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
target: ${{ matrix.target }}
override: true
targets: ${{ matrix.target }}
- run: ${{ matrix.deps }}
- run: cargo check --all-features
- run: cargo test --release --all-features
Expand All @@ -113,12 +107,10 @@ jobs:
python-version: ${{ matrix.python }}

- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
target: ${{ matrix.target }}
override: true
targets: ${{ matrix.target }}

- name: Install umbral_pre package
run: pip install -e .
Expand Down Expand Up @@ -153,12 +145,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
- uses: dtolnay/rust-toolchain@v1
with:
profile: minimal
toolchain: stable
target: x86_64-unknown-linux-gnu
override: true
targets: x86_64-unknown-linux-gnu
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
# Only checking the coverage of the main library,
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,9 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: actions-rs/toolchain@v1
- uses: dtolnay/rust-toolchain@v1
with:
profile: minimal
toolchain: stable
override: true

- if: runner.os == 'Windows'
run: |
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/workspace.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
- uses: dtolnay/rust-toolchain@v1
with:
toolchain: stable
components: clippy
override: true
profile: minimal
- run: cargo clippy --all --all-features --benches --tests -- -D warnings

rustfmt:
Expand All @@ -36,12 +34,10 @@ jobs:
uses: actions/checkout@v4

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@v1
with:
toolchain: stable
components: rustfmt
profile: minimal
override: true

- name: Run cargo fmt
uses: actions-rs/cargo@v1
Expand Down
2 changes: 1 addition & 1 deletion umbral-pre/src/bindings_python.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ fn hash(data: impl AsRef<[u8]>) -> i64 {
// we just need something fast that minimizes conflicts.
let digest = Sha256::new().chain(data).finalize();
let (chunk, _): (GenericArray<u8, U8>, _) = digest.split();
let arr: [u8; 8] = chunk.try_into().unwrap();
let arr: [u8; 8] = chunk.into();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just out of curiosity: is this change related to these GH Actions in some way?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's an accidental change. It's possible that clippy was updated between the previous CI run and now, and it resulted in a broken linter rule.

i64::from_be_bytes(arr)
}

Expand Down
Loading