Fix compile error with clang15 on MacOS #14
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: 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: Centos7 | |
os: centos7 | |
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 -u ${{env.UID}}:${{env.GID}} -e CONAN_REVISIONS_ENABLED=1 -v $(pwd)/.docker/conan-cache:/home/milvus/.conan:delegated -v $(pwd):/folly:delegated -w /folly milvusdb/milvus-env:amd64-${{ matrix.os }}-20230215-5351fee bash -c /folly/build.sh | |
- name: Upload | |
run: | | |
docker run -u ${{env.UID}}:${{env.GID}} -e CONAN_REVISIONS_ENABLED=1 -v $(pwd)/.docker/conan-cache:/home/milvus/.conan:delegated milvusdb/milvus-env:amd64-${{ matrix.os }}-20230215-5351fee conan user -p ${{ secrets.JFROG_PASSWORD }} -r default-conan-local ${{ secrets.JFROG_USERNAME }} | |
docker run -u ${{env.UID}}:${{env.GID}} -e CONAN_REVISIONS_ENABLED=1 -v $(pwd)/.docker/conan-cache:/home/milvus/.conan:delegated milvusdb/milvus-env:amd64-${{ matrix.os }}-20230215-5351fee conan upload folly/${{ env.VERSION }}@milvus/dev -r default-conan-local --all |