Add Rebase Action #94
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"] | |
pull_request: | |
branches: ["main-dev"] | |
workflow_dispatch: {} | |
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_amd64: | |
name: Build Libraries on AMD | |
runs-on: ubuntu-latest | |
if: ${{ github.event_name == 'push' || github.event_name == 'pull_request'}} | |
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 Conan dependencies | |
run: | | |
last_tag=$(curl https://api.github.com/repos/unum-cloud/ustore-deps/releases/latest | grep -i 'tag_name' | awk -F '\"' '{print $4}') | |
wget -q https://github.com/unum-cloud/ustore-deps/releases/download/"$last_tag"/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 | |
package_version=$(ls ~/.conan/data/ustore_deps/) | |
conan install ustore_deps/"$package_version"@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_amd64: | |
name: Test Libraries on AMD | |
runs-on: ubuntu-latest | |
needs: build_ustore_amd64 | |
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 embeded tests | |
run: | | |
mkdir -p ./tmp/ustore/ | |
export USTORE_TEST_PATH="./tmp/" | |
for test in $(ls /home/runner/work/ustore/ustore/*test_units_ustore_embedded*); do | |
echo -e "------ \e[93mRunning $test\e[0m ------" | |
timeout -v --kill-after=5 300 $test | |
done | |
- name: Run Arrow Flight tests | |
run: /home/runner/work/ustore/ustore/test_units_ustore_flight_client | |
build_test_ustore_arm64: | |
name: Build and Test Libraries on ARM | |
runs-on: ubuntu-latest | |
if: ${{ github.event_name == 'workflow_dispatch' }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
persist-credentials: false | |
ref: 'main-dev' | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
with: | |
platforms: 'arm64' | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
with: | |
platforms: linux/arm64 | |
- name: Build and Test in ARM | |
run: | | |
export version=$(cat VERSION) | |
sed -i 's/make -j32/make -j4/' ./Dockerfile | |
docker buildx create --use | |
docker buildx build \ | |
--platform "linux/arm64" \ | |
--build-arg version=$version \ | |
--build-arg TEST_USTORE="True" \ | |
--file ./Dockerfile \ | |
--tag unum/ustore:latest \ | |
--load . | |
build_and_test_python: | |
name: Build and Test Python ${{ matrix.python }} on ${{ matrix.arch }} | |
runs-on: ubuntu-latest | |
if: ${{ github.event_name == 'workflow_dispatch' }} | |
strategy: | |
matrix: | |
arch: ["x86_64", "aarch64"] | |
python: ["cp39-*", "cp310-*"] | |
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: Set up QEMU | |
if: runner.os == 'Linux' | |
uses: docker/setup-qemu-action@v2 | |
with: | |
platforms: 'arm64,amd64' | |
- name: Build wheel | |
run: | | |
pip install cibuildwheel twine | |
CIBW_BUILD=${{ matrix.python }} cibuildwheel --platform linux | |
env: | |
CIBW_ARCHS_LINUX: ${{ matrix.arch }} | |
build_and_test_java: | |
name: Build and Test Java on AMD | |
runs-on: ubuntu-latest | |
if: ${{ github.event_name == 'workflow_dispatch' }} | |
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 JDK | |
run: | | |
sudo apt update | |
sudo apt install default-jdk -y | |
- name: Install Conan dependencies | |
run: | | |
last_tag=$(curl https://api.github.com/repos/unum-cloud/ustore-deps/releases/latest | grep -i 'tag_name' | awk -F '\"' '{print $4}') | |
wget -q https://github.com/unum-cloud/ustore-deps/releases/download/"$last_tag"/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 | |
package_version=$(ls ~/.conan/data/ustore_deps/) | |
conan install ustore_deps/"$package_version"@unum/x86_linux -g cmake -s compiler.version=11 | |
rm -rf ./ustore_deps_x86_linux.tar.gz | |
- name: Test Java | |
run: | | |
mkdir -p ./tmp | |
export USTORE_TEST_PATH="./tmp/" | |
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 |