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

Cache not working #165

Closed
utkarshgupta137 opened this issue Feb 15, 2024 · 4 comments
Closed

Cache not working #165

utkarshgupta137 opened this issue Feb 15, 2024 · 4 comments

Comments

@utkarshgupta137
Copy link

ci.yml:

  check:
    name: 'check'
    runs-on: ubuntu-latest
    if: github.event_name != 'push'
    steps:
      - uses: actions/checkout@v4
      - uses: mozilla-actions/sccache-action@v0.0.4
      - uses: dtolnay/rust-toolchain@stable
        with:
          components: clippy
      - uses: webfactory/ssh-agent@v0.9.0
        with:
          ssh-private-key: ${{ secrets.XXXX_SSH_KEY }} ${{ secrets.XXXX_SSH_KEY }}
      - uses: taiki-e/install-action@just
      - uses: baptiste0928/cargo-install@v3
        with:
          crate: cargo-cranky
      - uses: eifinger/setup-rye@v1
        with:
          enable-cache: true
      - uses: docker/setup-qemu-action@v3
        with:
          platforms: 'arm64'
      - run: |
          just install
          just check

The run basically does:

rye sync --no-lock
rye lint
rye run mypy

Run eifinger/setup-rye@v1:

  with:
    enable-cache: true
    version: latest
  env:
    CARGO_INCREMENTAL: 0
    CARGO_NET_GIT_FETCH_WITH_CLI: true
    RUSTC_WRAPPER: sccache
    RUSTFLAGS: -Dwarnings
    SCCACHE_GHA_ENABLED: true
    SCCACHE_PATH: /opt/hostedtoolcache/sccache/0.7.7/x64/sccache
    ACTIONS_CACHE_URL: https://acghubeus1.actions.githubusercontent.com/XXXXXXXXXXXXXXXXXX/
    ACTIONS_RUNTIME_TOKEN: ***
    CARGO_TERM_COLOR: always
    SSH_AUTH_SOCK: /tmp/ssh-XXXXXXRYONL9/agent.1718
    SSH_AGENT_PID: 1719
Latest version is 0.24.0
Downloading Rye from "https://github.com/mitsuhiko/rye/releases/download/0.24.0/rye-x86_64-linux.gz" ...
Extracting downloaded archive...
/usr/bin/gunzip /home/runner/work/_temp/785c558a-0255-4e63-9161-ssssssssssss.gz
/usr/bin/chmod +x /home/runner/work/_temp/785c558a-0255-4e63-9161-ssssssssssss
Installing Rye into /home/runner/work/_temp/rye_temp_home
/home/runner/work/_temp/785c558a-0255-4e63-9161-ssssssssssss self install --yes
Welcome to Rye!

This installer will install rye to /home/runner/work/_temp/rye_temp_home
This path can be changed by exporting the RYE_HOME environment variable.

Details:
  Rye Version: 0.24.0
  Platform: linux (x86_64)

Installed binary to /home/runner/work/_temp/rye_temp_home/shims/rye
Bootstrapping rye internals
Downloading cpython@3.12.1
Checking checksum
success: Downloaded cpython@3.12.1
Upgrading pip
Installing internal dependencies
Updated self-python installation at /home/runner/work/_temp/rye_temp_home/self

The rye directory /home/runner/work/_temp/rye_temp_home/shims was not detected on PATH.
It is highly recommended that you add it.
Added to PATH.
note: for this to take effect you will need to restart your shell or run this manually:

    source "/home/runner/work/_temp/rye_temp_home/env"

error: process ID out of range

Usage:
 ps [options]

 Try 'ps --help <simple|list|output|threads|misc|all>'
  or 'ps --help <s|l|o|t|m|a>'
 for additional help text.

For more details see ps(1).
For more information read https://mitsuhiko.github.io/rye/guide/installation

All done!
Moved Rye into /opt/hostedtoolcache/rye/0.24.0/x86_64
Added /opt/hostedtoolcache/rye/0.24.0/x86_64/shims to the path
Cache is not found
@eifinger
Copy link
Owner

If you run this action for the first time it will not find a cache yet. It is created in the Post step. Do you have a public workflow run you can link here?

@eifinger
Copy link
Owner

For example in this run the cache is created here: https://github.com/eifinger/setup-rye/actions/runs/7914237486/job/21603560019#step:7:6

@utkarshgupta137
Copy link
Author

Actually, it is working in our test workflow, but not in our check workflow. Unfortunately, it is not a public repo or something that I can share. I'm closing for now.

@eifinger
Copy link
Owner

You can also run with debug logging enabled to get more information what is happening

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

No branches or pull requests

2 participants