From c21b1ab3eb00d555f5895bb5993907d161864f47 Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Mon, 1 Oct 2018 09:55:09 -0300 Subject: [PATCH 1/6] #3649 Update CI templates - CONAN_REFERENCE is no longer required - Add GCC 8 on default CI template list - Add Clang 5, 6 on default CI template list - Update unit test to avoid CONAN_REFERENCE Signed-off-by: Uilian Ries --- conans/client/cmd/new_ci.py | 8 ++------ conans/test/command/new_test.py | 8 ++++---- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/conans/client/cmd/new_ci.py b/conans/client/cmd/new_ci.py index f9a8b1378be..2eaa3db106e 100644 --- a/conans/client/cmd/new_ci.py +++ b/conans/client/cmd/new_ci.py @@ -3,7 +3,6 @@ travis = """ env: global: - - CONAN_REFERENCE: "{name}/{version}" - CONAN_USERNAME: "{user}" - CONAN_LOGIN_USERNAME: "{user}" - CONAN_CHANNEL: "{channel}" @@ -107,7 +106,6 @@ PYTHON_VERSION: "2.7.8" PYTHON_ARCH: "32" - CONAN_REFERENCE: "{name}/{version}" CONAN_USERNAME: "{user}" CONAN_LOGIN_USERNAME: "{user}" CONAN_CHANNEL: "{channel}" @@ -128,7 +126,6 @@ gitlab = """ variables: CONAN_USERNAME: "{user}" - CONAN_REFERENCE: "{name}/{version}" CONAN_CHANNEL: "{channel}" CONAN_LOGIN_USERNAME: "{user}" {upload} @@ -173,7 +170,6 @@ chmod +x .circleci/run.sh .circleci/run.sh environment: - CONAN_REFERENCE: "{name}/{version}" CONAN_USERNAME: "{user}" CONAN_CHANNEL: "{channel}" {upload} @@ -361,8 +357,8 @@ def ci_get_files(name, version, user, channel, visual_versions, linux_gcc_versio gitlab_gcc_versions or gitlab_clang_versions or circleci_gcc_versions or circleci_clang_versions or circleci_osx_versions): return {} - gcc_versions = ["4.9", "5", "6", "7"] - clang_versions = ["3.9", "4.0"] + gcc_versions = ["4.9", "5", "6", "7", "8"] + clang_versions = ["3.9", "4.0", "5.0", "6.0"] if visual_versions is True: visual_versions = ["12", "14", "15"] if linux_gcc_versions is True: diff --git a/conans/test/command/new_test.py b/conans/test/command/new_test.py index 4237bbde499..58632e11e37 100644 --- a/conans/test/command/new_test.py +++ b/conans/test/command/new_test.py @@ -126,7 +126,7 @@ def new_ci_test(self): appveyor = load(os.path.join(root, "appveyor.yml")) self.assertIn("CONAN_UPLOAD: \"myurl\"", appveyor) - self.assertIn('CONAN_REFERENCE: "MyPackage/1.3"', appveyor) + self.assertNotIn('CONAN_REFERENCE: "MyPackage/1.3"', appveyor) self.assertIn('CONAN_USERNAME: "myuser"', appveyor) self.assertIn('CONAN_CHANNEL: "testing"', appveyor) self.assertIn('CONAN_VISUAL_VERSIONS: 12', appveyor) @@ -135,7 +135,7 @@ def new_ci_test(self): travis = load(os.path.join(root, ".travis.yml")) self.assertIn("- CONAN_UPLOAD: \"myurl\"", travis) - self.assertIn('- CONAN_REFERENCE: "MyPackage/1.3"', travis) + self.assertNotIn('- CONAN_REFERENCE: "MyPackage/1.3"', travis) self.assertIn('- CONAN_USERNAME: "myuser"', travis) self.assertIn('- CONAN_CHANNEL: "testing"', travis) self.assertIn('env: CONAN_GCC_VERSIONS=5 CONAN_DOCKER_IMAGE=lasote/conangcc5', @@ -143,14 +143,14 @@ def new_ci_test(self): gitlab = load(os.path.join(root, ".gitlab-ci.yml")) self.assertIn("CONAN_UPLOAD: \"myurl\"", gitlab) - self.assertIn('CONAN_REFERENCE: "MyPackage/1.3"', gitlab) + self.assertNotIn('CONAN_REFERENCE: "MyPackage/1.3"', gitlab) self.assertIn('CONAN_USERNAME: "myuser"', gitlab) self.assertIn('CONAN_CHANNEL: "testing"', gitlab) self.assertIn('CONAN_GCC_VERSIONS: "5"', gitlab) circleci = load(os.path.join(root, ".circleci", "config.yml")) self.assertIn("CONAN_UPLOAD: \"myurl\"", circleci) - self.assertIn('CONAN_REFERENCE: "MyPackage/1.3"', circleci) + self.assertNotIn('CONAN_REFERENCE: "MyPackage/1.3"', circleci) self.assertIn('CONAN_USERNAME: "myuser"', circleci) self.assertIn('CONAN_CHANNEL: "testing"', circleci) self.assertIn('CONAN_GCC_VERSIONS: "5"', circleci) From 603c2fec5e65ffdd4557a7fac12f83c6a1b2ed40 Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Tue, 2 Oct 2018 18:26:06 -0300 Subject: [PATCH 2/6] #3649 Update Conan Package Tools template - User new CPT import Signed-off-by: Uilian Ries --- conans/client/cmd/new_ci.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conans/client/cmd/new_ci.py b/conans/client/cmd/new_ci.py index 2eaa3db106e..c79f34069d0 100644 --- a/conans/client/cmd/new_ci.py +++ b/conans/client/cmd/new_ci.py @@ -47,7 +47,7 @@ env: CONAN_APPLE_CLANG_VERSIONS={version} """ -build_py = """from conan.packager import ConanMultiPackager +build_py = """from cpt.packager import ConanMultiPackager if __name__ == "__main__": From 806fce7b23d0445aaef952b0f4df2d5190f3d63a Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Mon, 8 Oct 2018 08:24:25 -0300 Subject: [PATCH 3/6] #3649 Revert Conan reference in new CI - Conan reference is mandatory when the recipe does not contain name and version. Signed-off-by: Uilian Ries --- conans/client/cmd/new_ci.py | 4 ++++ conans/test/command/new_test.py | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/conans/client/cmd/new_ci.py b/conans/client/cmd/new_ci.py index c79f34069d0..1c1f391a84c 100644 --- a/conans/client/cmd/new_ci.py +++ b/conans/client/cmd/new_ci.py @@ -3,6 +3,7 @@ travis = """ env: global: + - CONAN_REFERENCE: "{name}/{version}" - CONAN_USERNAME: "{user}" - CONAN_LOGIN_USERNAME: "{user}" - CONAN_CHANNEL: "{channel}" @@ -106,6 +107,7 @@ PYTHON_VERSION: "2.7.8" PYTHON_ARCH: "32" + CONAN_REFERENCE: "{name}/{version}" CONAN_USERNAME: "{user}" CONAN_LOGIN_USERNAME: "{user}" CONAN_CHANNEL: "{channel}" @@ -126,6 +128,7 @@ gitlab = """ variables: CONAN_USERNAME: "{user}" + CONAN_REFERENCE: "{name}/{version}" CONAN_CHANNEL: "{channel}" CONAN_LOGIN_USERNAME: "{user}" {upload} @@ -170,6 +173,7 @@ chmod +x .circleci/run.sh .circleci/run.sh environment: + CONAN_REFERENCE: "{name}/{version}" CONAN_USERNAME: "{user}" CONAN_CHANNEL: "{channel}" {upload} diff --git a/conans/test/command/new_test.py b/conans/test/command/new_test.py index 58632e11e37..4237bbde499 100644 --- a/conans/test/command/new_test.py +++ b/conans/test/command/new_test.py @@ -126,7 +126,7 @@ def new_ci_test(self): appveyor = load(os.path.join(root, "appveyor.yml")) self.assertIn("CONAN_UPLOAD: \"myurl\"", appveyor) - self.assertNotIn('CONAN_REFERENCE: "MyPackage/1.3"', appveyor) + self.assertIn('CONAN_REFERENCE: "MyPackage/1.3"', appveyor) self.assertIn('CONAN_USERNAME: "myuser"', appveyor) self.assertIn('CONAN_CHANNEL: "testing"', appveyor) self.assertIn('CONAN_VISUAL_VERSIONS: 12', appveyor) @@ -135,7 +135,7 @@ def new_ci_test(self): travis = load(os.path.join(root, ".travis.yml")) self.assertIn("- CONAN_UPLOAD: \"myurl\"", travis) - self.assertNotIn('- CONAN_REFERENCE: "MyPackage/1.3"', travis) + self.assertIn('- CONAN_REFERENCE: "MyPackage/1.3"', travis) self.assertIn('- CONAN_USERNAME: "myuser"', travis) self.assertIn('- CONAN_CHANNEL: "testing"', travis) self.assertIn('env: CONAN_GCC_VERSIONS=5 CONAN_DOCKER_IMAGE=lasote/conangcc5', @@ -143,14 +143,14 @@ def new_ci_test(self): gitlab = load(os.path.join(root, ".gitlab-ci.yml")) self.assertIn("CONAN_UPLOAD: \"myurl\"", gitlab) - self.assertNotIn('CONAN_REFERENCE: "MyPackage/1.3"', gitlab) + self.assertIn('CONAN_REFERENCE: "MyPackage/1.3"', gitlab) self.assertIn('CONAN_USERNAME: "myuser"', gitlab) self.assertIn('CONAN_CHANNEL: "testing"', gitlab) self.assertIn('CONAN_GCC_VERSIONS: "5"', gitlab) circleci = load(os.path.join(root, ".circleci", "config.yml")) self.assertIn("CONAN_UPLOAD: \"myurl\"", circleci) - self.assertNotIn('CONAN_REFERENCE: "MyPackage/1.3"', circleci) + self.assertIn('CONAN_REFERENCE: "MyPackage/1.3"', circleci) self.assertIn('CONAN_USERNAME: "myuser"', circleci) self.assertIn('CONAN_CHANNEL: "testing"', circleci) self.assertIn('CONAN_GCC_VERSIONS: "5"', circleci) From a6b90c320e8177b6b4833bb55024295cb4f512f1 Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Fri, 19 Oct 2018 09:37:21 -0300 Subject: [PATCH 4/6] #3649 Update appveyor template to run python3 - Replace Python27 by Python37. Both Python arch and version are no longer required. - Update Travis using Xenial as base image Signed-off-by: Uilian Ries --- conans/client/cmd/new_ci.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/conans/client/cmd/new_ci.py b/conans/client/cmd/new_ci.py index 1c1f391a84c..64b0304973e 100644 --- a/conans/client/cmd/new_ci.py +++ b/conans/client/cmd/new_ci.py @@ -10,6 +10,7 @@ {upload} linux: &linux os: linux + dist: xenial sudo: required language: python python: "3.6" @@ -103,9 +104,7 @@ appveyor = r"""build: false environment: - PYTHON: "C:\\Python27" - PYTHON_VERSION: "2.7.8" - PYTHON_ARCH: "32" + PYTHON: "C:\\Python37" CONAN_REFERENCE: "{name}/{version}" CONAN_USERNAME: "{user}" From 1841836be85576827951a77e021a9682206e0ac5 Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Fri, 19 Oct 2018 09:58:34 -0300 Subject: [PATCH 5/6] #3649 Update docker image names Signed-off-by: Uilian Ries --- conans/client/cmd/new_ci.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/conans/client/cmd/new_ci.py b/conans/client/cmd/new_ci.py index 64b0304973e..f28182f28b8 100644 --- a/conans/client/cmd/new_ci.py +++ b/conans/client/cmd/new_ci.py @@ -36,11 +36,11 @@ linux_config_gcc = linux_config + """ - env: CONAN_GCC_VERSIONS={version} CONAN_DOCKER_IMAGE=lasote/conangcc{name} + env: CONAN_GCC_VERSIONS={version} CONAN_DOCKER_IMAGE=conanio/gcc{name} """ linux_config_clang = linux_config + """ - env: CONAN_CLANG_VERSIONS={version} CONAN_DOCKER_IMAGE=lasote/conanclang{name} + env: CONAN_CLANG_VERSIONS={version} CONAN_DOCKER_IMAGE=conanio/clang{name} """ osx_config = """ @@ -142,7 +142,7 @@ gitlab_config_gcc = """ gcc-{version}: - image: lasote/conangcc{name} + image: conanio/gcc{name} variables: CONAN_GCC_VERSIONS: "{version}" <<: *build-template @@ -150,7 +150,7 @@ gitlab_config_clang = """ clang-{version}: - image: lasote/conanclang{name} + image: conanio/clang{name} variables: CONAN_CLANG_VERSIONS: "{version}" <<: *build-template @@ -184,7 +184,7 @@ circleci_config_gcc = """ gcc-{name}: docker: - - image: lasote/conangcc{name} + - image: conanio/gcc{name} environment: - CONAN_GCC_VERSIONS: "{version}" <<: *conan-steps @@ -193,7 +193,7 @@ circleci_config_clang = """ clang-{name}: docker: - - image: lasote/conanclang{name} + - image: conanio/clang{name} environment: - CONAN_CLANG_VERSIONS: "{version}" <<: *conan-steps From ab8456bd5445d3a54b3bae8a71b7083183d0604a Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Fri, 19 Oct 2018 11:10:29 -0300 Subject: [PATCH 6/6] #3649 Update unit test for new CI Signed-off-by: Uilian Ries --- conans/test/command/new_test.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/conans/test/command/new_test.py b/conans/test/command/new_test.py index 4237bbde499..db4f9e84246 100644 --- a/conans/test/command/new_test.py +++ b/conans/test/command/new_test.py @@ -129,6 +129,7 @@ def new_ci_test(self): self.assertIn('CONAN_REFERENCE: "MyPackage/1.3"', appveyor) self.assertIn('CONAN_USERNAME: "myuser"', appveyor) self.assertIn('CONAN_CHANNEL: "testing"', appveyor) + self.assertIn(r'PYTHON: "C:\\Python37"', appveyor) self.assertIn('CONAN_VISUAL_VERSIONS: 12', appveyor) self.assertIn('CONAN_VISUAL_VERSIONS: 14', appveyor) self.assertIn('CONAN_VISUAL_VERSIONS: 15', appveyor) @@ -138,7 +139,7 @@ def new_ci_test(self): self.assertIn('- CONAN_REFERENCE: "MyPackage/1.3"', travis) self.assertIn('- CONAN_USERNAME: "myuser"', travis) self.assertIn('- CONAN_CHANNEL: "testing"', travis) - self.assertIn('env: CONAN_GCC_VERSIONS=5 CONAN_DOCKER_IMAGE=lasote/conangcc5', + self.assertIn('env: CONAN_GCC_VERSIONS=5 CONAN_DOCKER_IMAGE=conanio/gcc5', travis) gitlab = load(os.path.join(root, ".gitlab-ci.yml"))