-
Notifications
You must be signed in to change notification settings - Fork 13
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]: Nim installation is too long! #483
Comments
What is noteworthy is that when installing Nim without this action, it is installed quite smartly |
@Ethosa thanks. I added a temporary patch. Please try using setup-nim-action 1.5.2 or later. |
In my environment, Nim 1.x is fast but Nim 2.x is still slow... 1.x - about 20 seconds https://github.com/fox0430/moe/actions/runs/9798974578/job/27061052837 Do I need additional configs? |
I'm not sure what the cause is. It's suddenly become slow even though I haven't made any changes. Using choosenim on a job is fast, so there may be a problem with the Node runtime for GitHub Actions. |
I know that the installation is very slow on a Mac runner. #487 But no good solution has been found yet. |
@Ethosa @fox0430 I will be making a major change to setup-nim-action. Until now, setup-nim-action depended on I created a new version I tested setup-nim-action
The tests complete in under 30 seconds on Ubuntu and Windows. This is BREAKING_CHANGES. Please re-run your CI tests with setup-nim-action - uses: jiro4989/setup-nim-action@v2-beta
with:
nim-version: 2.0.8
repo-token: ${{ secrets.GITHUB_TOKEN }} |
Thank you for a great job. So, I tried it and it seems to fail. Do you know if I need to do anything? https://github.com/fox0430/moe/actions/runs/9810738115/job/27091529854 |
Hmm, please try to delete cache action. https://github.com/fox0430/moe/actions/runs/9810738115/job/27091529854#step:3:1 |
It works! Thank you! And, |
Yes, |
@fox0430 I fixed |
Passed all and macOS and stable (2.0.8) are much faster! Thank you! |
@fox0430 Thanks for your help👍 |
* fix: mac slow install * feat: composite action * fix: no * add env * Revert "fix: no" This reverts commit bbe060a. * add: script * fix path * latest install * stable install * WIP: testcase * windows * windows test * fix PATH * debug * quite * fix if * debug * pwsh * mkdir * add comment * fix description * add macos test * uname * fix arch * fix mac os * fix os * fix * build for mac * comment out * fix repo token * fix auth * sh * debug * fix build * del: ls * change build options * add macos-latest test * add info log * del: unused inputs * feat: 1.x pattern * add tests * add: print version * del: too old version * Revert "del: unused inputs" This reverts commit 45b4264. * fix: change message * del: unused ci tests * docs: update setup-nim-action version to v2-beta * fix: install_nim.sh path * feat: build devel nim compiler * ci: add devel test * fix: description of nim-install-directory parameter * docs: v2-beta to v2 * docs: migration to v2 from v1 * docs: v2 section * docs: fix link * docs: add issues link * docs: change cache key * docs: update devel usage * docs: remove choosenim cache * docs: add QA section
@Ethosa @fox0430 v2 version released. Please use See: Migration guide |
@jiro4989 https://github.com/HapticX/happyx/actions/runs/9825359062/job/27125416903
|
And here also: |
try using not-fullpath nim command. nim exists in PATH. (Log) run: |
cd tests
for file in $(ls -v testc*.nim); do
echo "###===--- C Test for " $file " via HttpBeast ---===###"
- /home/runner/.nimble/bin/nim c -d:beast -d:debug --hints:off --warnings:off $file
+ nim c -d:beast -d:debug --hints:off --warnings:off $file
done
shell: bash And change cache key, and delete choosenim directory. - uses: actions/cache@v4
with:
path: |
~/.nimble
- ~/.choosenim
- key: ${{ runner.os }}-nimble-${{ hashFiles('*.nimble') }}
+ key: ${{ runner.os }}-nimble-v2-${{ hashFiles('*.nimble') }} |
https://github.com/HapticX/happyx/actions/runs/9825579385/job/27125918172 |
setup was in |
add cache path to dependencies job. - uses: actions/cache@v4
with:
path: |
~/.nimble
+ .nim_runtime
key: ${{ runner.os }}-nimble-v2-${{ hashFiles('*.nimble') }} and set - uses: actions/cache@v4
with:
path: |
~/.nimble
+ .nim_runtime
key: ${{ runner.os }}-nimble-v2-${{ hashFiles('*.nimble') }}
- name: Build C tests (Default HTTP Server) ⚡
run: |
+ export PATH=$PATH:$PWD/.nim_runtime/bin
cd tests
echo "###===--- Default for" $file "---===###"
for file in $(ls -v testc*.nim); do
echo "###===--- C Test for " $file " via stdlib ---===###"
nim c -d:debug --hints:off --warnings:off $file
done
shell: bash |
@jiro4989 thanks you! |
The checks are failing in TheAlgorithms repository for the v2 upgrade:
Are similar changes as those recommended to Ethosa necessary for this upgrade? EDIT: Sorry, I did not check the README.md beforehand. |
@dlesnoff: when |
@dlesnoff Did you set a - uses: jiro4989/setup-nim-action@v2
with:
nim-version: '2.0.0' # default is 'stable'
+ repo-token: ${{ secrets.GITHUB_TOKEN }}
I think that GitHub API reached Rate limit. |
It works but I have to change all potentially destructive instructions to exclude the .nim_runtime directory. Destructive instructions being nim prettyfy or git clean. Wasn't it possible to put the nim directory in another separate temporary directory like runner.temp (is it writable?, see: actions/toolkit#518). |
You can use - uses: jiro4989/setup-nim-action@v2
with:
nim-version: '2.0.0' # default is 'stable'
repo-token: ${{ secrets.GITHUB_TOKEN }}
+ nim-install-directory: ${{ runner.temp }} |
Thanks! |
If |
Both options fail. Shouldn't these lines use the nim-install-directory variable ? echo "$PWD//home/runner/work/_temp/bin" >> "$GITHUB_PATH"
echo "$HOME/.nimble/bin" >> "$GITHUB_PATH" |
OMG, this is bug. I will fix it🙇 |
@dlesnoff Added - 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 }} This example installs nim to |
Still not there! |
You can close it. It was an error on my side sorry. |
OK. The slow installation issue has been resolved, so I will close this issue. Please open a new issue if anyone find any issues with |
What happened?
When gh action was run this action is do nothing(?) too long.
Relevant log output
No response
Actions log url
https://github.com/HapticX/happyx/actions/runs/9716162111
and many actions before
The text was updated successfully, but these errors were encountered: