forked from valkey-io/valkey-glide
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Run Java's CI only on branch pushes to main. (valkey-io#624)
* Align indentation for java .yml files. All other .yml files use this indentation. * Run Java's CI only on branch pushes to main. We don't need to run CI on every push to every development branch.
- Loading branch information
1 parent
a93d999
commit 199507f
Showing
2 changed files
with
95 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,46 @@ | ||
name: Java client benchmarks | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
name: | ||
required: false | ||
type: string | ||
workflow_dispatch: | ||
inputs: | ||
name: | ||
required: false | ||
type: string | ||
|
||
run-name: ${{ inputs.name == '' && format('{0} @ {1}', github.ref_name, github.sha) || inputs.name }} | ||
|
||
jobs: | ||
java-benchmark: | ||
strategy: | ||
matrix: | ||
java: | ||
- 11 | ||
- 17 | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Set up JDK ${{ matrix.java }} | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: "temurin" | ||
java-version: ${{ matrix.java }} | ||
|
||
- name: Start Redis | ||
run: docker run -p 6379:6379 -p 8001:8001 -d redis/redis-stack | ||
|
||
- name: Run benchmarks | ||
working-directory: java | ||
run: ./gradlew :benchmark:run | ||
|
||
- name: Upload test reports | ||
if: always() | ||
continue-on-error: true | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: test-reports-${{ matrix.java }} | ||
path: | | ||
java/benchmarks/build/reports/** | ||
java-benchmark: | ||
strategy: | ||
matrix: | ||
java: | ||
- 11 | ||
- 17 | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Set up JDK ${{ matrix.java }} | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: "temurin" | ||
java-version: ${{ matrix.java }} | ||
|
||
- name: Start Redis | ||
run: docker run -p 6379:6379 -p 8001:8001 -d redis/redis-stack | ||
|
||
- name: Run benchmarks | ||
working-directory: java | ||
run: ./gradlew :benchmark:run | ||
|
||
- name: Upload test reports | ||
if: always() | ||
continue-on-error: true | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: test-reports-${{ matrix.java }} | ||
path: | | ||
java/benchmarks/build/reports/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,69 +1,70 @@ | ||
name: Java CI | ||
|
||
on: | ||
push: | ||
paths: | ||
- babushka-core/** | ||
- submodules/** | ||
- "java/**" | ||
- ".github/workflows/java.yml" | ||
pull_request: | ||
paths: | ||
- babushka-core/** | ||
- submodules/** | ||
- "java/**" | ||
- ".github/workflows/java.yml" | ||
push: | ||
branches: ["main"] | ||
paths: | ||
- babushka-core/** | ||
- submodules/** | ||
- "java/**" | ||
- ".github/workflows/java.yml" | ||
pull_request: | ||
paths: | ||
- babushka-core/** | ||
- submodules/** | ||
- "java/**" | ||
- ".github/workflows/java.yml" | ||
|
||
# Run only most latest job on a branch and cancel previous ones | ||
concurrency: | ||
group: ${{ github.head_ref || github.ref }} | ||
cancel-in-progress: true | ||
group: ${{ github.head_ref || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build-and-test-java-client: | ||
strategy: | ||
# Run all jobs | ||
fail-fast: false | ||
matrix: | ||
java: | ||
- 11 | ||
- 17 | ||
runs-on: ubuntu-latest | ||
build-and-test-java-client: | ||
strategy: | ||
# Run all jobs | ||
fail-fast: false | ||
matrix: | ||
java: | ||
- 11 | ||
- 17 | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Set up JDK ${{ matrix.java }} | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: "temurin" | ||
java-version: ${{ matrix.java }} | ||
- name: Set up JDK ${{ matrix.java }} | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: "temurin" | ||
java-version: ${{ matrix.java }} | ||
|
||
- name: Install and run protoc (protobuf) | ||
run: | | ||
sudo apt update | ||
sudo apt install -y protobuf-compiler | ||
mkdir -p java/client/src/main/java/org/babushka/javababushka/generated | ||
protoc -Iprotobuf=babushka-core/src/protobuf/ --java_out=java/client/src/main/java/org/babushka/javababushka/generated babushka-core/src/protobuf/*.proto | ||
- name: Build rust part | ||
working-directory: java | ||
run: cargo build | ||
- name: Install and run protoc (protobuf) | ||
run: | | ||
sudo apt update | ||
sudo apt install -y protobuf-compiler | ||
mkdir -p java/client/src/main/java/org/babushka/javababushka/generated | ||
protoc -Iprotobuf=babushka-core/src/protobuf/ --java_out=java/client/src/main/java/org/babushka/javababushka/generated babushka-core/src/protobuf/*.proto | ||
- name: Build rust part | ||
working-directory: java | ||
run: cargo build | ||
|
||
- name: Start Redis | ||
run: docker run -p 6379:6379 -p 8001:8001 -d redis/redis-stack | ||
- name: Start Redis | ||
run: docker run -p 6379:6379 -p 8001:8001 -d redis/redis-stack | ||
|
||
- name: Build java part | ||
working-directory: java | ||
run: ./gradlew --continue build | ||
- name: Build java part | ||
working-directory: java | ||
run: ./gradlew --continue build | ||
|
||
- name: Upload test reports | ||
if: always() | ||
continue-on-error: true | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: test-reports-${{ matrix.java }} | ||
path: | | ||
java/client/build/reports/** | ||
java/integTest/build/reports/** | ||
- name: Upload test reports | ||
if: always() | ||
continue-on-error: true | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: test-reports-${{ matrix.java }} | ||
path: | | ||
java/client/build/reports/** | ||
java/integTest/build/reports/** |