From bef9281645181cc11a5ccf5d51a206fc3cdd9afa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Tue, 16 May 2017 20:45:11 +0200 Subject: [PATCH 01/10] Add CPack to package result binary --- CMakeLists.txt | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1f6f5aed1..f7edd6ee0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,10 +14,8 @@ HunterGate( ) -cmake_policy(SET CMP0042 OLD) # fix MACOSX_RPATH -cmake_policy(SET CMP0048 NEW) # allow VERSION argument in project() - -project(ethminer VERSION 0.10.0) +project(ethminer) +set(PROJECT_VERSION 0.10.0a2) # link_directories interprate relative paths with respect to CMAKE_CURRENT_SOURCE_DIR cmake_policy(SET CMP0015 NEW) @@ -123,3 +121,14 @@ if(ETHSTRATUM) endif() add_subdirectory(libethcore) add_subdirectory(ethminer) + + +if(WIN32) + set(CPACK_GENERATOR ZIP) +else() + set(CPACK_GENERATOR TGZ) +endif() +set(CPACK_PACKAGE_FILE_NAME ${PROJECT_NAME}-${PROJECT_VERSION}-${CMAKE_SYSTEM_NAME}) +set(CPACK_PACKAGE_CHECKSUM SHA256) +set(CPACK_INCLUDE_TOPLEVEL_DIRECTORY FALSE) +include(CPack) \ No newline at end of file From e730c834d85c764d5a3df986c666e819f06f4990 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Tue, 16 May 2017 00:39:46 +0200 Subject: [PATCH 02/10] Travis CI: deploy releases --- .travis.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.travis.yml b/.travis.yml index 91eee440d..13204fc4e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,7 @@ language: cpp branches: only: + - /^v\d+\..+$/ - master matrix: include: @@ -24,3 +25,14 @@ script: - build/ethminer/ethminer --list-devices -U - if [ "$TRAVIS_OS_NAME" = linux ]; then ldd -v build/ethminer/ethminer; fi - if [ "$TRAVIS_OS_NAME" = osx ]; then otool -L build/ethminer/ethminer; fi + - cmake --build build --target package + +deploy: + provider: releases + api_key: + secure: "KfYTW8o20BUEZc57vF3H4+qXgpDsMeWk3N4IQtNKkdhFzEUzQaXi1WHRtvcR5kq+rvDiXwy0fELglDZpCSa4wfQvM5fKlb7WPQgkyRZyCpwnXlqvb6dL8KxJekQHZ5fFpzc/ow0dx/UqzJgv+cWDnBEK/gl+9j+vt9oq1nV1LSaxmtO3Qs7y+ffq5Tbzo06q6/CfeyOZi23g+AYtnoEBKwYqa807atWM6cJpudPmyhYHQFgaQZMfzk44z/MnJb7nxtkqcx57KWaY2EHlFj6yrHMcXWyM8j+P0ZBwUbOpHkWvBpgmDKR2J3u0WmiJDDo3E6K0g9QgbAnF5+yqvpBC5kaSHAaicJ3+7ghSgo18Eea0BkLbmb0t93h5NJfRhg0GDjgG3LkHao9ALM35x3OXG38JI6bOLd6jSV2Vkg8qLWAZjP1TUb/4VTIFnyITSv+xrY7ZP9D0XcRybZ5Z0YnaI/J6NFJct9ICAlQ6cHkS0MO6PICTSbZbKhbDZP0Lt6iDDUeje5+uvPAl0uuzuciSqEM77JWYN/edOXurgkfljEny3P96AW70gUUBTVEE+4tjng4DMLHCH/1Jg/WfMPfSVC3AUR0WbvjMki6veMt37fy8Jys8gFpwZbMG3cCSkYXDDFWF/Q+p2v6pX76CZZz+LxO2XcZ7x4bw+c7AGzRWV7c=" + file_glob: true + file: build/ethminer-*.tar.gz + skip_cleanup: true + on: + tags: true From 88e8f62842aedcc1c1fa64461cb115633e2555ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Tue, 16 May 2017 21:46:12 +0200 Subject: [PATCH 03/10] AppVeyor CI: Build ethminer package --- appveyor.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 8fc889ced..47c809fbe 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -10,10 +10,9 @@ cache: install: before_build: - cmake -G "Visual Studio 14 2015 Win64" -H. -Bbuild -build: - project: c:/projects/ethminer/build/ethminer.sln - parallel: true - verbosity: minimal +build_script: + - cmake --build build --config Release +after_build: + - cmake --build build --config Release --target package artifacts: - - path: build/ethminer/Release/ethminer.exe - name: ethminer + - path: build/ethminer-*.zip From 5e2e9b30ddddff661ad0b8f74f5614fad288a37f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Tue, 16 May 2017 22:27:16 +0200 Subject: [PATCH 04/10] Configure bumpversion --- .bumpversion.cfg | 10 ++++++++++ CMakeLists.txt | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 .bumpversion.cfg diff --git a/.bumpversion.cfg b/.bumpversion.cfg new file mode 100644 index 000000000..e377af70c --- /dev/null +++ b/.bumpversion.cfg @@ -0,0 +1,10 @@ +[bumpversion] +current_version = 0.10.0rc2 +commit = True +tag = True +parse = (?P\d+)\.(?P\d+)\.(?P\d+)(rc(?P\d+))? +serialize = + {major}.{minor}.{patch}rc{rc} + {major}.{minor}.{patch} + +[bumpversion:file:CMakeLists.txt] \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index f7edd6ee0..90751a3ba 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,7 +15,7 @@ HunterGate( project(ethminer) -set(PROJECT_VERSION 0.10.0a2) +set(PROJECT_VERSION 0.10.0rc2) # link_directories interprate relative paths with respect to CMAKE_CURRENT_SOURCE_DIR cmake_policy(SET CMP0015 NEW) From eb372c83ee120180af7fb0afd2caaa460d11fd54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Tue, 16 May 2017 23:29:06 +0200 Subject: [PATCH 05/10] Configure AppVeyor deployment --- .bumpversion.cfg | 11 ++++++----- CMakeLists.txt | 2 +- appveyor.yml | 15 +++++++++++++++ 3 files changed, 22 insertions(+), 6 deletions(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index e377af70c..d4cc60bfa 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,10 +1,11 @@ [bumpversion] -current_version = 0.10.0rc2 +current_version = 0.10.0rc8 commit = True tag = True parse = (?P\d+)\.(?P\d+)\.(?P\d+)(rc(?P\d+))? -serialize = - {major}.{minor}.{patch}rc{rc} - {major}.{minor}.{patch} +serialize = + {major}.{minor}.{patch}rc{rc} + {major}.{minor}.{patch} + +[bumpversion:file:CMakeLists.txt] -[bumpversion:file:CMakeLists.txt] \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index 90751a3ba..58737334b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,7 +15,7 @@ HunterGate( project(ethminer) -set(PROJECT_VERSION 0.10.0rc2) +set(PROJECT_VERSION 0.10.0rc8) # link_directories interprate relative paths with respect to CMAKE_CURRENT_SOURCE_DIR cmake_policy(SET CMP0015 NEW) diff --git a/appveyor.yml b/appveyor.yml index 47c809fbe..5b0f3664f 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -2,6 +2,7 @@ version: "{build}" branches: only: - master + - /v\d+\..+/ os: Visual Studio 2015 configuration: - Release @@ -14,5 +15,19 @@ build_script: - cmake --build build --config Release after_build: - cmake --build build --config Release --target package + artifacts: - path: build/ethminer-*.zip + name: ethminer +deploy: + tag: $(appveyor_repo_tag_name) + description: '' + provider: GitHub + auth_token: + secure: uDRcvbW+9GIyKlZ9guJfWOQ6jg0An6eULg6mEkYgdKn/GVNpYSKvO5oHxP0U8a+e + artifact: ethminer + draft: false + prerelease: true + force_update: true + on: + appveyor_repo_tag: true From ac5d0a0d830d0ab51a1231fec0d122e043112592 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Wed, 17 May 2017 15:32:32 +0200 Subject: [PATCH 06/10] CMake: Dump some variables to be used by CIs --- CMakeLists.txt | 13 ++++++++++++- appveyor.yml | 12 ++++++++---- cmake/variables.ps.in | 2 ++ cmake/variables.sh.in | 2 ++ 4 files changed, 24 insertions(+), 5 deletions(-) create mode 100644 cmake/variables.ps.in create mode 100644 cmake/variables.sh.in diff --git a/CMakeLists.txt b/CMakeLists.txt index 58737334b..6db27b1cb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -131,4 +131,15 @@ endif() set(CPACK_PACKAGE_FILE_NAME ${PROJECT_NAME}-${PROJECT_VERSION}-${CMAKE_SYSTEM_NAME}) set(CPACK_PACKAGE_CHECKSUM SHA256) set(CPACK_INCLUDE_TOPLEVEL_DIRECTORY FALSE) -include(CPack) \ No newline at end of file +include(CPack) + + +# Export some variables for CIs +if(PROJECT_VERSION MATCHES "^([0-9]+)\\.([0-9]+)\\.([0-9]+)$") + set(PROJECT_VERSION_IS_PRERELEASE false) +else() + set(PROJECT_VERSION_IS_PRERELEASE true) +endif() +message("Prerelease: ${PROJECT_VERSION_IS_PRERELEASE}") +configure_file(cmake/variables.sh.in variables.sh) +configure_file(cmake/variables.ps.in variables.ps) \ No newline at end of file diff --git a/appveyor.yml b/appveyor.yml index 5b0f3664f..3b3674f5e 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -19,15 +19,19 @@ after_build: artifacts: - path: build/ethminer-*.zip name: ethminer + +before_deploy: + - . build/variables.ps + - echo ethminer $ethminer_version (prerelease $ethminer_version_is_prerelease) deploy: - tag: $(appveyor_repo_tag_name) + release: ethminer $ethminer_version description: '' provider: GitHub auth_token: secure: uDRcvbW+9GIyKlZ9guJfWOQ6jg0An6eULg6mEkYgdKn/GVNpYSKvO5oHxP0U8a+e artifact: ethminer - draft: false - prerelease: true - force_update: true + draft: true + prerelease: $ethminer_version_is_prerelease + force_update: false on: appveyor_repo_tag: true diff --git a/cmake/variables.ps.in b/cmake/variables.ps.in new file mode 100644 index 000000000..73c902e11 --- /dev/null +++ b/cmake/variables.ps.in @@ -0,0 +1,2 @@ +$ethminer_version=@PROJECT_VERSION@ +$ethminer_version_is_prerelease=@PROJECT_VERSION_IS_PRERELEASE@ diff --git a/cmake/variables.sh.in b/cmake/variables.sh.in new file mode 100644 index 000000000..988249831 --- /dev/null +++ b/cmake/variables.sh.in @@ -0,0 +1,2 @@ +ETHMINER_VERSION=@PROJECT_VERSION@ +ETHMINER_VERSION_IS_PRERELEASE=@PROJECT_VERSION_IS_PRERELEASE@ \ No newline at end of file From ffad3a55b626df03061e89e2fa2b861631a595d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Wed, 17 May 2017 19:11:58 +0200 Subject: [PATCH 07/10] AppVeyor CI: Fix before_deploy script --- .bumpversion.cfg | 2 +- CMakeLists.txt | 4 ++-- appveyor.yml | 18 ++++++++++-------- cmake/variables.ps.in | 2 -- cmake/variables.ps1.in | 2 ++ cmake/variables.sh.in | 4 ++-- 6 files changed, 17 insertions(+), 15 deletions(-) delete mode 100644 cmake/variables.ps.in create mode 100644 cmake/variables.ps1.in diff --git a/.bumpversion.cfg b/.bumpversion.cfg index d4cc60bfa..560c48528 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.10.0rc8 +current_version = 0.10.1 commit = True tag = True parse = (?P\d+)\.(?P\d+)\.(?P\d+)(rc(?P\d+))? diff --git a/CMakeLists.txt b/CMakeLists.txt index 6db27b1cb..2f70171ca 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,7 +15,7 @@ HunterGate( project(ethminer) -set(PROJECT_VERSION 0.10.0rc8) +set(PROJECT_VERSION 0.10.1) # link_directories interprate relative paths with respect to CMAKE_CURRENT_SOURCE_DIR cmake_policy(SET CMP0015 NEW) @@ -142,4 +142,4 @@ else() endif() message("Prerelease: ${PROJECT_VERSION_IS_PRERELEASE}") configure_file(cmake/variables.sh.in variables.sh) -configure_file(cmake/variables.ps.in variables.ps) \ No newline at end of file +configure_file(cmake/variables.ps1.in variables.ps1) \ No newline at end of file diff --git a/appveyor.yml b/appveyor.yml index 3b3674f5e..4f3cd133a 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -21,17 +21,19 @@ artifacts: name: ethminer before_deploy: - - . build/variables.ps - - echo ethminer $ethminer_version (prerelease $ethminer_version_is_prerelease) + # Read variables dumped by CMake configuration. + - ps: . build/variables.ps1 deploy: - release: ethminer $ethminer_version - description: '' + # Create GitHub release, also set the release name and description. provider: GitHub + tag: $(appveyor_repo_tag_name) + release: ethminer $(ethminer_version) + description: '' + force_update: true # Force update in case Travis CI created the release before. + prerelease: $(ethminer_version_is_prerelease) + draft: false + artifact: ethminer auth_token: secure: uDRcvbW+9GIyKlZ9guJfWOQ6jg0An6eULg6mEkYgdKn/GVNpYSKvO5oHxP0U8a+e - artifact: ethminer - draft: true - prerelease: $ethminer_version_is_prerelease - force_update: false on: appveyor_repo_tag: true diff --git a/cmake/variables.ps.in b/cmake/variables.ps.in deleted file mode 100644 index 73c902e11..000000000 --- a/cmake/variables.ps.in +++ /dev/null @@ -1,2 +0,0 @@ -$ethminer_version=@PROJECT_VERSION@ -$ethminer_version_is_prerelease=@PROJECT_VERSION_IS_PRERELEASE@ diff --git a/cmake/variables.ps1.in b/cmake/variables.ps1.in new file mode 100644 index 000000000..4f38b7a79 --- /dev/null +++ b/cmake/variables.ps1.in @@ -0,0 +1,2 @@ +$env:ethminer_version="@PROJECT_VERSION@" +$env:ethminer_version_is_prerelease="@PROJECT_VERSION_IS_PRERELEASE@" diff --git a/cmake/variables.sh.in b/cmake/variables.sh.in index 988249831..c563a9e5e 100644 --- a/cmake/variables.sh.in +++ b/cmake/variables.sh.in @@ -1,2 +1,2 @@ -ETHMINER_VERSION=@PROJECT_VERSION@ -ETHMINER_VERSION_IS_PRERELEASE=@PROJECT_VERSION_IS_PRERELEASE@ \ No newline at end of file +ETHMINER_VERSION='@PROJECT_VERSION@' +ETHMINER_VERSION_IS_PRERELEASE='@PROJECT_VERSION_IS_PRERELEASE@' \ No newline at end of file From e299801de78cc8602acdc86c9c62a45b4c143366 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Wed, 17 May 2017 21:28:56 +0200 Subject: [PATCH 08/10] Tweak bumpversion config to add dev prerelease --- .bumpversion.cfg | 13 ++++++++++--- CMakeLists.txt | 2 +- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 560c48528..ecee8e1fd 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,11 +1,18 @@ [bumpversion] -current_version = 0.10.1 +current_version = 0.10.0.dev1 commit = True tag = True -parse = (?P\d+)\.(?P\d+)\.(?P\d+)(rc(?P\d+))? +parse = (?P\d+)\.(?P\d+)\.(?P\d+)((?Prc|\.dev)(?P\d+))? serialize = - {major}.{minor}.{patch}rc{rc} + {major}.{minor}.{patch}{prerel}{prerelver} {major}.{minor}.{patch} +[bumpversion:part:prerel] +optional_value = rel +values = + .dev + rc + rel + [bumpversion:file:CMakeLists.txt] diff --git a/CMakeLists.txt b/CMakeLists.txt index 2f70171ca..2f542f608 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,7 +15,7 @@ HunterGate( project(ethminer) -set(PROJECT_VERSION 0.10.1) +set(PROJECT_VERSION 0.10.0.dev1) # link_directories interprate relative paths with respect to CMAKE_CURRENT_SOURCE_DIR cmake_policy(SET CMP0015 NEW) From e997f417c354021dcefbe3f68f2058a808ed6385 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Wed, 17 May 2017 21:56:36 +0200 Subject: [PATCH 09/10] =?UTF-8?q?Bump=20version:=200.10.0.dev1=20=E2=86=92?= =?UTF-8?q?=200.10.0.dev2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index ecee8e1fd..626e09e06 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.10.0.dev1 +current_version = 0.10.0.dev2 commit = True tag = True parse = (?P\d+)\.(?P\d+)\.(?P\d+)((?Prc|\.dev)(?P\d+))? diff --git a/CMakeLists.txt b/CMakeLists.txt index 2f542f608..ca9076119 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,7 +15,7 @@ HunterGate( project(ethminer) -set(PROJECT_VERSION 0.10.0.dev1) +set(PROJECT_VERSION 0.10.0.dev2) # link_directories interprate relative paths with respect to CMAKE_CURRENT_SOURCE_DIR cmake_policy(SET CMP0015 NEW) From bcaf05faebae1de7e82dcab0fadbe6d5cf8361fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Wed, 17 May 2017 22:03:31 +0200 Subject: [PATCH 10/10] =?UTF-8?q?Bump=20version:=200.10.0.dev2=20=E2=86=92?= =?UTF-8?q?=200.10.0.dev3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 626e09e06..53ffd7cce 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.10.0.dev2 +current_version = 0.10.0.dev3 commit = True tag = True parse = (?P\d+)\.(?P\d+)\.(?P\d+)((?Prc|\.dev)(?P\d+))? diff --git a/CMakeLists.txt b/CMakeLists.txt index ca9076119..3fa768d38 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,7 +15,7 @@ HunterGate( project(ethminer) -set(PROJECT_VERSION 0.10.0.dev2) +set(PROJECT_VERSION 0.10.0.dev3) # link_directories interprate relative paths with respect to CMAKE_CURRENT_SOURCE_DIR cmake_policy(SET CMP0015 NEW)