Skip to content

update qgis, update vcpkg, run on macos-13 #217

update qgis, update vcpkg, run on macos-13

update qgis, update vcpkg, run on macos-13 #217

Workflow file for this run

name: Build win64
on:
push:
paths-ignore:
- '.github/workflows/android.yml'
- '.github/workflows/ios.yml'
- '.github/workflows/linux.yml'
- '.github/workflows/mac.yml'
- 'vcpkg-overlay/triplets/arm-android.yml'
- 'vcpkg-overlay/triplets/arm64-android.yml'
- 'vcpkg-overlay/triplets/arm64-ios.yml'
- 'vcpkg-overlay/triplets/arm64-osx.yml'
- 'vcpkg-overlay/triplets/x64-linux.yml'
- 'vcpkg-overlay/triplets/x64-osx.yml'
- 'scripts/**'
- 'LICENSE'
- 'README.md'
concurrency:
group: ci-${{github.ref}}-windows
cancel-in-progress: true
jobs:
win64_build:
runs-on: windows-2019
env: # update README for devs if you modify these env. variables
QT_VERSION: '6.6.0' # use scripts/update_qt_version.bash to change
TRIPLET: "x64-windows"
VS_VERSION: "2019"
CMAKE_GENERATOR: "Visual Studio 16 2019" # see https://github.com/actions/runner-images/blob/main/images/win/Windows2019-Readme.md
CMAKE_ARCH: "x64"
QT_ARCH: "win64_msvc2019_64"
VCPKG_ROOT: "C:/vcpkg-root" # Looks like there is more space on C: than on D: drive (~14GB)
steps:
- uses: actions/checkout@v3
with:
path: input-sdk
- name: Prepare vars
id: vars
shell: bash
run: |
WORKSPACE_DIR=$(cygpath -m "${{ github.workspace }}")
echo "::set-output name=WORKSPACE_DIR::$WORKSPACE_DIR"
echo "WORKSPACE_DIR: $WORKSPACE_DIR"
- uses: jurplel/install-qt-action@v3
with:
version: ${{ env.QT_VERSION }}
setup-python: 'false'
target: desktop
arch: ${{ env.QT_ARCH }}
dir: ${{ github.workspace }}
modules: 'qtsensors qtconnectivity qt5compat qtmultimedia qtpositioning qtshadertools'
cache: true
cache-key-prefix: ${{ runner.os }}-QtCache-v1-${{ env.QT_VERSION }}-win
- name: Get vcpkg
shell: bash
run: |
mkdir -p "${{ env.VCPKG_ROOT }}"
cd "${{ env.VCPKG_ROOT }}"
git init
git remote add origin https://github.com/microsoft/vcpkg.git
git pull origin master
VCPKG_TAG=`cat ${{ steps.vars.outputs.WORKSPACE_DIR }}/input-sdk/VCPKG_BASELINE`
echo "using VCPKG_TAG ${VCPKG_TAG}"
git checkout ${VCPKG_TAG}
- name: Install vcpkg
shell: cmd
run: |
CALL "C:\vcpkg-root\bootstrap-vcpkg.bat"
- name: Setup compiler
shell: cmd
run: |
CALL "C:\Program Files (x86)\Microsoft Visual Studio\${{ env.VS_VERSION }}\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=${{ env.CMAKE_ARCH }}
- name: Build Deps
shell: pwsh
run: |
$ErrorActionPreference = 'continue'
function exec
{
param ( [ScriptBlock] $ScriptBlock )
& $ScriptBlock 2>&1 | ForEach-Object -Process { "$_" }
if ($LastExitCode -ne 0) { exit $LastExitCode }
}
cd $env:GITHUB_WORKSPACE
mkdir ${{ github.workspace }}\build -ea 0
$env:PATH="$env:VCPKG_ROOT;$env:PATH"
exec {
cmake -B ${{ github.workspace }}\build `
-S ${{ github.workspace }}\input-sdk `
-DCMAKE_TOOLCHAIN_FILE:PATH="${{ env.VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake" `
-G "${{ env.CMAKE_GENERATOR }}" `
-A ${{ env.CMAKE_ARCH }} `
-DVCPKG_TARGET_TRIPLET=${{ env.TRIPLET }} `
-DVCPKG_OVERLAY_TRIPLETS:PATH="${{ steps.vars.outputs.WORKSPACE_DIR }}/input-sdk/vcpkg-overlay/triplets" `
-DVCPKG_OVERLAY_PORTS="${{ steps.vars.outputs.WORKSPACE_DIR }}/input-sdk/vcpkg-overlay/ports"
}
- name: Upload build logs on deps failure
uses: actions/upload-artifact@v3
if: failure()
with:
name: build-logs-${{ env.TRIPLET }}
path: |
${{ env.VCPKG_ROOT }}/buildtrees/**/*.log
- name: Build Test App
shell: pwsh
run: |
$ErrorActionPreference = 'continue'
function exec
{
param ( [ScriptBlock] $ScriptBlock )
& $ScriptBlock 2>&1 | ForEach-Object -Process { "$_" }
if ($LastExitCode -ne 0) { exit $LastExitCode }
}
$env:PATH="$env:VCPKG_ROOT;$env:PATH"
cd $env:GITHUB_WORKSPACE
exec { cmake --build ${{ github.workspace }}\build --config Release --verbose }
- name: Run SDK Tests
shell: pwsh
run: |
$ErrorActionPreference = 'continue'
function exec
{
param ( [ScriptBlock] $ScriptBlock )
& $ScriptBlock 2>&1 | ForEach-Object -Process { "$_" }
if ($LastExitCode -ne 0) { exit $LastExitCode }
}
exec { ${{ github.workspace }}\build\Release\merginmapsmobilesdk.exe }
- name: Get TimeStamp
id: time
uses: nanzm/get-time-action@v2.0
with:
timeZone: 8
format: 'YYYYMMDD'
- name: Create SDK data folder
shell: bash
run: |
mkdir -p ${{ steps.vars.outputs.WORKSPACE_DIR }}/sdk
cp -R ${{ steps.vars.outputs.WORKSPACE_DIR }}/build/vcpkg_installed/${{ env.TRIPLET }}/* ${{ steps.vars.outputs.WORKSPACE_DIR }}/sdk/
rm -rf ${{ steps.vars.outputs.WORKSPACE_DIR }}/sdk/etc
rm -rf ${{ steps.vars.outputs.WORKSPACE_DIR }}/sdk/mkspecs
rm -rf ${{ steps.vars.outputs.WORKSPACE_DIR }}/sdk/share
rm -rf ${{ steps.vars.outputs.WORKSPACE_DIR }}/sdk/tools
SDK_TAR=mergin-maps-input-sdk-qt-${{ env.QT_VERSION }}-${{ env.TRIPLET }}-${{ steps.time.outputs.time }}-${{ github.run_number }}.zip
echo "SDK_TAR=${SDK_TAR}" >> $GITHUB_ENV
- name: Create ZIP package
uses: thedoctor0/zip-release@0.7.1
with:
type: 'zip'
directory: sdk/
filename: ${{ steps.vars.outputs.WORKSPACE_DIR }}/${{ env.SDK_TAR }}
- name: Upload Sdk in Artifacts
uses: actions/upload-artifact@v3
with:
name: sdk-${{ env.TRIPLET }}
path: ${{ steps.vars.outputs.WORKSPACE_DIR }}/${{ env.SDK_TAR }}
if-no-files-found: error
- name: Create Release
if: ${{ github.ref == 'refs/heads/master' }}
uses: ncipollo/release-action@v1
with:
tag: ${{ env.TRIPLET }}-${{ steps.time.outputs.time }}-${{ github.run_number }}
allowUpdates: true
artifacts: ${{ env.SDK_TAR }}
token: ${{ secrets.GITHUB_TOKEN }}