Use the correct Docker Image for RocksJava on Linux (#12169)

Summary: Pull Request resolved: https://github.com/facebook/rocksdb/pull/12169

Reviewed By: pdillinger

Differential Revision: D52715225

Pulled By: ajkr

fbshipit-source-id: 28476d363034fa1bb9c8c919d577c03b6391451b
This commit is contained in:
Adam Retter 2024-01-19 10:12:31 -08:00 committed by Facebook GitHub Bot
parent b5bb553d5e
commit 5a26f392ca
6 changed files with 78 additions and 47 deletions

View File

@ -146,9 +146,12 @@ commands:
install-maven: install-maven:
steps: steps:
- run: - run:
name: Install maven name: Install Maven
command: | command: |
sudo apt-get update -y && sudo apt-get install -y maven wget --no-check-certificate https://dlcdn.apache.org/maven/maven-3/3.9.6/binaries/apache-maven-3.9.6-bin.tar.gz
tar zxf apache-maven-3.9.6-bin.tar.gz
echo "export M2_HOME=$(pwd)/apache-maven-3.9.6" >> $BASH_ENV
echo 'export PATH=$M2_HOME/bin:$PATH' >> $BASH_ENV
setup-folly: setup-folly:
steps: steps:
@ -231,6 +234,7 @@ executors:
- image: zjay437/rocksdb:0.6 - image: zjay437/rocksdb:0.6
linux-java-docker: linux-java-docker:
docker: docker:
# This is the Docker Image used for building RocksJava releases, see: https://github.com/evolvedbinary/docker-rocksjava
- image: evolvedbinary/rocksjava:centos6_x64-be - image: evolvedbinary/rocksjava:centos6_x64-be
jobs: jobs:
@ -623,7 +627,7 @@ jobs:
- windows-build-steps - windows-build-steps
build-linux-java: build-linux-java:
executor: linux-docker executor: linux-java-docker
resource_class: large resource_class: large
steps: steps:
- pre-steps - pre-steps
@ -636,17 +640,13 @@ jobs:
which javac && javac -version which javac && javac -version
- run: - run:
name: "Test RocksDBJava" name: "Test RocksDBJava"
command: make V=1 J=8 -j8 jtest command: scl enable devtoolset-7 'make V=1 J=8 -j8 jtest'
- post-steps - post-steps
build-linux-java-pmd: build-linux-java-pmd:
machine: executor: linux-java-docker
image: ubuntu-2004:202111-02
resource_class: large resource_class: large
environment:
JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64
steps: steps:
- install-maven
- pre-steps - pre-steps
- run: - run:
name: "Set Java Environment" name: "Set Java Environment"
@ -655,9 +655,10 @@ jobs:
echo 'export PATH=$JAVA_HOME/bin:$PATH' >> $BASH_ENV echo 'export PATH=$JAVA_HOME/bin:$PATH' >> $BASH_ENV
which java && java -version which java && java -version
which javac && javac -version which javac && javac -version
- install-maven
- run: - run:
name: "PMD RocksDBJava" name: "PMD RocksDBJava"
command: make V=1 J=8 -j8 jpmd command: scl enable devtoolset-7 'make V=1 J=8 -j8 jpmd'
- post-pmd-steps - post-pmd-steps
build-linux-java-static: build-linux-java-static:

View File

@ -2,6 +2,10 @@ name: install-maven
runs: runs:
using: composite using: composite
steps: steps:
- name: Install maven - name: Install Maven
run: sudo apt-get update -y && sudo apt-get install -y maven run: |
wget --no-check-certificate https://dlcdn.apache.org/maven/maven-3/3.9.6/binaries/apache-maven-3.9.6-bin.tar.gz
tar zxf apache-maven-3.9.6-bin.tar.gz
echo "export M2_HOME=$(pwd)/apache-maven-3.9.6" >> $GITHUB_ENV
echo "$(pwd)/apache-maven-3.9.6/bin" >> $GITHUB_PATH
shell: bash shell: bash

View File

@ -2,9 +2,12 @@ name: post-benchmarks
runs: runs:
using: composite using: composite
steps: steps:
- uses: actions/upload-artifact@v3.1.3 - name: Upload Benchmark Results artifact
uses: actions/upload-artifact@v4.0.0
with: with:
path: "${{ runner.temp }}/benchmark-results" name: benchmark-results
path: "${{ runner.temp }}/benchmark-results/**"
if-no-files-found: error
- name: Send benchmark report to visualisation - name: Send benchmark report to visualisation
run: |- run: |-
set +e set +e

View File

@ -1,10 +0,0 @@
name: post-pmd-steps
runs:
using: composite
steps:
- uses: actions/upload-artifact@v3.1.3
with:
path: "${{ github.workspace }}/java/target/pmd.xml"
- uses: actions/upload-artifact@v3.1.3
with:
path: "${{ github.workspace }}/java/target/site"

View File

@ -1,25 +1,38 @@
name: post-steps name: post-steps
description: Steps that are taken after a RocksDB job
inputs:
artifact-prefix:
description: Prefix to append to the name of artifacts that are uploaded
required: true
default: "${{ github.job }}"
runs: runs:
using: composite using: composite
steps: steps:
- uses: actions/upload-artifact@v3.1.3 - name: Upload Test Results artifact
uses: actions/upload-artifact@v4.0.0
with: with:
path: "${{ runner.temp }}/test-results" name: "${{ inputs.artifact-prefix }}-test-results"
- uses: actions/upload-artifact@v3.1.3 path: "${{ runner.temp }}/test-results/**"
- name: Upload DB LOG file artifact
uses: actions/upload-artifact@v4.0.0
with: with:
name: "${{ inputs.artifact-prefix }}-db-log-file"
path: LOG path: LOG
- name: Compress Test Logs - name: Copy Test Logs (on Failure)
run: tar -cvzf t.tar.gz t
if: ${{ failure() }} if: ${{ failure() }}
run: |
mkdir -p ${{ runner.temp }}/failure-test-logs
cp -r t/* ${{ runner.temp }}/failure-test-logs
shell: bash shell: bash
- uses: actions/upload-artifact@v3.1.3 - name: Upload Test Logs (on Failure) artifact
uses: actions/upload-artifact@v4.0.0
with: with:
path: t.tar.gz name: "${{ inputs.artifact-prefix }}-failure-test-logs"
- run: |- path: ${{ runner.temp }}/failure-test-logs/**
mkdir -p ${{ runner.temp }}/core_dumps if-no-files-found: ignore
cp core.* ${{ runner.temp }}/core_dumps - name: Upload Core Dumps artifact
if: ${{ failure() }} uses: actions/upload-artifact@v4.0.0
shell: bash
- uses: actions/upload-artifact@v3.1.3
with: with:
path: "${{ runner.temp }}/core_dumps" name: "${{ inputs.artifact-prefix }}-core-dumps"
path: "core.*"
if-no-files-found: ignore

View File

@ -324,8 +324,9 @@ jobs:
- name: compress test report - name: compress test report
run: tar -cvzf scan_build_report.tar.gz scan_build_report run: tar -cvzf scan_build_report.tar.gz scan_build_report
if: failure() if: failure()
- uses: actions/upload-artifact@v3.1.3 - uses: actions/upload-artifact@v4.0.0
with: with:
name: scan-build-report
path: scan_build_report.tar.gz path: scan_build_report.tar.gz
build-linux-unity-and-headers: build-linux-unity-and-headers:
if: ${{ github.repository_owner == 'facebook' }} if: ${{ github.repository_owner == 'facebook' }}
@ -461,10 +462,20 @@ jobs:
runs-on: runs-on:
labels: 4-core-ubuntu labels: 4-core-ubuntu
container: container:
image: zjay437/rocksdb:0.6 image: evolvedbinary/rocksjava:centos6_x64-be
options: --shm-size=16gb options: --shm-size=16gb
steps: steps:
- uses: actions/checkout@v4.1.0 # The docker image is intentionally based on an OS that has an older GLIBC version.
# That GLIBC is incompatibile with GitHub's actions/checkout. Thus we implement a manual checkout step.
- name: Checkout
env:
GH_TOKEN: ${{ github.token }}
run: |
chown `whoami` . || true
git clone --no-checkout https://oath2:$GH_TOKEN@github.com/${{ github.repository }}.git .
git -c protocol.version=2 fetch --update-head-ok --no-tags --prune --no-recurse-submodules --depth=1 origin +${{ github.sha }}:${{ github.ref }}
git checkout --progress --force ${{ github.ref }}
git log -1 --format='%H'
- uses: "./.github/actions/pre-steps" - uses: "./.github/actions/pre-steps"
- name: Set Java Environment - name: Set Java Environment
run: |- run: |-
@ -472,8 +483,8 @@ jobs:
which java && java -version which java && java -version
which javac && javac -version which javac && javac -version
- name: Test RocksDBJava - name: Test RocksDBJava
run: make V=1 J=8 -j8 jtest run: scl enable devtoolset-7 'make V=1 J=8 -j8 jtest'
- uses: "./.github/actions/post-steps" # NOTE: post-steps skipped because of compatibility issues with docker image
build-linux-java-static: build-linux-java-static:
if: ${{ github.repository_owner == 'facebook' }} if: ${{ github.repository_owner == 'facebook' }}
runs-on: runs-on:
@ -482,9 +493,8 @@ jobs:
image: evolvedbinary/rocksjava:centos6_x64-be image: evolvedbinary/rocksjava:centos6_x64-be
options: --shm-size=16gb options: --shm-size=16gb
steps: steps:
# The docker image is based on such an old OS that it has a GLIBC # The docker image is intentionally based on an OS that has an older GLIBC version.
# incompatibility with actions/checkout and other actions. Thus we # That GLIBC is incompatibile with GitHub's actions/checkout. Thus we implement a manual checkout step.
# implement a manual checkout step.
- name: Checkout - name: Checkout
env: env:
GH_TOKEN: ${{ github.token }} GH_TOKEN: ${{ github.token }}
@ -574,6 +584,9 @@ jobs:
if: ${{ github.repository_owner == 'facebook' }} if: ${{ github.repository_owner == 'facebook' }}
runs-on: runs-on:
labels: 4-core-ubuntu labels: 4-core-ubuntu
container:
image: evolvedbinary/rocksjava:rockylinux8_x64-be
options: --shm-size=16gb
steps: steps:
- uses: actions/checkout@v4.1.0 - uses: actions/checkout@v4.1.0
- uses: "./.github/actions/install-maven" - uses: "./.github/actions/install-maven"
@ -585,4 +598,11 @@ jobs:
which javac && javac -version which javac && javac -version
- name: PMD RocksDBJava - name: PMD RocksDBJava
run: make V=1 J=8 -j8 jpmd run: make V=1 J=8 -j8 jpmd
- uses: "./.github/actions/post-pmd-steps" - uses: actions/upload-artifact@v4.0.0
with:
name: pmd-report
path: "${{ github.workspace }}/java/target/pmd.xml"
- uses: actions/upload-artifact@v4.0.0
with:
name: maven-site
path: "${{ github.workspace }}/java/target/site"