-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
7z binary (7zip) is not present on windows-latest runner beginning 2020-05-19 #905
Comments
Hello @lopopolo, |
I get these messages every time I enqueue a build:
|
@Darleev I was able to run the job again and it still failed with the same error. https://github.com/artichoke/nightly/runs/693976956?check_suite_focus=true This is the fourth time I've rerun the workflow and it has failed in this way.
This workflow runs daily and the repo hasn't seen any commits in 23 days. The only change is the new builder environment, which in this latest run was:
What are my next steps? |
Hello, @lopopolo I can reproduce the issue. The root cause is the https://github.com/ruby/setup-ruby ( Temporary workaround to unblock builds, rename msys64 folder:
|
@MSP-Greg, Could you please assist? |
EDIT: Skip the pacman command to install p7zip, it is part of the compression package, which is installed. If you need 7z available, install the MSYS2 version with:
There are a lot of conflicting tools in the WIndows image, ruby/setup-ruby uses the MSYS2 tools. I believe some of the items you're installing are now available in the MSYS2 install. I've used 7z in my workflows, I always used a full path to 'C:\Program Files\7-Zip'... |
I believe 7z.exe exists in the following:
You can probably replace 7z with "/c/Program Files/7-Zip/7z.exe" in your 'Build archive' step. I tried it in a Git Bash shell, and it worked fine |
Wow thank you so much @al-cheb and @MSP-Greg! 💪 I applied the workaround to use the full path to 7-Zip in artichoke/nightly#1 and was able to successfully release: https://github.com/artichoke/nightly/releases/tag/test-GH-1-7zip-win. From what I can see, ruby/setup-ruby including a bundled MSYS2 installation was temporary and expected to be rolled back once the windows runner included one by default. I've filed ruby/setup-ruby#57 to investigate cleaning that up. |
Glad that fixed your problem. This is messy. As noted above, there are already two versions of 7z installed, the MSYS2 version is the 3rd. The MSYS2 version is 16.02, the native Windows version I have installed is 19.00. I might consider that an indication that MSYS2 7z is not used a lot. I work with MSYS2 tools both locally and in CI, and I've never installed the p7zip package. It's part of the pacman 'compression' package, and I haven't installed that, but I've installed many of its packages individually... Hence, I think the best thing to do is remove it from the MSYS2 install. One thing somewhat separate from this discussion is what bash shell to use. The current windows bash shell command is:
Note that If the path was removed, users could switch to the MSYS2 bash shell by just changing the PATH, as is done in ruby/setup-ruby. That code is in actions/runner, but I thought I'd mention it, as people have already asked about using the MSYS2 bash shell. See actions/runner#497 @al-cheb - any thoughts? |
I ran a list of the embedded MSYS2 install that ruby/setup-ruby uses. See the MSYS2 Packages step: The p7zip package is not installed, so the issue is not ruby/setup-ruby, but that the current MSYS2 install script is installing it as part of the compression package group. As mentioned above, it is an old package, and there are two other 7z installs (one in path) that any shell used in Windows should run. Hence, see PR #916 which removes the package. I don't know of any other similar conflicts, I'm hoping this is the only one. Maybe a note in ruby/setup-ruby's README could make clear that MSYS2/MinGW tools are enabled and at the 'front of the path', so there may be issues if people want to use tools located elsewhere... |
The action being used previously is only available on Linux runners. According to actions/runner-images#905, the 7-zip binary should be present at this path on Windows builds.
Describe the bug
Invoking
7z
withshell: bash
onwindows-latest
os produces this error:#898 mentions an msys upgrade. Is this possibly related?
Failing run: https://github.com/artichoke/nightly/runs/691297319
This is the first failing run of a job that has not changed. This failing run has the following environment:
Yesterday's successful run: https://github.com/artichoke/nightly/runs/687237362?check_suite_focus=true
This run used the following environment:
Area for Triage:
Question, Bug, or Feature?: Bug
Virtual environments affected
Expected behavior
I expect invoking
7z
to produce a zip file.Actual behavior
A description with steps to reproduce the issue. If your have a public example or repo to share,
please provide the link.
outputs:
The text was updated successfully, but these errors were encountered: