-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
leiyanfei
committed
Mar 13, 2024
1 parent
3650de7
commit 24cb1ab
Showing
9 changed files
with
128 additions
and
13 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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
name: build-folly | ||
runs: | ||
using: composite | ||
steps: | ||
- name: Build folly and dependencies | ||
run: make build_folly | ||
shell: bash |
10 changes: 10 additions & 0 deletions
10
.github/actions/increase-max-open-files-on-macos/action.yml
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
name: increase-max-open-files-on-macos | ||
runs: | ||
using: composite | ||
steps: | ||
- name: Increase max open files | ||
run: |- | ||
sudo sysctl -w kern.maxfiles=1048576 | ||
sudo sysctl -w kern.maxfilesperproc=1048576 | ||
sudo launchctl limit maxfiles 1048576 | ||
shell: bash |
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
name: install-gflags-on-macos | ||
runs: | ||
using: composite | ||
steps: | ||
- name: Install gflags on macos | ||
run: HOMEBREW_NO_AUTO_UPDATE=1 brew install gflags | ||
shell: bash |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
name: install-jdk8-on-macos | ||
runs: | ||
using: composite | ||
steps: | ||
- name: Install JDK 8 on macos | ||
run: |- | ||
HOMEBREW_NO_AUTO_UPDATE=1 brew tap bell-sw/liberica | ||
HOMEBREW_NO_AUTO_UPDATE=1 brew install --cask liberica-jdk8 | ||
shell: bash |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
name: pre-steps-macos | ||
runs: | ||
using: composite | ||
steps: | ||
- uses: "./.github/actions/pre-steps" |
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
name: setup-folly | ||
runs: | ||
using: composite | ||
steps: | ||
- name: Checkout folly sources | ||
run: make checkout_folly | ||
shell: bash |
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 |
---|---|---|
|
@@ -30,7 +30,8 @@ jobs: | |
- uses: actions/[email protected] | ||
- uses: "./.github/actions/pre-steps" | ||
- uses: "./.github/actions/install-gflags" | ||
- run: make V=1 J=8 -j8 check | ||
- run: echo "JAVA_HOME=${JAVA_HOME}" | ||
- run: DISABLE_WARNING_AS_ERROR=1 make V=1 J=8 -j8 check | ||
- uses: "./.github/actions/post-steps" | ||
# ======================== Linux No Test Runs ======================= # | ||
build-linux-release: | ||
|
@@ -39,20 +40,22 @@ jobs: | |
steps: | ||
- uses: actions/[email protected] | ||
- uses: "./.github/actions/install-gflags" | ||
- run: make V=1 -j32 LIB_MODE=shared release | ||
- run: echo "JAVA_HOME=${JAVA_HOME}" | ||
- run: echo 'export PATH=$JAVA_HOME/bin:$PATH' >> $GITHUB_PATH | ||
- run: DISABLE_WARNING_AS_ERROR=1 make V=1 -j32 LIB_MODE=shared release | ||
- run: ls librocksdb.so | ||
- run: "./db_stress --version" | ||
- run: make clean | ||
- run: make V=1 -j32 release | ||
- run: DISABLE_WARNING_AS_ERROR=1 make clean | ||
- run: DISABLE_WARNING_AS_ERROR=1 make V=1 -j32 release | ||
- run: ls librocksdb.a | ||
- run: "./db_stress --version" | ||
- run: make clean | ||
- run: DISABLE_WARNING_AS_ERROR=1 make clean | ||
- run: sudo apt-get remove -y libgflags-dev | ||
- run: make V=1 -j32 LIB_MODE=shared release | ||
- run: DISABLE_WARNING_AS_ERROR=1 make V=1 -j32 LIB_MODE=shared release | ||
- run: ls librocksdb.so | ||
- run: if ./db_stress --version; then false; else true; fi | ||
- run: make clean | ||
- run: make V=1 -j32 release | ||
- run: DISABLE_WARNING_AS_ERROR=1 make clean | ||
- run: DISABLE_WARNING_AS_ERROR=1 make V=1 -j32 release | ||
- run: ls librocksdb.a | ||
- run: if ./db_stress --version; then false; else true; fi | ||
- uses: "./.github/actions/post-steps" | ||
|
@@ -76,10 +79,11 @@ jobs: | |
- name: Set Java Environment | ||
run: |- | ||
echo "JAVA_HOME=${JAVA_HOME}" | ||
echo 'export PATH=$JAVA_HOME/bin:$PATH' >> $GITHUB_PATH | ||
which java && java -version | ||
which javac && javac -version | ||
- name: Test RocksDBJava | ||
run: scl enable devtoolset-7 'make V=1 J=8 -j8 jtest' | ||
run: scl enable devtoolset-7 'DISABLE_WARNING_AS_ERROR=1 make V=1 J=8 -j8 jtest' | ||
# NOTE: post-steps skipped because of compatibility issues with docker image | ||
build-linux-java-static: | ||
runs-on: ubuntu-latest | ||
|
@@ -103,5 +107,67 @@ jobs: | |
which java && java -version | ||
which javac && javac -version | ||
- name: Build RocksDBJava Static Library | ||
run: scl enable devtoolset-7 'make V=1 J=8 -j8 rocksdbjavastatic' | ||
# NOTE: post-steps skipped because of compatibility issues with docker image | ||
run: scl enable devtoolset-7 'DISABLE_WARNING_AS_ERROR=1 make V=1 J=8 -j8 rocksdbjavastatic' | ||
# NOTE: post-steps skipped because of compatibility issues with docker image | ||
|
||
# ========================= MacOS build only ======================== # | ||
build-macos: | ||
runs-on: macos-13 | ||
timeout-minutes: 120 | ||
env: | ||
ROCKSDB_DISABLE_JEMALLOC: 1 | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: maxim-lobanov/[email protected] | ||
with: | ||
xcode-version: 14.3.1 | ||
- uses: "./.github/actions/increase-max-open-files-on-macos" | ||
- uses: "./.github/actions/install-gflags-on-macos" | ||
- uses: "./.github/actions/pre-steps-macos" | ||
- name: Build | ||
run: ulimit -S -n `ulimit -H -n` && DISABLE_WARNING_AS_ERROR=1 make V=1 J=16 -j16 all | ||
- uses: "./.github/actions/post-steps" | ||
# ========================= MacOS with java ======================== # | ||
build-macos-java: | ||
runs-on: macos-13 | ||
env: | ||
JAVA_HOME: "/Library/Java/JavaVirtualMachines/liberica-jdk-8.jdk/Contents/Home" | ||
ROCKSDB_DISABLE_JEMALLOC: 1 | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: maxim-lobanov/[email protected] | ||
with: | ||
xcode-version: 14.3.1 | ||
- uses: "./.github/actions/increase-max-open-files-on-macos" | ||
- uses: "./.github/actions/install-gflags-on-macos" | ||
- uses: "./.github/actions/install-jdk8-on-macos" | ||
- uses: "./.github/actions/pre-steps-macos" | ||
- name: Set Java Environment | ||
run: |- | ||
echo "JAVA_HOME=${JAVA_HOME}" | ||
which java && java -version | ||
which javac && javac -version | ||
- name: Test RocksDBJava | ||
run: DISABLE_WARNING_AS_ERROR=1 make V=1 J=16 -j16 jtest | ||
- uses: "./.github/actions/post-steps" | ||
build-macos-java-static: | ||
runs-on: macos-13 | ||
env: | ||
JAVA_HOME: "/Library/Java/JavaVirtualMachines/liberica-jdk-8.jdk/Contents/Home" | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: maxim-lobanov/[email protected] | ||
with: | ||
xcode-version: 14.3.1 | ||
- uses: "./.github/actions/increase-max-open-files-on-macos" | ||
- uses: "./.github/actions/install-gflags-on-macos" | ||
- uses: "./.github/actions/install-jdk8-on-macos" | ||
- uses: "./.github/actions/pre-steps-macos" | ||
- name: Set Java Environment | ||
run: |- | ||
echo "JAVA_HOME=${JAVA_HOME}" | ||
which java && java -version | ||
which javac && javac -version | ||
- name: Build RocksDBJava x86 and ARM Static Libraries | ||
run: DISABLE_WARNING_AS_ERROR=1 make V=1 J=16 -j16 rocksdbjavastaticosx | ||
- uses: "./.github/actions/post-steps" |
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
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