diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2020-11-30 01:43:31 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-11-30 01:43:31 +0100 |
| commit | 2bd09af7d04a6044e1dfb2b9edf2a3497a2c8909 (patch) | |
| tree | 0de84fe26446c9e65c86b6c2e5616eb35aff27a8 | |
| parent | ebf63e1fd702aac237742da6185814d4b56576dd (diff) | |
| parent | cc5d46523eeda309bd27fbb0e6db9719a361792f (diff) | |
| download | PROJ-2bd09af7d04a6044e1dfb2b9edf2a3497a2c8909.tar.gz PROJ-2bd09af7d04a6044e1dfb2b9edf2a3497a2c8909.zip | |
Merge pull request #2467 from rouault/gha_windows
Migrate appveyor VS2017 build to github action VS2019
| -rw-r--r-- | .github/workflows/windows.yml | 62 | ||||
| -rw-r--r-- | appveyor.yml | 6 |
2 files changed, 65 insertions, 3 deletions
diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml new file mode 100644 index 00000000..13179c18 --- /dev/null +++ b/.github/workflows/windows.yml @@ -0,0 +1,62 @@ +name: Windows build + +on: [push, pull_request] + +jobs: + + MSVC: + runs-on: windows-latest + if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]')" + + env: + ARCH: x64 + BUILD_SHARED_LIBS: ON + + steps: + + - uses: actions/checkout@v2 + - uses: ilammy/msvc-dev-cmd@v1 + + - name: Cache vcpkg packages + uses: actions/cache@v2 + id: cache + with: + path: c:\vcpkg\installed + key: ${{ runner.os }}-vcpkg-${{ hashFiles('.github/workflows/windows.yml') }} + + - name: Install build requirements + shell: cmd + if: steps.cache.outputs.cache-hit != 'true' + run: | + vcpkg install sqlite3[core,tool]:${{ env.ARCH }}-windows + vcpkg install tiff:${{ env.ARCH }}-windows + vcpkg install curl:${{ env.ARCH }}-windows + + - name: Build + shell: cmd + run: | + set VCPKG_INSTALLED=c:\vcpkg\installed\${{ env.ARCH }}-windows + dir %VCPKG_INSTALLED%\bin + set PATH=%VCPKG_INSTALLED%\bin;%PATH% + set PROJ_BUILD=%GITHUB_WORKSPACE%\build + mkdir %PROJ_BUILD% + cd %PROJ_BUILD% + set PROJ_DIR=%GITHUB_WORKSPACE%\proj_dir + cmake -GNinja .. -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS="{{ env.BUILD_SHARED_LIBS }}" -DCMAKE_C_FLAGS="/WX" -DCMAKE_CXX_FLAGS="/WX" -DCMAKE_TOOLCHAIN_FILE=c:/vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_INSTALL_PREFIX="%PROJ_DIR%" + ninja -v + ninja install + dir %PROJ_DIR%\bin + + - name: Run tests + shell: cmd + run: | + set VCPKG_INSTALLED=c:\vcpkg\installed\${{ env.ARCH }}-windows + set PATH=%VCPKG_INSTALLED%\bin;%PATH% + set PROJ_DIR=%GITHUB_WORKSPACE%\proj_dir + set PROJ_LIB=%PROJ_DIR%\share\proj + set PROJ_BUILD=%GITHUB_WORKSPACE%\build + cd %PROJ_BUILD% + ctest -V -C Release + set PATH=%PROJ_DIR%\bin;%PATH% + call %GITHUB_WORKSPACE%\test\postinstall\test_cmake.bat %PROJ_DIR% + proj diff --git a/appveyor.yml b/appveyor.yml index dad1f35d..17447a64 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -11,9 +11,9 @@ environment: BUILD_SHARED_LIBS: OFF # VS 2017 - - platform: x64 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 - BUILD_SHARED_LIBS: ON +# - platform: x64 +# APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 +# BUILD_SHARED_LIBS: ON shallow_clone: true |
