85 lines
2.4 KiB
YAML
85 lines
2.4 KiB
YAML
stages:
|
|
- build
|
|
- test
|
|
|
|
linux:build:
|
|
image: debian
|
|
stage: build
|
|
|
|
before_script:
|
|
- apt update
|
|
- apt install -y libsqlite3-dev libcurl4-openssl-dev g++ make build-essential libgtkmm-3.0-dev gettext git
|
|
- export CXX=g++
|
|
- git submodule update --init rapidjson
|
|
script:
|
|
- make
|
|
- make gui
|
|
artifacts:
|
|
paths:
|
|
- tv_rename
|
|
- tv_rename_gui
|
|
expire_in: 30 min
|
|
|
|
linux:codacy:
|
|
image: debian
|
|
stage: test
|
|
needs: []
|
|
before_script:
|
|
- apt update
|
|
- apt install -y libsqlite3-dev libcurl4-openssl-dev g++ make build-essential gettext git gcovr sudo
|
|
- export CXX=g++
|
|
- git submodule update --init rapidjson
|
|
script:
|
|
- make test.out
|
|
- make check
|
|
- find . -type f -name "*.gcno" -execdir gcov -pb -r {} +
|
|
- gcovr --root . -k -j 2 --xml -o gcovr_report.xml --exclude-directories "tests" --exclude-directories "gtk" --exclude-directories "win*" --exclude-directories "sqlite-am*" --exclude-directories "rapidjson"
|
|
- bash <(curl -Ls https://coverage.codacy.com/get.sh) report -r "gcovr_report.xml" --language CPP --force-language
|
|
|
|
formatting:test:
|
|
image: debian
|
|
stage: test
|
|
needs: []
|
|
|
|
before_script:
|
|
- apt update
|
|
- apt install -y clang-format
|
|
script:
|
|
- FORMAT="ok"
|
|
- while read f ; do clang-format -style=file "$f" > temp.pp ; if [ "$f" == "./tests/catch.hpp" ] ; then continue ; fi ; if [ $(diff temp.pp "$f" | wc -l) -gt 0 ] ; then echo "$f needs reformatting" ; FORMAT="nok" ; fi ; done <<< $(find . -iname "*pp")
|
|
- rm temp.pp
|
|
- 'if [ "$FORMAT" = "nok" ] ; then exit 1 ; fi'
|
|
|
|
windows:build:
|
|
tags:
|
|
- shared-windows
|
|
- windows
|
|
- windows-1809
|
|
stage: build
|
|
|
|
before_script:
|
|
- "$env:LC_ALL='C.UTF-8'"
|
|
- "$OutputEncoding = [System.Text.Encoding]::Unicode"
|
|
- CHCP 65001
|
|
- choco install make
|
|
- git submodule update --init
|
|
script:
|
|
- cmd /c '"C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvars64.bat" && set CXX=cl.exe && make windows'
|
|
- cmd /c '"C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvars64.bat" && set CXX=cl.exe && make windows_gui'
|
|
artifacts:
|
|
paths:
|
|
- tv_rename.exe
|
|
- tv_rename_gui.exe
|
|
expire_in: 30 min
|
|
|
|
windows:test:
|
|
tags:
|
|
- shared-windows
|
|
- windows
|
|
- windows-1809
|
|
stage: test
|
|
needs: ["windows:build"]
|
|
|
|
script:
|
|
- .\tv_rename.exe --help
|