Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 4 additions & 14 deletions .github/workflows/aws-lambda-java-core.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# This workflow will be triggered if there will be changes to aws-lambda-java-core
# package and it builds the package and the packages that depend on it.
# package and it builds the package.

name: Java CI aws-lambda-java-core

on:
workflow_dispatch:
push:
branches: [ main ]
paths:
Expand All @@ -29,18 +30,7 @@ jobs:
with:
java-version: 8
distribution: corretto

# Install base module
cache: maven
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this still pick the latest local changes If we make a change to one of the dependencies?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. The key is an hash of the pom file, so if you are changing the POM you will cause the local cache to download the deps.

https://github.com/actions/setup-java#caching-packages-dependencies

This is not ultra useful because when we make our changes we usually change also the POM, however I read there should be also a partial hit cache.

So we would have at least cached the external dependencies. This is definitely a minor improvement. I will delve in build performance in following PRs.


- name: Install core with Maven
run: mvn -B install --file aws-lambda-java-core/pom.xml

# Package modules that depend on base module
- name: Package log4j2 with Maven
run: mvn -B package --file aws-lambda-java-log4j2/pom.xml

# Test Runtime Interface Client
- name: Run 'pr' target
working-directory: ./aws-lambda-java-runtime-interface-client
run: make pr
env:
IS_JAVA_8: true
12 changes: 8 additions & 4 deletions .github/workflows/aws-lambda-java-events-sdk-transformer.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
# This workflow will be triggered if there will be changes to
# aws-lambda-java-events-sdk-transformer package and it builds the package.
# This workflow will be triggered if there will be changes to
# aws-lambda-java-events-sdk-transformer package or its dependency (events),
# and it builds the package.

name: Java CI aws-lambda-java-events-sdk-transformer

on:
workflow_dispatch:
push:
branches: [ main ]
paths:
- 'aws-lambda-java-events-sdk-transformer/**'
- 'aws-lambda-java-events/**'
pull_request:
branches: [ '*' ]
paths:
- 'aws-lambda-java-events-sdk-transformer/**'
- 'aws-lambda-java-events/**'
- '.github/workflows/aws-lambda-java-events-sdk-transformer.yml'

permissions:
Expand All @@ -29,11 +33,11 @@ jobs:
with:
java-version: 8
distribution: corretto
cache: maven

# Install base module
# Install dependency
- name: Install events with Maven
run: mvn -B install --file aws-lambda-java-events/pom.xml
# Package target module
- name: Package events-sdk-transformer with Maven
run: mvn -B package --file aws-lambda-java-events-sdk-transformer/pom.xml

14 changes: 4 additions & 10 deletions .github/workflows/aws-lambda-java-events.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# This workflow will be triggered if there will be changes to aws-lambda-java-events
# package and it builds the package and the packages that depend on it.
# package and it builds the package.

name: Java CI aws-lambda-java-events

on:
workflow_dispatch:
push:
branches: [ main ]
paths:
Expand All @@ -29,14 +30,7 @@ jobs:
with:
java-version: 8
distribution: corretto

# Install base module
cache: maven

- name: Install events with Maven
run: mvn -B install --file aws-lambda-java-events/pom.xml

# Package modules that depend on base module
- name: Package serialization with Maven
run: mvn -B package --file aws-lambda-java-serialization/pom.xml
- name: Package events-sdk-transformer with Maven
run: mvn -B package --file aws-lambda-java-events-sdk-transformer/pom.xml

13 changes: 8 additions & 5 deletions .github/workflows/aws-lambda-java-log4j2.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
# This workflow will be triggered if there will be changes to
# aws-lambda-java-log4j2 package and it builds the package.
# This workflow will be triggered if there will be changes to
# aws-lambda-java-log4j2 package or its dependency (core), and it builds the package.

name: Java CI aws-lambda-java-log4j2

