Build x86 & x86_64 on Windows CI
This commit is contained in:
parent
759b5ab7d1
commit
3fbcc6be57
45
.github/workflows/build.yml
vendored
45
.github/workflows/build.yml
vendored
|
@ -12,7 +12,6 @@ defaults:
|
||||||
|
|
||||||
env:
|
env:
|
||||||
BUILD_TYPE: Release
|
BUILD_TYPE: Release
|
||||||
WINDOWS_ARCH: x86
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
# Do a plain build, like we would expect a user to do it on their end.
|
# Do a plain build, like we would expect a user to do it on their end.
|
||||||
|
@ -20,8 +19,10 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
config:
|
config:
|
||||||
- { name: 'Windows MSVC', os: windows-latest, compiler: msvc }
|
- { name: 'Windows MSVC x86', os: windows-latest, compiler: msvc, arch: x86 }
|
||||||
- { name: 'Windows MinGW', os: ubuntu-20.04, compiler: mingw }
|
- { name: 'Windows MSVC x86_64', os: windows-latest, compiler: msvc, arch: x86_64 }
|
||||||
|
- { name: 'Windows MinGW x86', os: ubuntu-20.04, compiler: mingw, arch: x86 }
|
||||||
|
- { name: 'Windows MinGW x86_64', os: ubuntu-20.04, compiler: mingw, arch: x86_64 }
|
||||||
- { name: 'macOS', os: macos-latest }
|
- { name: 'macOS', os: macos-latest }
|
||||||
- { name: 'Ubuntu', os: ubuntu-18.04 }
|
- { name: 'Ubuntu', os: ubuntu-18.04 }
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
|
@ -39,13 +40,13 @@ jobs:
|
||||||
id: windows-identify
|
id: windows-identify
|
||||||
if: ${{ matrix.config.compiler == 'msvc' || matrix.config.compiler == 'mingw' }}
|
if: ${{ matrix.config.compiler == 'msvc' || matrix.config.compiler == 'mingw' }}
|
||||||
run: |
|
run: |
|
||||||
vswhere_target="${{ env.WINDOWS_ARCH }}"
|
vswhere_target="${{ matrix.config.arch }}"
|
||||||
msvc_target="${{ env.WINDOWS_ARCH }}"
|
msvc_target="${{ matrix.config.arch }}"
|
||||||
mingw_target="${{ env.WINDOWS_ARCH }}"
|
mingw_target="${{ matrix.config.arch }}"
|
||||||
|
|
||||||
if [ '${{ env.WINDOWS_ARCH }}' == 'x86' ]; then
|
if [ '${{ matrix.config.arch }}' == 'x86' ]; then
|
||||||
msvc_target="Win32"
|
msvc_target="Win32"
|
||||||
elif [ '${{ env.WINDOWS_ARCH }}' == 'x86_64' ]; then
|
elif [ '${{ matrix.config.arch }}' == 'x86_64' ]; then
|
||||||
vswhere_target="amd64"
|
vswhere_target="amd64"
|
||||||
msvc_target="x64"
|
msvc_target="x64"
|
||||||
fi
|
fi
|
||||||
|
@ -155,8 +156,10 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
config:
|
config:
|
||||||
- { name: 'Windows MSVC', os: windows-latest, compiler: msvc }
|
- { name: 'Windows MSVC x86', os: windows-latest, compiler: msvc, arch: x86 }
|
||||||
- { name: 'Windows MinGW', os: ubuntu-20.04, compiler: mingw }
|
- { name: 'Windows MSVC x86_64', os: windows-latest, compiler: msvc, arch: x86_64 }
|
||||||
|
- { name: 'Windows MinGW x86', os: ubuntu-20.04, compiler: mingw, arch: x86 }
|
||||||
|
- { name: 'Windows MinGW x86_64', os: ubuntu-20.04, compiler: mingw, arch: x86_64 }
|
||||||
- { name: 'macOS', os: macos-latest }
|
- { name: 'macOS', os: macos-latest }
|
||||||
- { name: 'Ubuntu', os: ubuntu-18.04 }
|
- { name: 'Ubuntu', os: ubuntu-18.04 }
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
|
@ -174,13 +177,13 @@ jobs:
|
||||||
id: windows-identify
|
id: windows-identify
|
||||||
if: ${{ matrix.config.compiler == 'msvc' || matrix.config.compiler == 'mingw' }}
|
if: ${{ matrix.config.compiler == 'msvc' || matrix.config.compiler == 'mingw' }}
|
||||||
run: |
|
run: |
|
||||||
vswhere_target="${{ env.WINDOWS_ARCH }}"
|
vswhere_target="${{ matrix.config.arch }}"
|
||||||
msvc_target="${{ env.WINDOWS_ARCH }}"
|
msvc_target="${{ matrix.config.arch }}"
|
||||||
mingw_target="${{ env.WINDOWS_ARCH }}"
|
mingw_target="${{ matrix.config.arch }}"
|
||||||
|
|
||||||
if [ '${{ env.WINDOWS_ARCH }}' == 'x86' ]; then
|
if [ '${{ matrix.config.arch }}' == 'x86' ]; then
|
||||||
msvc_target="Win32"
|
msvc_target="Win32"
|
||||||
elif [ '${{ env.WINDOWS_ARCH }}' == 'x86_64' ]; then
|
elif [ '${{ matrix.config.arch }}' == 'x86_64' ]; then
|
||||||
vswhere_target="amd64"
|
vswhere_target="amd64"
|
||||||
msvc_target="x64"
|
msvc_target="x64"
|
||||||
fi
|
fi
|
||||||
|
@ -237,6 +240,7 @@ jobs:
|
||||||
else
|
else
|
||||||
package_name="${package_name}-MSVC"
|
package_name="${package_name}-MSVC"
|
||||||
fi
|
fi
|
||||||
|
package_name="${package_name}-${{ matrix.config.arch }}"
|
||||||
package_ext="" # Directory, uploading will automatically zip it
|
package_ext="" # Directory, uploading will automatically zip it
|
||||||
elif [ '${{ runner.os }}' == 'macOS' ]; then
|
elif [ '${{ runner.os }}' == 'macOS' ]; then
|
||||||
package_name="${package_name}-macOS"
|
package_name="${package_name}-macOS"
|
||||||
|
@ -300,8 +304,15 @@ jobs:
|
||||||
binPath="${binPath}/${{ env.BUILD_TYPE }}"
|
binPath="${binPath}/${{ env.BUILD_TYPE }}"
|
||||||
fi
|
fi
|
||||||
if [ '${{ matrix.config.compiler }}' == 'mingw' ] && [ '${{ env.BUILD_TYPE }}' == 'Release' ]; then
|
if [ '${{ matrix.config.compiler }}' == 'mingw' ] && [ '${{ env.BUILD_TYPE }}' == 'Release' ]; then
|
||||||
# FIXME arch-specific strip prefix
|
# arch-specific strip prefix
|
||||||
i686-w64-mingw32-strip -s "${binPath}/furnace.exe"
|
# TODO maybe extract from cross toolchain files?
|
||||||
|
toolPrefix="-w64-mingw32-"
|
||||||
|
if [ '${{ matrix.config.arch }}' == 'x86_64' ]; then
|
||||||
|
toolPrefix="x86_64${toolPrefix}"
|
||||||
|
else
|
||||||
|
toolPrefix="i686${toolPrefix}"
|
||||||
|
fi
|
||||||
|
${toolPrefix}strip -s "${binPath}/furnace.exe"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mkdir ${{ steps.package-identify.outputs.filename }}
|
mkdir ${{ steps.package-identify.outputs.filename }}
|
||||||
|
|
Loading…
Reference in a new issue