Skip to content

Commit

Permalink
[ci] migrate github actions: msvc15 -> msvc16
Browse files Browse the repository at this point in the history
  • Loading branch information
vovkos committed Mar 17, 2022
1 parent f3aabef commit b82d687
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 29 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
jobs:
windowsBuild:
name: Windows Build
runs-on: windows-2016
runs-on: windows-2019
strategy:
fail-fast: false
matrix:
Expand All @@ -26,7 +26,7 @@ jobs:
- name: Install
shell: cmd
run: |
call ci\github-actions\set-env.bat msvc15 ${{matrix.TARGET_CPU}}
call ci\github-actions\set-env.bat msvc16 ${{matrix.TARGET_CPU}}
call ci\github-actions\install-windows.bat
git clone --depth 1 https://github.com/vovkos/axl
Expand All @@ -37,7 +37,7 @@ jobs:
set THIS_DIR=%CD%
set THIS_DIR_CMAKE=%THIS_DIR:\=/%
call ci\github-actions\set-env.bat msvc15 ${{matrix.TARGET_CPU}}
call ci\github-actions\set-env.bat msvc16 ${{matrix.TARGET_CPU}}
mkdir axl\build
cd axl\build
Expand Down
50 changes: 24 additions & 26 deletions ci/github-actions/set-env.bat
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,9 @@
:loop

if "%1" == "" goto :finalize
if /i "%1" == "msvc10" goto :msvc10
if /i "%1" == "msvc12" goto :msvc12
if /i "%1" == "msvc14" goto :msvc14
if /i "%1" == "msvc15" goto :msvc15
if /i "%1" == "msvc16" goto :msvc16
if /i "%1" == "msvc17" goto :msvc17
if /i "%1" == "x86" goto :x86
if /i "%1" == "i386" goto :x86
if /i "%1" == "amd64" goto :amd64
Expand All @@ -31,31 +30,26 @@ exit -1

:: Toolchain

:msvc10
set TOOLCHAIN=msvc10
set CMAKE_GENERATOR=Visual Studio 10 2010
set LUA_TOOLCHAIN=dll10
shift
goto :loop

:msvc12
set TOOLCHAIN=msvc12
set CMAKE_GENERATOR=Visual Studio 12 2013
set LUA_TOOLCHAIN=dll12
:msvc15
set TOOLCHAIN=msvc15
set CMAKE_GENERATOR=Visual Studio 15 2017
set LUA_TOOLCHAIN=dll15
shift
goto :loop

:msvc14
set TOOLCHAIN=msvc14
set CMAKE_GENERATOR=Visual Studio 14 2015
set LUA_TOOLCHAIN=dll14
:msvc16
set TOOLCHAIN=msvc16
set CMAKE_GENERATOR=Visual Studio 16 2019
set CMAKE_USE_ARCH_OPTIONS=true
set LUA_TOOLCHAIN=dll16
shift
goto :loop

:msvc15
set TOOLCHAIN=msvc15
set CMAKE_GENERATOR=Visual Studio 15 2017
set LUA_TOOLCHAIN=dll15
:msvc17
set TOOLCHAIN=msvc17
set CMAKE_GENERATOR=Visual Studio 17 2022
set CMAKE_USE_ARCH_OPTIONS=true
set LUA_TOOLCHAIN=dll16
shift
goto :loop

Expand All @@ -65,7 +59,8 @@ goto :loop

:x86
set TARGET_CPU=x86
set CMAKE_GENERATOR_SUFFIX=
set CMAKE_ARCH_SUFFIX=
set CMAKE_ARCH_OPTIONS=-A Win32
set LUA_PLATFORM=Win32
set OPENSSL_PLATFORM=Win32
set OPENSSL_DLL_SUFFIX=-1_1
Expand All @@ -76,7 +71,8 @@ goto :loop

:amd64
set TARGET_CPU=amd64
set CMAKE_GENERATOR_SUFFIX= Win64
set CMAKE_ARCH_SUFFIX= Win64
set CMAKE_ARCH_OPTIONS=-A x64
set LUA_PLATFORM=Win64
set OPENSSL_PLATFORM=Win64
set OPENSSL_DLL_SUFFIX=-1_1-x64
Expand All @@ -89,17 +85,19 @@ goto :loop

:finalize

if "%TOOLCHAIN%" == "" goto :msvc14
if "%TOOLCHAIN%" == "" goto :msvc15
if "%TARGET_CPU%" == "" goto :amd64
if "%CONFIGURATION%" == "" (set CONFIGURATION=Release)
if "%CMAKE_USE_ARCH_OPTIONS%" == "" (set CMAKE_GENERATOR=%CMAKE_GENERATOR%%CMAKE_ARCH_SUFFIX%)
if not "%CMAKE_USE_ARCH_OPTIONS%" == "" (set CMAKE_OPTIONS=%CMAKE_OPTIONS%%CMAKE_ARCH_OPTIONS%)

set LUA_VERSION=5.3.5
set LUA_LIB_NAME=lua53
set LUA_DOWNLOAD_URL=https://sourceforge.net/projects/luabinaries/files/%LUA_VERSION%/Windows%%20Libraries/Dynamic/lua-%LUA_VERSION%_%LUA_PLATFORM%_%LUA_TOOLCHAIN%_lib.zip/download

set RAGEL_DOWNLOAD_URL=https://github.com/eloraiby/ragel-windows/raw/master/ragel.exe

set CMAKE_CONFIGURE_FLAGS=-G "%CMAKE_GENERATOR%%CMAKE_GENERATOR_SUFFIX%"
set CMAKE_CONFIGURE_FLAGS=-G "%CMAKE_GENERATOR%" %CMAKE_ARCH_OPTIONS%

set CMAKE_BUILD_FLAGS= ^
--config %CONFIGURATION% ^
Expand Down

0 comments on commit b82d687

Please sign in to comment.