view .github/workflows/build.yml @ 65:03b1a105d70e

actions: CC_FLAGS->CFLAGS
author Paper <37962225+mrpapersonic@users.noreply.github.com>
date Fri, 05 Aug 2022 23:47:32 -0400
parents 495a0733b2c0
children
line wrap: on
line source

name: msvpvf CI

on:
  push:
  pull_request:

jobs:
  build-win32:
    name: Windows i686 (32-bit)
    runs-on: windows-latest
    steps:
    - name: Cache MinGW
      uses: actions/cache@v3
      with:
        path: C:\MinGW
        key: MinGW

    - name: Setup MinGW
      run: |
        if (!(Test-Path "C:\MinGW")) {
          Invoke-WebRequest -OutFile mingw-get.zip "https://osdn.net/dl/mingw/mingw-get-0.6.3-mingw32-pre-20170905-1-bin.zip" -UserAgent "curl/7.55.1"
          Expand-Archive -Path mingw-get.zip -DestinationPath C:\MinGW
          Remove-Item -Path mingw-get.zip
          C:\MinGW\bin\mingw-get.exe install mingw32-base-bin
        }
      shell: pwsh

    - uses: actions/checkout@v2

    - name: make
      run: |
        set PATH=C:\MinGW\bin;%PATH%
        set CC=mingw32-gcc
        mingw32-make CFLAGS=-static
        mingw32-make gui CFLAGS=-static
        strip msvpvf.exe
        strip gui.exe
      shell: cmd

    - name: Upload artifact
      uses: actions/upload-artifact@v2
      with:
        name: msvpvf-win32-${{ github.sha }}
        path: |
          LICENSE
          gui.exe
          msvpvf.exe

  build-win64:
    name: Windows amd64 (64-bit)
    runs-on: windows-latest
    defaults:
      run:
        shell: msys2 {0}
    steps:
    - name: Setup MSYS2
      uses: msys2/setup-msys2@v2
      with:
        msystem: mingw64
        install: >-
          make
          mingw-w64-x86_64-clang

    - uses: actions/checkout@v2

    - name: make
      run: |
        export CC=clang
        make CFLAGS=-static
        make gui CFLAGS=-static
        strip msvpvf.exe
        strip gui.exe

    - name: Upload artifact
      uses: actions/upload-artifact@v2
      with:
        name: msvpvf-win64-${{ github.sha }}
        path: |
          LICENSE
          gui.exe
          msvpvf.exe

  build-mac:
    name: macOS (64-bit)
    runs-on: macOS-latest
    steps:
    - name: Install "dependencies"
      run: brew install zip

    - uses: actions/checkout@v2

    - name: make
      run: | 
        make
        strip msvpvf
        zip msvpvf.zip msvpvf LICENSE

    - name: Upload artifact
      uses: actions/upload-artifact@v2
      with:
        name: msvpvf-osx-${{ github.sha }}
        path: |
          msvpvf.zip