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

Deprecate actions-rs actions #415

Merged
merged 2 commits into from
Oct 31, 2024
Merged

Conversation

jku
Copy link
Member

@jku jku commented Oct 24, 2024

actions-rs actions are unmaintained and archived, we should not be using them. Luckily we weren't really using anything special from them: using rustup(that is part of the GitHub image) and cargo directly should give us the same results

  • Use rustup and cargo instead of specific actions
  • Use Swatinem/rust-cache to speed up builds

The second part is of course optional. I added it since

  • it does speed things up: CI is >1 min faster on wall clock and 4-5 mins faster in total jobs duration
  • doing the same thing without a 3rd party action likely leads to annoying debug situations later (rust-cache key calculation seems quite extensive)

Fixes #414

@jku jku marked this pull request as ready for review October 24, 2024 09:16
@jku
Copy link
Member Author

jku commented Oct 24, 2024

If you want to see that the cache works, re-running all CI jobs should work.

@flavio
Copy link
Member

flavio commented Oct 29, 2024

Instead of using Swatinem/rust-cache we could use the GitHub's official cache action.

Something like that should work:

      - name: Setup Cache
        uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2
        with:
          path: |
            ~/.cargo/registry
            ~/.cargo/git
            target
          key: ${{ runner.os }}-cargo-clippy-${{ hashFiles('**/Cargo.lock') }}

This is taken from here

@jku
Copy link
Member Author

jku commented Oct 29, 2024

Sure, I can do that. I wonder if that approach has issues with compiler/toolchain changes though (this is why I chose the action originally)... I suppose if we separate the nightly cache from stable cache these issues might be rare enough.

@flavio
Copy link
Member

flavio commented Oct 29, 2024

You're right. Let's stick with your original PR. Can you please rebase it against the main branch?

jku added 2 commits October 29, 2024 13:16

Verified

This commit was created on github.com and signed with GitHub’s verified signature.
The functionality should stay similar.

Note that GitHub does have some tools installed already (like rustfmt)
outside of rustup so it's a little unclear which versions cargo ends up
using... Again, situation should remain same as it was with actions-rs.

Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
Use caching everywhere to avoid downloads and dependency compiles. As an
exception, avoid this during publish to make sure cache poisoning is never
an issue).

Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
@jku jku force-pushed the deprecate-actions-rs branch from 935f1bd to dc31a17 Compare October 29, 2024 11:17
@jku
Copy link
Member Author

jku commented Oct 29, 2024

rebased on main, no other changes

@flavio flavio merged commit 7ea2318 into sigstore:main Oct 31, 2024
7 checks passed
flavio added a commit to flavio/sigstore-rs that referenced this pull request Feb 6, 2025
== What's Changed
* cosign: Allow use of regex in CertSubjectEmailVerifier by @dave-tucker in sigstore#300
* build(deps): bump rustsec/audit-check from 1.4.1 to 2.0.0 by @dependabot in sigstore#396
* build(deps): bump actions/checkout from 4.1.7 to 4.2.0 by @dependabot in sigstore#397
* build(deps): update rstest requirement from 0.22 to 0.23 by @dependabot in sigstore#399
* build(deps): update testcontainers requirement from 0.22 to 0.23 by @dependabot in sigstore#398
* automation: fix GHA invoking cargo audit by @flavio in sigstore#400
* Cosign | Add support for client to configure a proxy to pull signatures by @Xynnn007 in sigstore#392
* build(deps): bump actions/checkout from 4.2.0 to 4.2.1 by @dependabot in sigstore#401
* CONTRIBUTORS.md: Add note about tests and building by @jku in sigstore#404
* cosign: fix regex dependency import by @Xynnn007 in sigstore#411
* Lint tests too by @jku in sigstore#405
* Simplify cosign verify-bundle example by @jku in sigstore#408
* Examples: Add a minimal example of bundle sign/verify by @jku in sigstore#410
* build(deps): update tough requirement from 0.18 to 0.19 by @dependabot in sigstore#407
* cosign: Make verify-blob compatible with sigstore-python by @jku in sigstore#403
* build(deps): update oci-client requirement from 0.13 to 0.14 by @dependabot in sigstore#418
* build(deps): bump actions/checkout from 4.2.1 to 4.2.2 by @dependabot in sigstore#417
* Deprecate actions-rs actions by @jku in sigstore#415
* build(deps): update cached requirement from 0.53 to 0.54 by @dependabot in sigstore#421
* build(deps): update thiserror requirement from 1.0 to 2.0 by @dependabot in sigstore#420
* build(deps): bump Swatinem/rust-cache from 2.7.5 to 2.7.7 by @dependabot in sigstore#422
* fix clippy complaint by @bobcallaway in sigstore#425
* fix zizmor issues in github actions workflows by @bobcallaway in sigstore#424
* build(deps): update rstest requirement from 0.23 to 0.24 by @dependabot in sigstore#423
* Update embedded trust root by @jku in sigstore#431
* build(deps): update sigstore_protobuf_specs requirement from 0.3 to 0.4 by @dependabot in sigstore#430
* chore(deps): upgrade openidconnect by @flavio in sigstore#433

== New Contributors
* @dave-tucker made their first contribution in sigstore#300
* @jku made their first contribution in sigstore#404

**Full Changelog**: sigstore/sigstore-rs@v0.10.0...v0.11.0

Signed-off-by: Flavio Castelli <fcastelli@suse.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

actions-rs actions are unmaintained
3 participants