Skip to content

Merge pull request #20 from Presburger/main_ #32

Merge pull request #20 from Presburger/main_

Merge pull request #20 from Presburger/main_ #32

Workflow file for this run

name: Upload to JFrog
# This workflow is triggered on pushes or pull request to the repository.
on:
push:
tags:
- '*'
branches:
- main
- develop
jobs:
Build:
name: Build for ${{ matrix.name }}
runs-on: ubuntu-22.04
timeout-minutes: 180
strategy:
fail-fast: false
matrix:
include:
- name: Ubuntu 20.04
os: ubuntu20.04
- name: Amazonlinux 2023
os: amazonlinux2023
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Cache Conan Packages
uses: pat-s/always-upload-cache@v3
with:
path: .docker/conan-cache/data
key: conan-${{ matrix.os }}-${{ hashFiles('conanfile.*') }}
- name: Prepare
run: |
mkdir -p .docker/conan-cache
uid=$(id -u)
gid=$(id -g)
[ "$uid" -lt 500 ] && uid=501
[ "$gid" -lt 500 ] && gid=$uid
echo "UID=$uid" >> $GITHUB_ENV
echo "GID=$gid" >> $GITHUB_ENV
echo "VERSION=$(git describe --tags --always --dirty="-dev" | cut -c 2-)" >> $GITHUB_ENV
- name: Build
run: |
cat << EOF > build.sh
#!/usr/bin/env bash
conan remote add default-conan-local https://milvus01.jfrog.io/artifactory/api/conan/default-conan-local
if [[ `gcc -v 2>&1 | sed -n 's/.*\(--with-default-libstdcxx-abi\)=\(\w*\).*/\2/p'` == "gcc4" ]]; then
conan create . folly/${{ env.VERSION }}@milvus/dev --build=missing
else
conan create . folly/${{ env.VERSION }}@milvus/dev --build=missing -s compiler.libcxx=libstdc++11
fi
EOF
chmod +x build.sh
docker run -e CONAN_REVISIONS_ENABLED=1 -v $(pwd)/.docker/conan-cache:/root/.conan:delegated -v $(pwd):/folly:delegated -w /folly milvusdb/milvus-env:${{ matrix.os }}-20230907-2a755ba bash -c /folly/build.sh
- name: Upload
run: |
docker run -e CONAN_REVISIONS_ENABLED=1 -v $(pwd)/.docker/conan-cache:/root/.conan:delegated milvusdb/milvus-env:${{ matrix.os }}-20230907-2a755ba conan user -p ${{ secrets.JFROG_PASSWORD }} -r default-conan-local ${{ secrets.JFROG_USERNAME }}
docker run -e CONAN_REVISIONS_ENABLED=1 -v $(pwd)/.docker/conan-cache:/root/.conan:delegated milvusdb/milvus-env:${{ matrix.os }}-20230907-2a755ba conan upload folly/${{ env.VERSION }}@milvus/dev -r default-conan-local --all