egor-tensin / setup-mingw

GitHub action to set up MinGW-w64
MIT License
77 stars 25 forks source link

Can't run on windows-latest #17

Open bocchi810 opened 9 months ago

bocchi810 commented 9 months ago

I can't run it only on windows-latest log:

Chocolatey v2.2.2
Upgrading the following packages:
mingw
By upgrading, you accept licenses for the packages.
mingw is not installed. Installing...

mingw v13.2.0
mingw package files upgrade completed. Performing other installation steps.
Downloading mingw 64 bit
  from 'https://github.com/niXman/mingw-builds-binaries/releases/download/13.2.0-rt_v11-rev0/x86_64-13.2.0-release-posix-seh-ucrt-rt_v11-rev0.7z'

Download of x86_64-13.2.0-release-posix-seh-ucrt-rt_v11-rev0.7z (69.57 MB) completed.
Hashes match.
Extracting C:\Users\runneradmin\AppData\Local\Temp\chocolatey\mingw\13.2.0\x86_64-13.2.0-release-posix-seh-ucrt-rt_v11-rev0.7z to C:\ProgramData\chocolatey\lib\mingw\tools\install...
C:\ProgramData\chocolatey\lib\mingw\tools\install
Testing path: C:\ProgramData\mingw64\mingw32\bin
Testing path: C:\ProgramData\mingw64\mingw64\bin
PATH environment variable does not have C:\ProgramData\mingw64\mingw64\bin in it. Adding...
Environment Vars (like PATH) have changed. Close/reopen your shell to
 see the changes (or in powershell/cmd.exe just type `refreshenv`).
 The upgrade of mingw was successful.
  Software installed to 'C:\ProgramData\chocolatey\lib\mingw\tools\install'

Chocolatey upgraded 1/1 packages. 
 See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
Remove-Item: D:\a\_temp\26a2006e-59c9-41e5-bcb8-2abcadb1ba96.ps1:140
Line |
 140 |          Remove-Item (Join-Path $mingw_lib 'libpthread.dll.a')
     |          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Cannot find path
     | 'C:\ProgramData\chocolatey\lib\mingw\tools\install\mingw64\x86_64-w64-mingw32\lib\libpthread.dll.a' because it
     | does not exist.

Error: Process completed with exit code 1.
Inrixia commented 8 months ago

Also getting this. Does anyone know a fix?

Inrixia commented 8 months ago

Looks like using

      uses: egor-tensin/setup-mingw@v2.2.0
      with:
        version: 12.2.0 

Re https://github.com/egor-tensin/setup-mingw/issues/14 works

Denzy7 commented 7 months ago

windows-latest image already includes mingw by default. If you're using cmake you could add -G "MinGW Makefiles" to cmake command. It's located in C:\mingw64 and is already added to %PATH% in github actions by default