on:
push:
workflow_dispatch:
branches: [ main ]
paths:
- 'aws-lambda-java-log4j2/**'
- 'aws-lambda-java-core/**'
pull_request:
branches: [ '*' ]
paths:
- 'aws-lambda-java-log4j2/**'
- 'aws-lambda-java-core/**'
- '.github/workflows/aws-lambda-java-log4j2.yml'

permissions:
Expand All @@ -29,11 +32,11 @@ jobs:
with:
java-version: 8
distribution: corretto

# Install base module
cache: maven

# Install dependency
- name: Install core with Maven
run: mvn -B install --file aws-lambda-java-core/pom.xml
# Package target module
- name: Package log4j2 with Maven
run: mvn -B package --file aws-lambda-java-log4j2/pom.xml

1 change: 1 addition & 0 deletions .github/workflows/aws-lambda-java-profiler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jobs:
with:
java-version: 21
distribution: corretto
cache: maven

- name: Issue AWS credentials
uses: aws-actions/configure-aws-credentials@v4
Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/aws-lambda-java-serialization.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
# This workflow will be triggered if there will be changes to aws-lambda-java-serialization
# package and it builds the package and the packages that depend on it.
# This workflow will be triggered if there will be changes to aws-lambda-java-serialization
# package or its dependency (events), and it builds the package.

name: Java CI aws-lambda-java-serialization

on:
workflow_dispatch:
push:
branches: [ main ]
paths:
- 'aws-lambda-java-serialization/**'
- 'aws-lambda-java-events/**'
pull_request:
branches: [ '*' ]
paths:
- 'aws-lambda-java-serialization/**'
- 'aws-lambda-java-events/**'
- '.github/workflows/aws-lambda-java-serialization.yml'

permissions:
Expand All @@ -29,8 +32,9 @@ jobs:
with:
java-version: 8
distribution: corretto

# Install base module
cache: maven

# Install dependency
- name: Install events with Maven
run: mvn -B install --file aws-lambda-java-events/pom.xml

Expand Down
14 changes: 6 additions & 8 deletions .github/workflows/aws-lambda-java-tests.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This workflow will be triggered if there will be changes to aws-lambda-java-tests
# package and it builds the package and the packages that depend on it.
# package or its dependencies (events, serialization), and it builds the package.

name: Java CI aws-lambda-java-tests

Expand All @@ -9,16 +9,14 @@ on:
branches: [ main ]
paths:
- 'aws-lambda-java-tests/**'
- 'aws-lambda-java-runtime-interface-client/**'
- 'aws-lambda-java-serialization/**'
- 'aws-lambda-java-events/**'
- 'aws-lambda-java-serialization/**'
pull_request:
branches: [ '*' ]
paths:
- 'aws-lambda-java-tests/**'
- 'aws-lambda-java-runtime-interface-client/**'
- 'aws-lambda-java-serialization/**'
- 'aws-lambda-java-events/**'
- 'aws-lambda-java-serialization/**'
- '.github/workflows/aws-lambda-java-tests.yml'

permissions:
Expand All @@ -36,8 +34,9 @@ jobs:
with:
java-version: 8
distribution: corretto

# Install base module
cache: maven

# Install dependencies
- name: Install events with Maven
run: mvn -B install --file aws-lambda-java-events/pom.xml
- name: Install serialization with Maven
Expand All @@ -46,4 +45,3 @@ jobs:
# Package target module
- name: Package tests with Maven
run: mvn -B package --file aws-lambda-java-tests/pom.xml

3 changes: 2 additions & 1 deletion .github/workflows/runtime-interface-client_merge_to_main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
name: Publish artifact for aws-lambda-java-runtime-interface-client

on:
workflow_dispatch:
push:
branches: [ main ]
paths:
- 'aws-lambda-java-runtime-interface-client/**'
- '.github/workflows/runtime-interface-client_*.yml'
workflow_dispatch:

jobs:

Expand All @@ -35,6 +35,7 @@ jobs:
with:
java-version: 8
distribution: corretto
cache: maven

