Skip to content

Commit 361bbfc

Browse files
author
Fabiana Severin
committed
fix: use architecture-aware JAVA_HOME on matrix runners
1 parent cb9c4f6 commit 361bbfc

3 files changed

Lines changed: 10 additions & 8 deletions

File tree

.github/test-matrix.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,14 @@
33
{
44
"runner": "ubuntu-latest",
55
"label": "x64",
6-
"sam_arch": "x86_64"
6+
"sam_arch": "x86_64",
7+
"java_suffix": "X64"
78
},
89
{
910
"runner": "ubuntu-24.04-arm",
1011
"label": "arm64",
11-
"sam_arch": "arm64"
12+
"sam_arch": "arm64",
13+
"java_suffix": "ARM64"
1214
}
1315
]
1416
}

.github/workflows/build-integration-test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,20 +57,20 @@ jobs:
5757

5858
- name: Install core with Maven
5959
run: |
60-
export JAVA_HOME=$JAVA_HOME_8_X64
60+
export JAVA_HOME=$JAVA_HOME_8_${{ matrix.arch.java_suffix }}
6161
mvn -B install --file aws-lambda-java-core/pom.xml
6262
6363
- name: Install log4j2 with Maven
6464
run: |
65-
export JAVA_HOME=$JAVA_HOME_8_X64
65+
export JAVA_HOME=$JAVA_HOME_8_${{ matrix.arch.java_suffix }}
6666
mvn -B install --file aws-lambda-java-log4j2/pom.xml
6767
6868
# build the integration test function
6969
# this verifies that the function compiles and packages correctly.
7070
# the tests will run in run-integration-test.yml which deploys to AWS.
7171
- name: Package integration test function
7272
run: |
73-
export JAVA_HOME=$JAVA_HOME_21_X64
73+
export JAVA_HOME=$JAVA_HOME_21_${{ matrix.arch.java_suffix }}
7474
mvn -B package --file lambda-integration-tests/log4j2-test-function/pom.xml
7575
7676
build:

.github/workflows/run-integration-test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,17 +68,17 @@ jobs:
6868

6969
- name: Install core with Maven
7070
run: |
71-
export JAVA_HOME=$JAVA_HOME_8_X64
71+
export JAVA_HOME=$JAVA_HOME_8_${{ matrix.arch.java_suffix }}
7272
mvn -B install --file aws-lambda-java-core/pom.xml
7373
7474
- name: Install log4j2 with Maven
7575
run: |
76-
export JAVA_HOME=$JAVA_HOME_8_X64
76+
export JAVA_HOME=$JAVA_HOME_8_${{ matrix.arch.java_suffix }}
7777
mvn -B install --file aws-lambda-java-log4j2/pom.xml
7878
7979
- name: Build SAM stack
8080
run: |
81-
export JAVA_HOME=$JAVA_HOME_21_X64
81+
export JAVA_HOME=$JAVA_HOME_21_${{ matrix.arch.java_suffix }}
8282
cd lambda-integration-tests && sam build
8383
8484
- name: Validate SAM stack

0 commit comments

Comments
 (0)