From 79a4512d5371eb802f21adf36eaa168d503cb895 Mon Sep 17 00:00:00 2001 From: Matthew Date: Wed, 30 Sep 2020 11:57:06 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=8Eci:=20CI=20enable?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitlab-ci.yml | 25 +++++++++++++++++++++++++ CHANGLOG.md | 13 +++++++++++++ CMakeLists.txt | 22 ++++++++++++++++++++++ LICENSE | 21 +++++++++++++++++++++ README.md | 3 +++ 5 files changed, 84 insertions(+) create mode 100644 .gitlab-ci.yml create mode 100644 CHANGLOG.md create mode 100644 LICENSE create mode 100644 README.md diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..e319f7e --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,25 @@ +stages: + - build + - test + - deploy + +build: + image: sh.matthewgong.com:5432/matt/qt5-cross-win64 + stage: build + script: + - mkdir build && cd build + - cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=/opt/win64/x86_64-mingw-w64-toolchain.cmake + - make + - make package + artifacts: + name: "$CI_COMMIT_REF_SLUG" + paths: + - "build/*-win64.zip" + +deploy_tag: + image: sh.matthewgong.com:5432/matt/gitlab-auto-release + stage: deploy + script: + - gitlab_auto_release -c CHANGELOG.md -d "This was auto-generated by the gitlab-auto-release tool, https://gitlab.com/gitlab-automation-toolkit/gitlab-auto-release." --artifacts build + only: + - tags diff --git a/CHANGLOG.md b/CHANGLOG.md new file mode 100644 index 0000000..8ba5228 --- /dev/null +++ b/CHANGLOG.md @@ -0,0 +1,13 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). + +## [Unreleased] + +## [0.1.0] - 2020-02-06 +### Added +- add vscode and CI/CD support + diff --git a/CMakeLists.txt b/CMakeLists.txt index 3887085..893d260 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -57,3 +57,25 @@ endif() target_link_libraries(proj41_sil PRIVATE Qt5::Widgets Qt5::Network) qt5_create_translation(QM_FILES ${CMAKE_SOURCE_DIR} ${TS_FILES}) + +include(GNUInstallDirs) + +message("CMAKE_INSTALL_BINDIR=${CMAKE_INSTALL_BINDIR}") +install(TARGETS proj41_sil RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}") + +set(CPACK_GENERATOR ZIP) +set(CPACK_PACKAGE_VERSION_MAJOR 0) +set(CPACK_PACKAGE_VERSION_MINOR 1) +set(CPACK_PACKAGE_VERSION_PATCH 2) +set(CPACK_INSTALL_COMMANDS + "/bin/bash -c \\\"mkdir -p $CMAKE_INSTALL_PREFIX/bin\\\"" + "/bin/bash -c \\\"mkdir -p $CMAKE_INSTALL_PREFIX/lib\\\"" + "/bin/bash -c \\\"cp /opt/win64/bin/*.dll $CMAKE_INSTALL_PREFIX/bin\\\"" + "/bin/bash -c \\\"cp /opt/win64/qt.conf $CMAKE_INSTALL_PREFIX/bin\\\"" + "/bin/bash -c \\\"cp -r /opt/win64/plugins $CMAKE_INSTALL_PREFIX/lib\\\"" + "/bin/bash -c \\\"cp -r /opt/win64/qml $CMAKE_INSTALL_PREFIX/lib\\\"" + "/bin/bash -c \\\"cp -r /opt/win64/lib/grantlee $CMAKE_INSTALL_PREFIX/lib\\\"" + "/bin/bash -c \\\"cp /usr/x86_64-w64-mingw32/lib/libwinpthread-1.dll $CMAKE_INSTALL_PREFIX/bin\\\"" + "/bin/bash -c \\\"cp /usr/lib/gcc/x86_64-w64-mingw32/8.3-posix/*.dll $CMAKE_INSTALL_PREFIX/bin\\\"" +) +include(CPack) diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..2255656 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 Matthew GONG + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..9a09db5 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# Proj41 SIL + +SIL programme for Proj41