This repository has been archived by the owner on May 9, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
122 lines (102 loc) · 4.25 KB
/
build.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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
name: Reusable build action
on:
workflow_call:
inputs:
name:
type: string
options:
type: string
cuda_compiler_version:
type: string
outputs:
cache-suffix:
value: ${{ jobs.build.outputs.cache-suffix }}
permissions: read-all
jobs:
build:
name: Linux - Conda - ${{ inputs.name }}
runs-on: ubuntu-latest
outputs:
cache-suffix: ${{ env.DATE }}
steps:
- uses: actions/checkout@v3
- name: Free space
run: |
sudo rm -rf /usr/local/lib/android/sdk /opt/hostedtoolcache /usr/share/swift /opt/az
sudo apt-get purge -y gcc llvm-12 llvm-13 llvm-14
- name: Set Swap Space
uses: pierotofy/set-swap-space@master
with:
swap-size-gb: 12
- name: Set env context
run: |
echo RUN_STAMP=${{ runner.os }}-${{ inputs.name }} >>$GITHUB_ENV
echo CONDA_ENV_PATH=$CONDA/envs/omnisci-dev >>$GITHUB_ENV
echo "DATE=$(date +'%Y%m%d')" >> $GITHUB_ENV
- name: Restore Conda env cache
id: conda-cache
uses: actions/cache@v3
with:
path: |
${{ env.CONDA_ENV_PATH }}
key: ${{ env.RUN_STAMP }}-conda-${{ hashFiles('omniscidb/scripts/mapd-deps-conda-dev-env.yml') }}-${{ env.DATE }}
restore-keys: |
${{ env.RUN_STAMP }}-conda-${{ hashFiles('omniscidb/scripts/mapd-deps-conda-dev-env.yml') }}-
- name: Update Conda env
if: steps.conda-cache.cache-hit != 'true'
run: |
conda update conda
conda env update -f omniscidb/scripts/mapd-deps-conda-dev-env.yml
- name: Install cuda
if: inputs.name == 'cuda' || inputs.name == 'all-gpus'
run: |
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.0-1_all.deb
sudo dpkg -i cuda-keyring_1.0-1_all.deb
sudo apt-get update
sudo apt-get install cuda-nvcc-${{ inputs.cuda_compiler_version }}
conda install -n omnisci-dev -c conda-forge arrow-cpp-proc=4.0.0=cuda
- name: Install Intel GPU drivers
if: inputs.name == 'l0' || inputs.name == 'all-gpus'
run: |
wget https://github.com/oneapi-src/level-zero/releases/download/v1.9.4/level-zero-devel_1.9.4+u18.04_amd64.deb
wget https://github.com/oneapi-src/level-zero/releases/download/v1.9.4/level-zero_1.9.4+u18.04_amd64.deb
wget https://github.com/intel/intel-graphics-compiler/releases/download/igc-1.0.12812.24/intel-igc-core_1.0.12812.24_amd64.deb
wget https://github.com/intel/intel-graphics-compiler/releases/download/igc-1.0.12812.24/intel-igc-opencl_1.0.12812.24_amd64.deb
wget https://github.com/intel/compute-runtime/releases/download/22.49.25018.24/intel-level-zero-gpu_1.3.25018.24_amd64.deb
wget https://github.com/intel/compute-runtime/releases/download/22.49.25018.24/libigdgmm12_22.3.0_amd64.deb
sudo dpkg -i intel-igc-core_1.0.12812.24_amd64.deb intel-level-zero-gpu_1.3.25018.24_amd64.deb libigdgmm12_22.3.0_amd64.deb intel-igc-opencl_1.0.12812.24_amd64.deb
conda install -n omnisci-dev -c conda-forge level-zero-devel pkg-config
- name: Install clang
if: inputs.name == 'clang-cpu'
run: |
conda install -n omnisci-dev -c conda-forge compiler-rt
- name: Restore Maven cache
uses: actions/cache@v3
with:
path: |
~/.m2
key: maven-${{ hashFiles('**/pom.xml') }}
restore-keys: maven-
- name: Debug conda list
run: |
conda info
conda list -n omnisci-dev
- name: Configure and build
run: |
conda info --env
conda run --no-capture-output -n omnisci-dev sh omniscidb/scripts/conda/build.sh ${{ inputs.options }}
tar -zcf /tmp/build.tgz .
- name: Upload build and src files
uses: actions/upload-artifact@v3
with:
name: ${{ env.RUN_STAMP }}-build
path: /tmp/build.tgz
- name: Upload logs
if: always()
uses: actions/upload-artifact@v3
with:
name: ${{ env.RUN_STAMP }}-logs
path: |
build/*.log
build/CMakeCache.txt
build/CMakeFiles/*.log