-
Notifications
You must be signed in to change notification settings - Fork 1.2k
chore: Support Java11, Python3.8, and Nodejs12.x runtimes #1549
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
15e617f
a009a08
3e83ad9
0168a1c
5efc92b
dad947f
588e2d5
6974996
e7fbc41
184fea0
92b8695
a5e0b14
17cfa92
fef4ff2
ac89768
43f428d
adc8dda
bba35e4
9b2d682
e309421
28ac955
f1935ac
e80e125
ae95ea0
4eafdc9
81ed055
7008407
e1ee382
2badbdb
9b68a19
e0d4c24
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,12 +13,14 @@ environment: | |
| PYTHON_VERSION: '3.6.8' | ||
| PYTHON_ARCH: '64' | ||
| NOSE_PARAMETERIZED_NO_WARN: 1 | ||
| INSTALL_PY_37_PIP: 1 | ||
|
|
||
| - PYTHON_HOME: "C:\\Python37-x64" | ||
| PYTHON_VERSION: '3.7.4' | ||
| PYTHON_ARCH: '64' | ||
| RUN_SMOKE: 1 | ||
| NOSE_PARAMETERIZED_NO_WARN: 1 | ||
| INSTALL_PY_36_PIP: 1 | ||
|
|
||
| for: | ||
| - | ||
|
|
@@ -98,6 +100,25 @@ for: | |
| - sh: "./aws_cli/bin/python -m pip install awscli" | ||
| - sh: "PATH=$(echo $PWD'/aws_cli/bin'):$PATH" | ||
|
|
||
| - sh: "sudo apt-get -y install python3.6" | ||
| - sh: "sudo apt-get -y install python2.7" | ||
| - sh: "sudo apt-get -y install python3.7" | ||
| - sh: "sudo apt-get update" | ||
| - sh: "sudo apt-get -y install python3.8" | ||
|
|
||
| - sh: "which python3.8" | ||
| - sh: "which python3.6" | ||
| - sh: "which python3.7" | ||
| - sh: "which python2.7" | ||
|
|
||
| - sh: "PATH=$PATH:/usr/bin/python3.8:/usr/bin/python3.7" | ||
| - sh: "curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py" | ||
|
|
||
| - sh: "sudo apt-get -y install python3-distutils" | ||
| - sh: "python3.8 get-pip.py --user" | ||
| - ps: "If ($env:INSTALL_PY_37_PIP) {python3.7 get-pip.py --user}" | ||
| - ps: "If ($env:INSTALL_PY_36_PIP) {python3.6 get-pip.py --user}" | ||
|
|
||
| build_script: | ||
| - "python -c \"import sys; print(sys.executable)\"" | ||
| - "pip install -e \".[dev]\"" | ||
|
|
@@ -113,7 +134,10 @@ for: | |
| - sh: "pytest -vv tests/integration" | ||
| - sh: "pytest -vv -n 4 tests/regression" | ||
| - sh: "/tmp/black --check setup.py tests samcli scripts" | ||
| - sh: "python scripts/check-isolated-needs-update.py" | ||
|
|
||
| # Set JAVA_HOME to java11 | ||
| - sh: "JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. JAVA_HOME for java8 is not set. I am not sure how appveyor works, but can this be an issue on next run, when JAVA_HOME will be for java11 and test would run expecting them to be 8?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nevermind, now that I think about it, it shouldn't be an issue since it'll be a new session.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We set |
||
| - sh: "pytest -vv tests/integration/buildcmd/test_build_cmd.py -k test_building_java11_in_process" | ||
|
|
||
| # Smoke tests run in parallel - it runs on both Linux & Windows | ||
| # Presence of the RUN_SMOKE envvar will run the smoke tests | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,7 +14,7 @@ | |
| RUNTIME_DEP_TEMPLATE_MAPPING = { | ||
| "python": [ | ||
| { | ||
| "runtimes": ["python3.7", "python3.6", "python2.7"], | ||
| "runtimes": ["python3.8", "python3.7", "python3.6", "python2.7"], | ||
| "dependency_manager": "pip", | ||
| "init_location": os.path.join(_templates, "cookiecutter-aws-sam-hello-python"), | ||
| "build": True, | ||
|
|
@@ -30,7 +30,7 @@ | |
| ], | ||
| "nodejs": [ | ||
| { | ||
| "runtimes": ["nodejs10.x", "nodejs8.10"], | ||
| "runtimes": ["nodejs12.x", "nodejs10.x", "nodejs8.10"], | ||
| "dependency_manager": "npm", | ||
| "init_location": os.path.join(_templates, "cookiecutter-aws-sam-hello-nodejs"), | ||
| "build": True, | ||
|
|
@@ -60,13 +60,13 @@ | |
| ], | ||
| "java": [ | ||
| { | ||
| "runtimes": ["java8"], | ||
| "runtimes": ["java11", "java8"], | ||
| "dependency_manager": "maven", | ||
| "init_location": os.path.join(_templates, "cookiecutter-aws-sam-hello-java-maven"), | ||
| "build": True, | ||
| }, | ||
| { | ||
| "runtimes": ["java8"], | ||
| "runtimes": ["java11", "java8"], | ||
| "dependency_manager": "gradle", | ||
| "init_location": os.path.join(_templates, "cookiecutter-aws-sam-hello-java-gradle"), | ||
| "build": True, | ||
|
|
@@ -75,10 +75,12 @@ | |
| } | ||
|
|
||
| RUNTIME_TO_DEPENDENCY_MANAGERS = { | ||
| "python3.8": ["pip"], | ||
| "python3.7": ["pip"], | ||
| "python3.6": ["pip"], | ||
| "python2.7": ["pip"], | ||
| "ruby2.5": ["bundler"], | ||
| "nodejs12.x": ["npm"], | ||
| "nodejs10.x": ["npm"], | ||
| "nodejs8.10": ["npm"], | ||
| "nodejs6.10": ["npm"], | ||
|
|
@@ -87,6 +89,7 @@ | |
| "dotnetcore1.0": ["cli-package"], | ||
| "go1.x": ["mod"], | ||
| "java8": ["maven", "gradle"], | ||
| "java11": ["maven", "gradle"], | ||
| } | ||
|
|
||
| SUPPORTED_DEP_MANAGERS = { | ||
|
|
@@ -99,17 +102,27 @@ | |
| itertools.chain(*[c["runtimes"] for c in list(itertools.chain(*(RUNTIME_DEP_TEMPLATE_MAPPING.values())))]) | ||
| ) | ||
|
|
||
| # Order here should be a the group of the latest versions of runtimes followed by runtime groups | ||
| INIT_RUNTIMES = [ | ||
| "nodejs10.x", | ||
| "python3.7", | ||
| # latest of each runtime version | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this list is what is used to showcases the runtimes during
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is ordered just in a list. I can update it to a set but there isn't a whole difference here (other than duplicate entry guard). This is used within interactive init not in the help text. |
||
| "nodejs12.x", | ||
| "python3.8", | ||
| "ruby2.5", | ||
| "go1.x", | ||
| "java8", | ||
| "java11", | ||
| "dotnetcore2.1", | ||
| # older nodejs runtimes | ||
| "nodejs10.x", | ||
| "nodejs8.10", | ||
| "nodejs6.10", | ||
| # older python runtimes | ||
| "python3.7", | ||
| "python3.6", | ||
| "python2.7", | ||
| # older ruby runtimes | ||
| # older java runtimes | ||
| "java8", | ||
| # older dotnetcore runtimes | ||
| "dotnetcore2.0", | ||
| "dotnetcore1.0", | ||
| ] | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| { | ||
| "project_name": "Name of the project", | ||
| "runtime": "java8" | ||
| "runtime": "java11" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| { | ||
| "project_name": "Name of the project", | ||
| "runtime": "java8" | ||
| "runtime": "java11" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| { | ||
| "project_name": "Name of the project", | ||
| "runtime": "nodejs10.x" | ||
| "runtime": "nodejs12.x" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| { | ||
| "project_name": "Name of the project", | ||
| "runtime": "python3.7" | ||
| "runtime": "python3.8" | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do 3.6 and 2.7 also need to be added to path?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2.7 and 3.6 are already there: https://www.appveyor.com/docs/linux-images-software/#python
I am considering moving off of the pre-installed everything in favor how installing python versions through apt-get. This will make things a little more consistent in appveyor, but didn't want to go that deep here.