8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-02-02 09:20:39 +01:00

GitHub Actions build for VS 2019 and 2022.

This commit is contained in:
Adriano dos Santos Fernandes 2021-10-28 14:13:46 -03:00
parent 801784db69
commit eab75d501d

View File

@ -6,11 +6,18 @@ jobs:
build:
runs-on: ${{ matrix.os }}
container: ${{ matrix.container }}
env:
VS_VERSION: ${{ matrix.os == 'windows-2016' && '2017' || (matrix.os == 'windows-2019' && '2019' || (matrix.os == 'windows-2022' && '2022' || '')) }}
strategy:
fail-fast: false
matrix:
os: [macOS-latest, windows-2016, ubuntu-20.04]
os:
- macOS-latest
- windows-2016
- windows-2019
- windows-2022
- ubuntu-20.04
platform: [x64, x86]
include:
- os: ubuntu-18.04
@ -114,16 +121,18 @@ jobs:
mv gen/Release/*.pkg gen/artifacts
- name: Prepare (Windows)
if: matrix.os == 'windows-2016'
if: startsWith(matrix.os, 'windows-')
shell: cmd
run: |
for /r %%i in (*.bat) do unix2dos "%%i"
- name: Build (Windows)
if: matrix.os == 'windows-2016'
if: startsWith(matrix.os, 'windows-')
shell: cmd
env:
PLATFORM: ${{ matrix.platform }}
VS_TYPE: ${{ matrix.os == 'windows-2022' && 'Preview' || 'Enterprise' }}
VS_SCRIPT: ${{ matrix.os == 'windows-2022' && 'C:\Program Files\Microsoft Visual Studio\%VS_VERSION%\%VS_TYPE%\Common7\Tools\VsDevCmd.bat' || 'C:\Program Files (x86)\Microsoft Visual Studio\%VS_VERSION%\%VS_TYPE%\Common7\Tools\VsDevCmd.bat' }}
run: |
if "%PLATFORM%" == "x64" set FB_VS_ARCH=amd64
if "%PLATFORM%" == "x64" set FB_PROCESSOR_ARCHITECTURE=AMD64
@ -131,7 +140,7 @@ jobs:
if "%PLATFORM%" == "x86" set FB_VS_ARCH=x86
if "%PLATFORM%" == "x86" set FB_PROCESSOR_ARCHITECTURE=x86
if "%PLATFORM%" == "x86" set FB_OUTPUT_SUFFIX=win32
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=%FB_VS_ARCH%
call "%VS_SCRIPT%" -arch=%FB_VS_ARCH%
cd builds\win32
run_all.bat JUSTBUILD
@ -157,15 +166,15 @@ jobs:
path: gen/artifacts
- name: Upload (Windows x64)
if: matrix.os == 'windows-2016' && matrix.platform == 'x64'
if: startsWith(matrix.os, 'windows-') && matrix.platform == 'x64'
uses: actions/upload-artifact@main
with:
name: firebird-windows-x64
name: firebird-windows-x64-vs-${{ env.VS_VERSION }}
path: output_x64
- name: Upload (Windows x86)
if: matrix.os == 'windows-2016' && matrix.platform == 'x86'
if: startsWith(matrix.os, 'windows-') && matrix.platform == 'x86'
uses: actions/upload-artifact@main
with:
name: firebird-windows-x86
name: firebird-windows-x86-vs-${{ env.VS_VERSION }}
path: output_win32