Skip to content

Commit

Permalink
Fix Java installation [1.4.z] (#1005)
Browse files Browse the repository at this point in the history
The [tests are
failing](https://github.com/hazelcast/hazelcast-go-client/actions/runs/10175906206/job/28144201884)
because of a conflict between:
- `JAVA_HOME`
- Multiple Java installations on the runner

Based on my [investigation and
testing](hazelcast/client-compatibility-suites#127 (comment))
using `setup-java`, and avoiding hardcoding, resolves these issues.
  • Loading branch information
JackPGreen authored Aug 7, 2024
1 parent 16cd443 commit ab67a56
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 26 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/benchmark-all.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@ jobs:
with:
path: "$HOME/hazelcast-go-client"

- name: "Install Dependencies"
run: |
sudo apt-get update &&\
sudo apt-get install -y openjdk-17-jdk-headless maven
- name: "Setup JRE"
uses: "actions/setup-java@v4"
with:
distribution: "zulu"
java-version: "17"

- name: "Start Hazelcast Remote Controller"
run: |
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/test-all-32bits.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@ jobs:
uses: "actions/checkout@v2"
with:
path: "$HOME/hazelcast-go-client"

- name: "Install Dependencies"
run: |
sudo apt-get update &&\
sudo apt-get install -y openjdk-17-jdk-headless maven

- name: "Setup JRE"
uses: "actions/setup-java@v4"
with:
distribution: "zulu"
java-version: "17"

- name: "Start Hazelcast Remote Controller"
run: |
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/test-all.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@ jobs:
with:
path: "$HOME/hazelcast-go-client"

- name: "Install Dependencies"
run: |
sudo apt-get update &&\
sudo apt-get install -y openjdk-17-jdk-headless maven
- name: "Setup JRE"
uses: "actions/setup-java@v4"
with:
distribution: "zulu"
java-version: "17"

- name: "Start Hazelcast Remote Controller"
run: |
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/test-race.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@ jobs:
with:
path: "$HOME/hazelcast-go-client"

- name: "Install Dependencies"
run: |
sudo apt-get update &&\
sudo apt-get install -y openjdk-17-jdk-headless maven
- name: "Setup JRE"
uses: "actions/setup-java@v4"
with:
distribution: "zulu"
java-version: "17"

- name: "Start Hazelcast Remote Controller"
run: |
Expand Down
9 changes: 0 additions & 9 deletions rc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -183,15 +183,6 @@ echo "Java version:"
java -version
which java
echo "JAVA_HOME: $JAVA_HOME"
echo

echo "Use Java 17"
export JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64
export PATH=$JAVA_HOME/bin:$PATH
java -version
which java
echo "JAVA_HOME: $JAVA_HOME"
echo


case "${1:-}" in
Expand Down

0 comments on commit ab67a56

Please sign in to comment.