Skip to content

Commit

Permalink
Merge pull request #423 from unum-cloud/main-dev
Browse files Browse the repository at this point in the history
Fix: Release builds
  • Loading branch information
ashvardanian authored Aug 17, 2023
2 parents fa34788 + 3e9a388 commit cebafd5
Show file tree
Hide file tree
Showing 4 changed files with 90 additions and 32 deletions.
27 changes: 16 additions & 11 deletions .github/workflows/prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
push:
branches: ["main-dev"]

workflow_dispatch: {}

env:
GH_TOKEN: ${{ secrets.SEMANTIC_RELEASE_TOKEN }}
BUILD_TYPE: Release
Expand All @@ -23,8 +25,9 @@ jobs:


build_ustore_amd64:
name: Build Libraries
name: Build Libraries on AMD
runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' }}
steps:
- uses: actions/checkout@v3
with:
Expand Down Expand Up @@ -66,10 +69,10 @@ jobs:
with:
name: binaries
path: build_release/build/bin/*



test_cpp:
name: Test C++ on AMD
test_ustore_amd64:
name: Test Libraries on AMD
runs-on: ubuntu-latest
needs: build_ustore_amd64
steps:
Expand All @@ -94,14 +97,14 @@ jobs:
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
Expand Down Expand Up @@ -133,12 +136,14 @@ jobs:
--load .
test_python:
name: Test Python 3.9 & 3.10
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:
Expand All @@ -157,15 +162,15 @@ jobs:
- name: Build wheel
run: |
pip install cibuildwheel twine
CIBW_BUILD="cp39-*" cibuildwheel --platform linux
CIBW_BUILD="cp310-*" cibuildwheel --platform linux
CIBW_BUILD=${{ matrix.python }} cibuildwheel --platform linux
env:
CIBW_ARCHS_LINUX: ${{ matrix.arch }}


test_java:
name: Test Java
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
Expand Down
89 changes: 71 additions & 18 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ concurrency:

env:
GH_TOKEN: ${{ secrets.SEMANTIC_RELEASE_TOKEN }}
BUILD_TYPE: Release


jobs:
Expand Down Expand Up @@ -70,14 +71,65 @@ jobs:
id: deployment
uses: actions/deploy-pages@v1


build_ustore_amd64:
name: Build Libraries on AMD
runs-on: ubuntu-latest
needs: versioning
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false
ref: 'main'

- 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=Release \
-DUSTORE_BUILD_TESTS=0 \
-DUSTORE_BUILD_BENCHMARKS=0 \
-DUSTORE_BUILD_ENGINE_UCSET=1 \
-DUSTORE_BUILD_ENGINE_LEVELDB=1 \
-DUSTORE_BUILD_ENGINE_ROCKSDB=1 \
-DUSTORE_BUILD_API_FLIGHT_CLIENT=0 \
-DUSTORE_BUILD_API_FLIGHT_SERVER=1 \
-DUSE_CONAN=1 .
- name: Build
run: make -j 4 -C ./build_release

- name: Upload Precompiled binaries to Release Assets
uses: xresloader/upload-to-github-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
file: "./build_release/build/bin/*"
update_latest_release: true


build_wheel:
name: Build python
name: Build Python ${{ matrix.python }} on ${{ matrix.arch }}
runs-on: ubuntu-latest
needs: deploy
strategy:
matrix:
arch: ["x86_64", "aarch64"]
python: ["cp39-*", "cp310-*"]
steps:
- uses: actions/checkout@v3
with:
Expand All @@ -95,8 +147,7 @@ jobs:
- name: Build wheel
run: |
pip install cibuildwheel twine
CIBW_BUILD="cp39-*" cibuildwheel --platform linux
CIBW_BUILD="cp310-*" cibuildwheel --platform linux
CIBW_BUILD=${{ matrix.python }} cibuildwheel --platform linux
env:
CIBW_ARCHS_LINUX: ${{ matrix.arch }}

Expand Down Expand Up @@ -128,8 +179,8 @@ jobs:
print-hash: true


build_publish_java:
name: Build and publish Java
build_and_publish_java:
name: Build and Publish Java
needs: versioning
runs-on: ubuntu-latest
steps:
Expand All @@ -141,6 +192,11 @@ jobs:
- 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 update
sudo apt install default-jdk -y
- name: Install UStore dependencies using conan
run: |
last_tag=$(curl https://api.github.com/repos/unum-cloud/ustore-deps/releases/latest | grep -i 'tag_name' | awk -F '\"' '{print $4}')
Expand All @@ -151,23 +207,21 @@ jobs:
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: Install default jdk
run: |
sudo apt update
sudo apt install default-jdk -y
- name: Build and 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 java/pack.sh
- name: Publish java
run: ./java/gradlew publish


build_publish_docker:
name: Build and publish docker
build_and_publish_docker:
name: Build and Publish Docker
needs: versioning
runs-on: ubuntu-latest
steps:
Expand All @@ -187,12 +241,11 @@ jobs:
with:
platforms: linux/amd64, linux/arm64

- name: docker login
uses: azure/docker-login@v1
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
login-server: index.docker.io
username: ${{ secrets.DOCKERIO_USERNAME }}
password: ${{ secrets.DOCKERIO_PASSWORD }}
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build Docker
run: |
Expand All @@ -202,7 +255,7 @@ jobs:
docker buildx build \
--platform "linux/amd64,linux/arm64" \
--build-arg version=$version \
--build-arg TEST_USTORE="False"
--build-arg TEST_USTORE="False" \
--file ./Dockerfile \
--tag unum/ustore:$version-jammy \
--tag unum/ustore:latest \
Expand Down
4 changes: 2 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
cff-version: 0.13.8
cff-version: 0.13.9
message: "If you use this software, please cite it as below."
authors:
- family-names: "Vardanian"
given-names: "Ash"
orcid: "https://orcid.org/0000-0002-4882-1815"
title: "UStore by Unum Cloud"
version: 0.13.8
version: 0.13.9
doi: 10.5281/zenodo.7537043
date-released: 2022-06-12
url: "https://github.com/unum-cloud/ustore"
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.13.8
0.13.9

0 comments on commit cebafd5

Please sign in to comment.