forked from vesoft-inc/nebula-third-party
-
Notifications
You must be signed in to change notification settings - Fork 0
79 lines (74 loc) · 2.1 KB
/
pull_request.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
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
- 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}
export LD_LIBRARY_PATH=${TOOLSET_GCC_DIR}/lib64:$LD_LIBRARY_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