Skip to content

MSY2/MINGW example workflow #95

@eine

Description

@eine

See msys2/setup-msys2 for an up-to-date and actively maintained solution.


Please, provide an example workflow to build MSYS2/MINGW packages with makepkg-mingw. I am currently using the following steps:

    - name: Install MSYS2
      run: choco install msys2
    - uses: actions/checkout@v1
    - name: Build and (hopefully) install package
      run: C:\tools\msys64\usr\bin\bash -lc "./msys2-mingw/run.sh -b"
      env:
        HOME: ${{ runner.workspace }}/myrepo
        MINGW_INSTALLS: ${{ matrix.task.installs }}
        CI: true
    - name: Test package
      run: C:\tools\msys64\usr\bin\bash -lc "source /usr/bin/shell $MINGW_INSTALLS; ./msys2-mingw/run.sh -t"
      env:
        HOME: ${{ runner.workspace }}/myrepo
        MINGW_INSTALLS: ${{ matrix.task.installs }}
        CI: true

However, this is not ideal, because:

  • Installing MSYS2 takes 4-5 minutes.
  • Repeating the envvars in both tasks is redundant.
  • I did not find how to use the following syntax:
     run: |
        commandA
        commandB

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions