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

[Bug]: Action randomly fails on windows #515

Open
ArtiomTr opened this issue Jan 27, 2025 · 2 comments
Open

[Bug]: Action randomly fails on windows #515

ArtiomTr opened this issue Jan 27, 2025 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@ArtiomTr
Copy link

What happened?

This action sometimes fails, when running on windows-latest. This is not stable, sometimes action fails, sometimes not, e.g.: here fails and on next commit it suddenly succeeds.

It looks like some issue with windows permissions.

Relevant log output

Run jiro4989/setup-nim-action@v2
  with:
    nim-version: 2.0.2
    nim-install-directory: .nim_runtime
    use-nightlies: false
    no-color: false
    yes: false
  env:
    C_KZG_4844_GIT_HASH: 0894e3ded53d6f85f5aa146f4fe3e80afb411b94
    JAVA_HOME: C:\hostedtoolcache\windows\Java_Temurin-Hotspot_jdk\11.0.25-9\x64
    JAVA_HOME_11_X64: C:\hostedtoolcache\windows\Java_Temurin-Hotspot_jdk\11.0.25-9\x64
Run "D:\a\_actions\jiro4989\setup-nim-action\v2/install_nim.sh" \
  "D:\a\_actions\jiro4989\setup-nim-action\v2/install_nim.sh" \
    --nim-version "2.0.2" \
    --parent-nim-install-directory "" \
    --nim-install-directory ".nim_runtime" \
    --os "Windows" \
    --use-nightlies "false" \
    --repo-token ""
  shell: C:\Program Files\Git\bin\bash.EXE --noprofile --norc -e -o pipefail {0}
  env:
    C_KZG_4844_GIT_HASH: 0894e3ded53d6f85f5aa146f4fe3e80afb411b94
    JAVA_HOME: C:\hostedtoolcache\windows\Java_Temurin-Hotspot_jdk\11.0.25-9\x64
    JAVA_HOME_11_X64: C:\hostedtoolcache\windows\Java_Temurin-Hotspot_jdk\11.0.25-9\x64
2025-01-27 11:30:43 [INFO] install nim 2.0.2
mv: cannot move 'nim-2.0.2' to '.nim_runtime': Permission denied
Error: Process completed with exit code 1.

Actions log url

https://github.com/grandinetech/rust-kzg/actions/runs/12987982846/job/36217992282

@ArtiomTr ArtiomTr added the bug Something isn't working label Jan 27, 2025
@jiro4989
Copy link
Owner

Hmm, I still don't know the reason that failed, but changing the installation location might fix the issue.

Try set parent-nim-install-directory: ${{ runner.temp }}. The parent installation location will be temp directory.

And I also recommend setting a repo-token. The reason is here.

  - uses: jiro4989/setup-nim-action@v2
    with:
      nim-version: '2.0.0' # default is 'stable'
+     repo-token: ${{ secrets.GITHUB_TOKEN }}
+     parent-nim-install-directory: ${{ runner.temp }}

@ArtiomTr
Copy link
Author

Thank you, I will try to apply this fix 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants