Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
aws-sam-cli-bot committed Nov 16, 2023
2 parents 69cd0ca + 005cead commit 404ee7b
Show file tree
Hide file tree
Showing 60 changed files with 865 additions and 26 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ jobs:
- "3.9"
- "3.10"
- "3.11"
- "3.12"
npm:
- 8
- 9
Expand Down Expand Up @@ -158,6 +159,7 @@ jobs:
- "3.9"
- "3.10"
- "3.11"
- "3.12"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
Expand Down Expand Up @@ -185,6 +187,7 @@ jobs:
- "3.9"
- "3.10"
- "3.11"
- "3.12"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
Expand All @@ -193,7 +196,7 @@ jobs:
- uses: actions/setup-java@v3
with:
distribution: 'corretto'
java-version: '17'
java-version: '21'
- run: make init
- run: pytest -vv tests/integration/workflows/java_maven

Expand All @@ -215,6 +218,7 @@ jobs:
- "3.9"
- "3.10"
- "3.11"
- "3.12"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
Expand All @@ -223,7 +227,7 @@ jobs:
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '17'
java-version: '21'
- run: make init
- run: pytest -vv tests/integration/workflows/java_gradle

Expand All @@ -243,6 +247,7 @@ jobs:
- "3.9"
- "3.10"
- "3.11"
- "3.12"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
Expand All @@ -267,11 +272,16 @@ jobs:
- "3.9"
- "3.10"
- "3.11"
- "3.12"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- run: |
python -m pip install --upgrade pip
pip install --upgrade setuptools
if: ${{ matrix.os }} == 'ubuntu-latest' && ${{ matrix.python }} == '3.12'
- run: make init
- run: pytest -vv tests/integration/workflows/python_pip

Expand All @@ -291,6 +301,7 @@ jobs:
- "3.9"
- "3.10"
- "3.11"
- "3.12"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
Expand Down Expand Up @@ -321,6 +332,7 @@ jobs:
- "3.9"
- "3.10"
- "3.11"
- "3.12"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
Expand Down
2 changes: 1 addition & 1 deletion aws_lambda_builders/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
# Changing version will trigger a new release!
# Please make the version change as the last step of your development.

__version__ = "1.41.0"
__version__ = "1.42.0"
RPC_PROTOCOL_VERSION = "0.3"
2 changes: 2 additions & 0 deletions aws_lambda_builders/validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,13 @@
"python3.9": [ARM64, X86_64],
"python3.10": [ARM64, X86_64],
"python3.11": [ARM64, X86_64],
"python3.12": [ARM64, X86_64],
"ruby2.7": [ARM64, X86_64],
"ruby3.2": [ARM64, X86_64],
"java8": [ARM64, X86_64],
"java11": [ARM64, X86_64],
"java17": [ARM64, X86_64],
"java21": [ARM64, X86_64],
"go1.x": [ARM64, X86_64],
"dotnet6": [ARM64, X86_64],
"provided": [ARM64, X86_64],
Expand Down
2 changes: 1 addition & 1 deletion aws_lambda_builders/workflows/python_pip/DESIGN.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def build_dependencies(artifacts_dir_path,
:type runtime: str
:param runtime: Python version to build dependencies for. This can
either be python3.7, python3.8, python3.9, python3.10 or python3.11. These are
either be python3.7, python3.8, python3.9, python3.10, python3.11 or python3.12. These are
currently the only supported values.
:type ui: :class:`lambda_builders.actions.python_pip.utils.UI`
Expand Down
3 changes: 2 additions & 1 deletion aws_lambda_builders/workflows/python_pip/packager.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ def get_lambda_abi(runtime):
"python3.9": "cp39",
"python3.10": "cp310",
"python3.11": "cp311",
"python3.12": "cp312",
}

