Skip to content

Adding unit test for tmSerialize class #266

Adding unit test for tmSerialize class

Adding unit test for tmSerialize class #266

Workflow file for this run

name: Windows build
on:
push:
release:
types:
- created
jobs:
build:
name: Windows build
runs-on: windows-2022
env:
BUILD_TYPE: RelWithDebInfo
PROJ_LIB: ${{github.workspace}}/bin/share/proj
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Cache Conan libs
id: cache-conan
uses: pat-s/[email protected]
with:
path: C:/Users/runneradmin/.conan
key: conan-windows
- name: Install conan
run: |
python -m pip install --upgrade pip
pip install conan==1.*
# gitlab support
conan config set general.revisions_enabled=1
conan remote add gitlab https://gitlab.com/api/v4/packages/conan --force
conan user gitlab+deploy-token-653038 -r gitlab -p sBwmejFz5Pn-gZPSNFMy
- name: Install libraries
run: |
mkdir ${{github.workspace}}/bin
cd ${{github.workspace}}/bin
conan install .. -o unit_test=True --build=missing
- name: Configure
working-directory: ${{github.workspace}}/bin
run: cmake .. -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DUSE_UNITTEST=1
- name: Build
working-directory: ${{github.workspace}}/bin
run: cmake --build . --config ${{env.BUILD_TYPE}}
- name: Run tests
working-directory: ${{github.workspace}}/bin/bin
run: .\UnitTests
- name: CPack
working-directory: ${{github.workspace}}/bin
run: |
cpack -C ${{env.BUILD_TYPE}} -G ZIP
cpack -C ${{env.BUILD_TYPE}} -G WIX
- name: Upload
uses: actions/upload-artifact@v4
with:
path: |
${{github.workspace}}/bin/*.zip
${{github.workspace}}/bin/*.msi
${{github.workspace}}/bin/bin/*.pdb
upload_all:
name: Upload if release
needs: [build]
runs-on: ubuntu-22.04
if: github.event_name == 'release' && github.event.action == 'created'
steps:
- uses: actions/download-artifact@v4
with:
name: artifact
path: dist
- name: Upload to releases
uses: xresloader/upload-to-github-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
file: "dist/*.zip;dist/*.msi;dist/bin/*.pdb"
tags: true
draft: true
verbose: true