- name: Set up QEMU
uses: docker/setup-qemu-action@v3
Expand Down
16 changes: 11 additions & 5 deletions .github/workflows/runtime-interface-client_pr.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
# This workflow will be triggered if there will be changes to
# aws-lambda-java-runtime-interface-client package and it builds the package.
# This workflow will be triggered if there will be changes to
# aws-lambda-java-runtime-interface-client package or its dependencies (core, serialization),
# and it builds the package.

name: PR to runtime-interface-client

on:
workflow_dispatch:
pull_request:
branches: [ '*' ]
paths:
- 'aws-lambda-java-runtime-interface-client/**'
- 'aws-lambda-java-core/**'
- 'aws-lambda-java-serialization/**'
- '.github/workflows/runtime-interface-client_*.yml'

permissions:
Expand All @@ -25,7 +29,8 @@ jobs:
with:
java-version: 8
distribution: corretto

cache: maven

- name: Build and install core dependency locally
working-directory: ./aws-lambda-java-core
run: mvn clean install
Expand All @@ -39,7 +44,7 @@ jobs:
run: make pr
env:
IS_JAVA_8: true

build:
runs-on: ubuntu-latest
steps:
Expand All @@ -50,6 +55,7 @@ jobs:
with:
java-version: 8
distribution: corretto
cache: maven

- name: Set up QEMU
uses: docker/setup-qemu-action@v3
Expand All @@ -61,7 +67,7 @@ jobs:

- name: Available buildx platforms
run: echo ${{ steps.buildx.outputs.platforms }}

- name: Build and install core dependency locally
working-directory: ./aws-lambda-java-core
run: mvn clean install
Expand Down
17 changes: 12 additions & 5 deletions .github/workflows/samples.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,24 @@
# This workflow will be triggered if there will be changes to aws-lambda-java-core
# package and it builds the package and the packages that depend on it.
# This workflow will be triggered if there will be changes to samples
# or their dependencies (events, serialization, tests).

name: Java CI samples

on:
workflow_dispatch:
push:
branches: [ main ]
paths:
- 'samples/**'
- 'aws-lambda-java-events/**'
- 'aws-lambda-java-serialization/**'
- 'aws-lambda-java-tests/**'
pull_request:
branches: [ '*' ]
paths:
- 'samples/**'
- 'aws-lambda-java-events/**'
- 'aws-lambda-java-serialization/**'
- 'aws-lambda-java-tests/**'
- '.github/workflows/samples.yml'

permissions:
Expand All @@ -27,14 +34,13 @@ jobs:
with:
java-version: 8
distribution: corretto
cache: maven

# Install events module
# Install dependencies
- name: Install events with Maven
run: mvn -B install --file aws-lambda-java-events/pom.xml
# Install serialization module
- name: Install serialization with Maven
run: mvn -B install --file aws-lambda-java-serialization/pom.xml
# Install tests module
- name: Install tests with Maven
run: mvn -B install --file aws-lambda-java-tests/pom.xml

Expand All @@ -54,6 +60,7 @@ jobs:
8
21
distribution: corretto
cache: maven

# Install events module using Java 8
- name: Install events with Maven
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ experimental/aws-lambda-java-profiler/integration_tests/helloworld/bin
/scratch/
.vscode
.kiro
build
build
3 changes: 2 additions & 1 deletion aws-lambda-java-events-sdk-transformer/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
<maven.compiler.target>1.8</maven.compiler.target>
<sdk.v1.version>1.11.914</sdk.v1.version>
<sdk.v2.version>2.15.40</sdk.v2.version>
<junit-jupiter.version>5.14.3</junit-jupiter.version>
</properties>

<distributionManagement>
Expand Down Expand Up @@ -70,7 +71,7 @@
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.7.0</version>
<version>${junit-jupiter.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
3 changes: 2 additions & 1 deletion aws-lambda-java-events/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<jackson.version>2.20.1</jackson.version>
<json.unit>2.40.1</json.unit>
<junit-jupiter.version>5.14.3</junit-jupiter.version>
</properties>

<distributionManagement>
Expand All @@ -58,7 +59,7 @@
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.9.2</version>
<version>${junit-jupiter.version}</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
Loading
Loading