egor-tensin / setup-mingw

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

Can't get 32 bit version to work properly #10

Closed ppdewolf closed 1 year ago

ppdewolf commented 1 year ago

Using this simple workflow:

name: Test Environment variables

on:
  workflow_dispatch:

jobs:
  Echo:
    name: Test Environment variables
    runs-on: windows-latest

    steps:
      - name: SetUp mingw
        uses: egor-tensin/setup-mingw@v2
        with:
          platform: x86

      - name: Show version
        run: |
          refreshenv
          make --version

I guess that mingw is installed into C:\ProgramData\chocolatey\lib\mingw\tools\install\mingw32\ because I get PATH environment variable does not have C:\ProgramData\chocolatey\lib\mingw\tools\install\mingw32\bin in it. Adding...

However, running the make command I get the error Cannot find file at '..\\lib\mingw\tools\install\mingw64\bin\mingw32-make.exe' (C:\ProgramData\Chocolatey\lib\mingw\tools\install\mingw64\bin\mingw32-make.exe). This usually indicates a missing or moved file.

Why is it looking in C:\ProgramData\Chocolatey\lib\mingw\tools\install\mingw64\bin while it was installed in a mingw32-directory?

vkeshav300 commented 1 year ago

For me I just did this:

- name: Set up MinGW
      uses: egor-tensin/setup-mingw@v2
      with:
        platform: x32

This automatically installs mingw32-make. Instead of running make ..., try running mingw32-make .... (I also would run it on windows-latest.

ppdewolf commented 1 year ago

Thanks. Using mingw32-make ... did help