Merge pull request #408 from unum-cloud/407-feature-improve-build-and… #76
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
name: Pre-Release | |
on: | |
push: | |
branches: ["main-dev"] | |
env: | |
GH_TOKEN: ${{ secrets.SEMANTIC_RELEASE_TOKEN }} | |
BUILD_TYPE: Release | |
jobs: | |
versioning: | |
name: Semantic Release | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
persist-credentials: false | |
ref: 'main-dev' | |
- uses: actions/setup-node@v3 | |
- run: cp .github/workflows/package.json . && npm install && npx semantic-release | |
build_ustore: | |
name: Build ustore | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
persist-credentials: false | |
ref: 'main-dev' | |
- run: git submodule update --init --recursive | |
- name: Prepare CMake, Conan and PyArrow | |
run: python -m pip install --force-reinstall numpy pyarrow cmake conan==1.60.1 | |
- name: Install ustore dependencies using conan | |
run: | | |
wget -q https://github.com/unum-cloud/ustore-deps/releases/download/v0.1.3/ustore_deps_x86_linux.tar.gz | |
conan profile new --detect default | |
conan profile update settings.compiler.libcxx=libstdc++11 default | |
tar -xzf ./ustore_deps_x86_linux.tar.gz -C ~/.conan | |
conan install ustore_deps/0.12.1@unum/x86_linux -g cmake -s compiler.version=11 | |
rm -rf ./ustore_deps_x86_linux.tar.gz | |
- name: Configure cmake | |
run: | | |
cmake -DCMAKE_BUILD_TYPE="$BUILD_TYPE" \ | |
-DUSTORE_BUILD_ENGINE_UCSET=1 \ | |
-DUSTORE_BUILD_ENGINE_LEVELDB=1 \ | |
-DUSTORE_BUILD_ENGINE_ROCKSDB=1 \ | |
-DUSTORE_BUILD_API_FLIGHT=1 \ | |
-DUSTORE_BUILD_TESTS=1 \ | |
-DUSE_CONAN=1 \ | |
-B ./build_release . | |
- name: Build | |
run: make -j 4 -C ./build_release | |
- name: Upload Binaries | |
uses: actions/[email protected] | |
with: | |
name: binaries | |
path: build_release/build/bin/* | |
test_ustore: | |
name: Test ustore | |
runs-on: ubuntu-latest | |
needs: build_ustore | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
persist-credentials: false | |
ref: 'main-dev' | |
- name: Download a Build Artifact | |
uses: actions/[email protected] | |
with: | |
name: binaries | |
- name: Change Permissions | |
run: chmod +x /home/runner/work/ustore/ustore/* | |
- name: Run Tests | |
run: for test in $(ls /home/runner/work/ustore/ustore/*test_units*); do echo -e "------ \e[93mRunning $test\e[0m ------"; timeout -v --kill-after=5 300 $test; done | |
build_test_wheel: | |
name: Build and test Python wheels | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
persist-credentials: false | |
ref: 'main-dev' | |
- name: Prepare CMake, Conan and PyArrow | |
run: python -m pip install --force-reinstall numpy pyarrow cmake conan==1.60.1 | |
- name: Build wheel | |
run: | | |
pip install cibuildwheel twine | |
CIBW_BUILD="cp39-*" cibuildwheel --platform linux | |
CIBW_BUILD="cp310-*" cibuildwheel --platform linux | |
build_test_java: | |
name: Build and test java | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
persist-credentials: false | |
ref: 'main-dev' | |
- name: Prepare CMake, Conan and PyArrow | |
run: python -m pip install --force-reinstall numpy pyarrow cmake conan==1.60.1 | |
- name: Install default jdk | |
run: sudo apt install default-jdk -y | |
- name: Install ustore dependencies using conan | |
run: | | |
wget -q https://github.com/unum-cloud/ustore-deps/releases/download/v0.1.3/ustore_deps_x86_linux.tar.gz | |
conan profile new --detect default | |
conan profile update settings.compiler.libcxx=libstdc++11 default | |
tar -xzf ./ustore_deps_x86_linux.tar.gz -C ~/.conan | |
conan install ustore_deps/0.12.1@unum/x86_linux -g cmake -s compiler.version=11 | |
rm -rf ./ustore_deps_x86_linux.tar.gz | |
- name: Build and test java | |
run: | | |
sed -i 's/make -j/make -j4/' /home/runner/work/ustore/ustore/java/pack.sh | |
export JAVA_HOME="/usr/lib/jvm/java-11-openjdk-amd64" | |
bash /home/runner/work/ustore/ustore/java/pack.sh |