Skip to content
This repository was archived by the owner on May 9, 2024. It is now read-only.

Commit 8cc4941

Browse files
authored
Re-enable ASAN build (#535)
* Re-enabled ASAN build * Fix review comment
1 parent 363c149 commit 8cc4941

File tree

5 files changed

+45
-11
lines changed

5 files changed

+45
-11
lines changed

.github/workflows/build-docker.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ jobs:
7070

7171
- name: Start the container
7272
run: |
73+
set -vx
7374
mkdir -p build
7475
docker run -id --name build.${{ inputs.name }} --network host build.${{ inputs.name }}:latest
7576
docker cp . build.${{ inputs.name }}:/_work

.github/workflows/main.yml

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,13 @@ jobs:
3232
name: clang
3333
options: -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
3434

35+
build-asan:
36+
name: Build
37+
uses: ./.github/workflows/build.yml
38+
with:
39+
name: asan
40+
options: -DENABLE_ASAN=on
41+
3542
build-l0:
3643
name: Build
3744
uses: ./.github/workflows/build.yml
@@ -82,20 +89,21 @@ jobs:
8289
test: sanity
8390

8491
asan:
85-
name: Asan test (Gtests)
92+
name: ASAN generate cache (Gtests)
8693
needs: build
8794
uses: ./.github/workflows/test.yml
8895
with:
8996
cache-suffix: ${{ needs.build.outputs.cache-suffix }}
9097
test: asan
9198

92-
# test-asan-docker:
93-
# needs: [build-asan, asan]
94-
# uses: ./.github/workflows/test-docker.yml
95-
# with:
96-
# build-name: asan
97-
# reset-cache: ${{ !!inputs.reset-cache }}
98-
99+
test-asan-docker:
100+
name: ASAN docker test (Gtests)
101+
needs: [build-asan, asan]
102+
uses: ./.github/workflows/test-docker.yml
103+
with:
104+
name: conda
105+
build-name: asan
106+
reset-cache: ${{ !!inputs.reset-cache }}
99107

100108
build-cuda-docker:
101109
name: Build
@@ -168,3 +176,4 @@ jobs:
168176
name: PyHDK (Pytest)
169177
uses: ./.github/workflows/pytest.yml
170178

179+

.github/workflows/test-docker.yml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,20 @@ jobs:
3434
echo RUN_STAMP=docker-${{ runner.os }}-${{ inputs.name }} >>$GITHUB_ENV
3535
3636
- uses: actions/download-artifact@v3
37+
if: inputs.build-name != 'asan'
3738
with:
3839
name: ${{ env.RUN_STAMP }}-${{ inputs.build-name }}
3940

41+
- uses: actions/download-artifact@v3
42+
if: inputs.build-name == 'asan'
43+
with:
44+
name: ${{ runner.os }}-asan-build
45+
46+
- uses: actions/download-artifact@v3
47+
if: inputs.build-name == 'asan'
48+
with:
49+
name: ${{ runner.os }}-asan-cache
50+
4051
- name: Unpack build files, create Dockerfile
4152
run: |
4253
tar -zxf build.tgz
@@ -73,7 +84,13 @@ jobs:
7384
- name: ASAN test
7485
if: inputs.build-name == 'asan'
7586
run: |
76-
echo FIXME docker exec -u ghrunner hdk-build.${{ inputs.name }} bash -c 'cd /_work/omniscidb/build/Tests && ./ArrowBasedExecuteTest --use-rel-alg-cache=cache.txt'
87+
docker cp cache.tgz hdk-build.${{ inputs.name }}:/_work/
88+
docker exec hdk-build.${{ inputs.name }} chown -R ghrunner:ghrunner /_work/
89+
docker exec -u ghrunner hdk-build.${{ inputs.name }} tar -zxf /_work/cache.tgz -C /_work/build/omniscidb/Tests
90+
docker exec -u ghrunner hdk-build.${{ inputs.name }} conda update conda
91+
docker exec -u ghrunner hdk-build.${{ inputs.name }} conda env update -f /_work/omniscidb/scripts/mapd-deps-conda-dev-env.yml
92+
docker exec -u ghrunner hdk-build.${{ inputs.name }} conda install -n omnisci-dev -c conda-forge gtest
93+
docker exec -u ghrunner hdk-build.${{ inputs.name }} conda run --no-capture-output -n omnisci-dev bash -cvx 'export LD_LIBRARY_PATH=$(find /_work -name "*.so" -exec dirname {} \; | sort -u | tr "\n" :)$LD_LIBRARY_PATH; cd /_work/build/omniscidb/Tests && ldd ./ArrowBasedExecuteTest && ./ArrowBasedExecuteTest --use-rel-alg-cache=cache.txt'
7794
7895
- name: L0 Sanity test
7996
if: inputs.name == 'l0'
@@ -85,4 +102,3 @@ jobs:
85102
if: always()
86103
run: docker stop hdk-build.${{ inputs.name }} || true
87104

88-

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,6 @@ jobs:
9191
if: inputs.test == 'asan'
9292
uses: actions/upload-artifact@v3
9393
with:
94-
name: docker-${{ env.RUN_STAMP }}-asan
94+
name: ${{ runner.os }}-asan-cache
9595
path: /tmp/cache.tgz
9696

docker/Dockerfile.conda

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Conda
2+
RUN curl -o Miniconda3-latest-Linux-x86_64.sh -L https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh && \
3+
sh Miniconda3-latest-Linux-x86_64.sh -u -b -p /usr/share/miniconda && \
4+
chown -R ghrunner:ghrunner /usr/share/miniconda && \
5+
rm -f Miniconda3-latest-Linux-x86_64.sh
6+
7+
ENV PATH /usr/share/miniconda/envs/omnisci-dev/bin:/usr/share/miniconda/bin:$PATH
8+

0 commit comments

Comments
 (0)