-
Notifications
You must be signed in to change notification settings - Fork 11
173 lines (172 loc) · 7.5 KB
/
pr-jobs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
name: ververica/forst/pr-jobs
on: [push, pull_request]
jobs:
# ======================== Fast Initial Checks ====================== #
check-format-and-targets:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
with:
fetch-depth: 0 # Need full checkout to determine merge base
fetch-tags: true
- uses: "./.github/actions/setup-upstream"
- name: Setup Python
uses: actions/setup-python@v5
- name: Install Dependencies
run: python -m pip install --upgrade pip
- name: Install argparse
run: pip install argparse
- name: Download clang-format-diff.py
run: wget https://raw.githubusercontent.com/llvm/llvm-project/release/12.x/clang/tools/clang-format/clang-format-diff.py
- name: Check format
run: VERBOSE_CHECK=1 make check-format
- name: Simple source code checks
run: make check-sources
# ========================= Linux With Tests ======================== #
build-linux:
runs-on: ubuntu-latest
timeout-minutes: 120
steps:
- uses: actions/[email protected]
- uses: "./.github/actions/pre-steps"
- uses: "./.github/actions/install-gflags"
- run: echo "JAVA_HOME=${JAVA_HOME}"
- run: DISABLE_WARNING_AS_ERROR=1 DISABLE_PERF_CONTEXT=0 make V=1 J=8 -j8 check
- uses: "./.github/actions/post-steps"
# ======================== Linux No Test Runs ======================= #
build-linux-release:
runs-on: ubuntu-latest
timeout-minutes: 120
steps:
- uses: actions/[email protected]
- uses: "./.github/actions/install-gflags"
- 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: 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: DISABLE_WARNING_AS_ERROR=1 make clean
- run: sudo apt-get remove -y libgflags-dev
- 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: 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"
# ============================ Java Jobs ============================ #
build-linux-java:
runs-on: ubuntu-latest
container: evolvedbinary/rocksjava:centos6_x64-be
steps:
# 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:[email protected]/${{ 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"
- 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 'DISABLE_WARNING_AS_ERROR=1 DISABLE_PERF_CONTEXT=0 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
container: evolvedbinary/rocksjava:centos6_x64-be
steps:
# 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:[email protected]/${{ 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"
- name: Set Java Environment
run: |-
echo "JAVA_HOME=${JAVA_HOME}"
which java && java -version
which javac && javac -version
- name: Build RocksDBJava Static Library
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 DISABLE_PERF_CONTEXT=0 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"