Update pull_request.yml #20
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: pull_request | |
on: | |
push: | |
branches: | |
- '**' # This will run the workflow on any branch when a pull request is created | |
workflow_dispatch: | |
defaults: | |
run: | |
shell: bash | |
env: | |
URL: https://raw.githubusercontent.com/vesoft-inc/nebula-gears/master/install | |
jobs: | |
build_and_upload: | |
runs-on: | |
- self-hosted | |
- ${{ matrix.arch }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
#- centos7 | |
#- centos8 | |
#- ubuntu1604 | |
#- ubuntu1804 | |
#- ubuntu2004 | |
- ubuntu2204 | |
- ubuntu2304 | |
compiler: | |
- 9.3.0 | |
arch: | |
- x86_64 | |
- arm64 | |
container: | |
image: vesoft/third-party-build:${{ matrix.os }} | |
steps: | |
- uses: webiny/action-post-run@3.0.0 | |
with: | |
run: sh -c "find . -mindepth 1 -delete" | |
- uses: actions/checkout@v3 | |
- name: Set up environment | |
run: | | |
echo "path=$(pwd)" >> $GITHUB_ENV | |
echo "COMPILER_VERSION=${{ matrix.compiler }}" >> $GITHUB_ENV | |
- name: Install dependencies | |
run: | | |
bash <(curl -Ls $URL) | |
install-gcc --version=${{ matrix.compiler }} | |
- name: Pre-Build | |
run: | | |
cd .. | |
if [ -d "build" ]; then | |
find build -maxdepth 1 -mindepth 1 ! -name '*.tgz' ! -name 'tarballs' -exec rm -rf {} + | |
else | |
mkdir build | |
fi | |
sync | |
echo "/opt/vesoft/toolset/gcc/${COMPILER_VERSION}/lib64" > /etc/ld.so.conf.d/my_compiler.conf | |
ldconfig | |
- name: Build | |
run: | | |
export TOOLSET_GCC_DIR=/opt/vesoft/toolset/gcc/${COMPILER_VERSION} | |
export CC=${TOOLSET_GCC_DIR}/bin/gcc | |
export CXX=${TOOLSET_GCC_DIR}/bin/g++ | |
export PATH=${TOOLSET_GCC_DIR}/bin:${PATH} | |
build_package=1 ${{ env.path }}/build.sh | |
working-directory: ../build/ | |
- name: Upload to OSS | |
uses: vesoft-inc/.github/actions/upload-to-oss@master | |
with: | |
key-id: ${{ secrets.OSS_ID }} | |
key-secret: ${{ secrets.OSS_SECRET }} | |
endpoint: ${{ secrets.OSS_ENDPOINT }} | |
bucket: nebula-test11 | |
asset-path: ../build/packages | |
target-path: third-party | |