if runtime not in supported:
Expand All @@ -101,7 +102,7 @@ def __init__(self, runtime, osutils=None, dependency_builder=None, architecture=
:type runtime: str
:param runtime: Python version to build dependencies for. This can
either be python3.7, python3.8, python3.9, python3.10 or python3.11. These are currently the
either be python3.7, python3.8, python3.9, python3.10, python3.11 or python3.12. These are currently the
only supported values.
:type osutils: :class:`lambda_builders.utils.OSUtils`
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ def read_version():
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Internet",
"Topic :: Software Development :: Build Tools",
"Topic :: Utilities",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
["java8"],
["java11"],
["java17"],
["java21"],
],
)
class TestJavaGradle(TestCase):
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
allprojects {
repositories {
mavenCentral()
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
plugins {
id 'java'
}

repositories {
mavenCentral()
}

dependencies {
implementation 'software.amazon.awssdk:annotations:2.1.0'
}

java.sourceCompatibility = JavaVersion.VERSION_21
java.targetCompatibility = JavaVersion.VERSION_21
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package aws.lambdabuilders;

public class Foo {
public void sayHello() {
System.out.println("Hello world!");
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
plugins {
id 'java'
}

repositories {
mavenCentral()
}

dependencies {
implementation 'software.amazon.awssdk:annotations:2.1.0'
implementation project(':common')
}

java.sourceCompatibility = JavaVersion.VERSION_21
java.targetCompatibility = JavaVersion.VERSION_21
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package aws.lambdabuilders;

public class Lambda1_Main {
public static void main(String[] args) {
System.out.println("Hello AWS Lambda Builders!");
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
plugins {
id 'java'
}

repositories {
mavenCentral()
}

dependencies {
implementation 'software.amazon.awssdk:annotations:2.1.0'
}

java.sourceCompatibility = JavaVersion.VERSION_21
java.targetCompatibility = JavaVersion.VERSION_21
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package aws.lambdabuilders;

public class Lambda2_Main {
public static void main(String[] args) {
System.out.println("Hello AWS Lambda Builders!");
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
rootProject.name = 'multi-build'
include 'lambda1', 'lambda2', 'common'
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
allprojects {
repositories {
mavenCentral()
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
plugins {
id 'java'
}

repositories {
mavenCentral()
}

dependencies {
implementation 'software.amazon.awssdk:annotations:2.1.0'
}

java.sourceCompatibility = JavaVersion.VERSION_21
java.targetCompatibility = JavaVersion.VERSION_21
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package aws.lambdabuilders;

public class Lambda1_Main {
public static void main(String[] args) {
System.out.println("Hello AWS Lambda Builders!");
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
plugins {
id 'java'
}

repositories {
mavenCentral()
}

dependencies {
implementation 'software.amazon.awssdk:annotations:2.1.0'
}

java.sourceCompatibility = JavaVersion.VERSION_21
java.targetCompatibility = JavaVersion.VERSION_21
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package aws.lambdabuilders;

public class Lambda2_Main {
public static void main(String[] args) {
System.out.println("Hello AWS Lambda Builders!");
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
rootProject.name = 'multi-build'
include 'lambda1', 'lambda2'
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ dependencies {
group = 'aws.lambdabuilders'
version = '1.0'
description = 'common-layer-gradle'
java.sourceCompatibility = JavaVersion.VERSION_11
java.targetCompatibility = JavaVersion.VERSION_11
java.sourceCompatibility = JavaVersion.VERSION_17
java.targetCompatibility = JavaVersion.VERSION_17

build.finalizedBy publishToMavenLocal

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
plugins {
id 'java'
id 'java-library'
id 'maven-publish'
}

repositories {
mavenLocal()
maven {
url = uri('https://repo.maven.apache.org/maven2/')
}
}

dependencies {
api 'com.amazonaws:aws-lambda-java-core:1.2.0'
}

group = 'aws.lambdabuilders'
version = '1.0'
description = 'common-layer-gradle'
java.sourceCompatibility = JavaVersion.VERSION_21
java.targetCompatibility = JavaVersion.VERSION_21

build.finalizedBy publishToMavenLocal

publishing {
publications {
maven(MavenPublication) {
from(components.java)
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rootProject.name = 'common-layer-gradle'
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package aws.lambdabuilders;

import com.amazonaws.services.lambda.runtime.LambdaLogger;

public class CommonCode {

public static void doSomethingOnLayer(final LambdaLogger logger, final String s) {
logger.log("Doing something on layer" + s);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
plugins {
id 'java'
}

repositories {
mavenCentral()
}

dependencies {
implementation 'software.amazon.awssdk:does-not-exist:1.2.3'
}

java.sourceCompatibility = JavaVersion.VERSION_21
java.targetCompatibility = JavaVersion.VERSION_21
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package aws.lambdabuilders;

public class Main {
public static void main(String[] args) {
System.out.println("Hello AWS Lambda Builders!");
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
plugins {
id 'java'
}

repositories {
mavenCentral()
}

dependencies {
implementation 'software.amazon.awssdk:annotations:2.1.0'
}

java.sourceCompatibility = JavaVersion.VERSION_21
java.targetCompatibility = JavaVersion.VERSION_21
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit 404ee7b

Please sign in to comment.