-
Notifications
You must be signed in to change notification settings - Fork 312
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
Showing
17 changed files
with
317 additions
and
433 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,52 @@ | ||
# Licensed to the Apache Software Foundation (ASF) under one | ||
# or more contributor license agreements. See the NOTICE file | ||
# distributed with this work for additional information | ||
# regarding copyright ownership. The ASF licenses this file | ||
# to you under the Apache License, Version 2.0 (the | ||
# "License"); you may not use this file except in compliance | ||
# with the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, | ||
# software distributed under the License is distributed on an | ||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
# KIND, either express or implied. See the License for the | ||
# specific language governing permissions and limitations | ||
# under the License. | ||
|
||
name: Build Pegasus | ||
runs: | ||
using: composite | ||
steps: | ||
- name: Setup cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
/github/home/.ccache | ||
key: ${{ env.ARTIFACT_NAME }}_ccache | ||
- name: Free Disk Space (Ubuntu) | ||
run: | | ||
.github/workflows/free_disk_space.sh | ||
shell: bash | ||
- name: Compilation | ||
run: | | ||
ccache -p | ||
ccache -z | ||
./run.sh build -j $(nproc) --skip_thirdparty ${BUILD_OPTIONS} | ||
ccache -s | ||
shell: bash | ||
- name: Pack Server | ||
run: | | ||
./run.sh pack_server -j | ||
rm -rf pegasus-server-* | ||
shell: bash | ||
- name: Pack Tools | ||
run: | | ||
./run.sh pack_tools -j | ||
rm -rf pegasus-tools-* | ||
shell: bash | ||
- name: Clear Build Files | ||
run: | | ||
find ./build/latest/src/ -name '*CMakeFiles*' -type d -exec rm -rf "{}" + | ||
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,36 @@ | ||
# Licensed to the Apache Software Foundation (ASF) under one | ||
# or more contributor license agreements. See the NOTICE file | ||
# distributed with this work for additional information | ||
# regarding copyright ownership. The ASF licenses this file | ||
# to you under the Apache License, Version 2.0 (the | ||
# "License"); you may not use this file except in compliance | ||
# with the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, | ||
# software distributed under the License is distributed on an | ||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
# KIND, either express or implied. See the License for the | ||
# specific language governing permissions and limitations | ||
# under the License. | ||
|
||
name: Download artifact | ||
runs: | ||
using: composite | ||
steps: | ||
- name: Unpack prebuilt third-parties | ||
run: | | ||
unzip /root/thirdparties-bin.zip -d ./thirdparty | ||
rm -f /root/thirdparties-bin.zip | ||
shell: bash | ||
- name: Download Artifact | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: ${{ env.ARTIFACT_NAME }}_artifact_${{ github.sha }} | ||
path: . | ||
- name: Tar files | ||
run: | | ||
tar -zxvf ${ARTIFACT_NAME}_builder.tar | ||
rm -f ${ARTIFACT_NAME}_builder.tar | ||
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,56 @@ | ||
# Licensed to the Apache Software Foundation (ASF) under one | ||
# or more contributor license agreements. See the NOTICE file | ||
# distributed with this work for additional information | ||
# regarding copyright ownership. The ASF licenses this file | ||
# to you under the Apache License, Version 2.0 (the | ||
# "License"); you may not use this file except in compliance | ||
# with the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, | ||
# software distributed under the License is distributed on an | ||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
# KIND, either express or implied. See the License for the | ||
# specific language governing permissions and limitations | ||
# under the License. | ||
|
||
name: Rebuild thirdparty if needed | ||
runs: | ||
using: composite | ||
steps: | ||
- uses: dorny/paths-filter@v2 | ||
id: changes | ||
with: | ||
filters: | | ||
thirdparty: | ||
- '.github/workflows/thirdparty-regular-push.yml' | ||
- 'docker/thirdparties-src/**' | ||
- 'docker/thirdparties-bin/**' | ||
- 'thirdparty/**' | ||
- name: Unpack prebuilt third-parties | ||
if: steps.changes.outputs.thirdparty == 'false' | ||
run: | | ||
rm -f /root/thirdparties-src.zip | ||
unzip /root/thirdparties-bin.zip -d ./thirdparty | ||
rm -f /root/thirdparties-bin.zip | ||
find ./thirdparty -name '*CMakeFiles*' -type d -exec rm -rf "{}" + | ||
rm -rf ./thirdparty/hadoop-bin/share/doc | ||
rm -rf ./thirdparty/zookeeper-bin/docs | ||
shell: bash | ||
- name: Rebuild third-parties | ||
if: steps.changes.outputs.thirdparty == 'true' | ||
working-directory: thirdparty | ||
# Build third-parties and leave some necessary libraries and source. | ||
run: | | ||
rm -f /root/thirdparties-src.zip | ||
mkdir build | ||
cmake -DCMAKE_BUILD_TYPE=Release -DROCKSDB_PORTABLE=1 -DUSE_JEMALLOC=${USE_JEMALLOC} -B build/ | ||
cmake --build build/ -j $(nproc) | ||
rm -rf build/Build build/Download/[a-y]* build/Source/[a-g]* build/Source/[i-q]* build/Source/[s-z]* | ||
find ./ -name '*CMakeFiles*' -type d -exec rm -rf "{}" + | ||
../scripts/download_hadoop.sh hadoop-bin | ||
../scripts/download_zk.sh zookeeper-bin | ||
rm -rf hadoop-bin/share/doc | ||
rm -rf zookeeper-bin/docs | ||
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,27 @@ | ||
# Licensed to the Apache Software Foundation (ASF) under one | ||
# or more contributor license agreements. See the NOTICE file | ||
# distributed with this work for additional information | ||
# regarding copyright ownership. The ASF licenses this file | ||
# to you under the Apache License, Version 2.0 (the | ||
# "License"); you may not use this file except in compliance | ||
# with the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, | ||
# software distributed under the License is distributed on an | ||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
# KIND, either express or implied. See the License for the | ||
# specific language governing permissions and limitations | ||
# under the License. | ||
|
||
name: Run server tests | ||
runs: | ||
using: composite | ||
steps: | ||
- name: Unit Testing | ||
run: | | ||
export LD_LIBRARY_PATH=$(pwd)/thirdparty/output/lib:${JAVA_HOME}/jre/lib/amd64/server | ||
ulimit -s unlimited | ||
./run.sh test --onebox_opts "$ONEBOX_OPTS" --test_opts "$TEST_OPTS" -m ${{ matrix.test_module }} | ||
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,38 @@ | ||
# Licensed to the Apache Software Foundation (ASF) under one | ||
# or more contributor license agreements. See the NOTICE file | ||
# distributed with this work for additional information | ||
# regarding copyright ownership. The ASF licenses this file | ||
# to you under the Apache License, Version 2.0 (the | ||
# "License"); you may not use this file except in compliance | ||
# with the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, | ||
# software distributed under the License is distributed on an | ||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
# KIND, either express or implied. See the License for the | ||
# specific language governing permissions and limitations | ||
# under the License. | ||
|
||
name: Upload artifact | ||
runs: | ||
using: composite | ||
steps: | ||
- name: Tar files | ||
run: | | ||
mv thirdparty/hadoop-bin ./ | ||
mv thirdparty/zookeeper-bin ./ | ||
rm -rf thirdparty | ||
# The following operations are tricky, these directories and files don't exist if not build with '--test'. | ||
# When build binaries for client tests, it's not needed to add '--test'. | ||
mkdir -p build/latest/bin | ||
mkdir -p build/latest/src/server/test | ||
touch build/latest/src/server/test/config.ini | ||
tar -zcvhf ${ARTIFACT_NAME}_builder.tar build/latest/output build/latest/bin build/latest/src/server/test/config.ini hadoop-bin zookeeper-bin | ||
shell: bash | ||
- name: Upload Artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ${{ env.ARTIFACT_NAME }}_artifact_${{ github.sha }} | ||
path: ${{ env.ARTIFACT_NAME }}_builder.tar |
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
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
Oops, something went wrong.