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
68 lines (57 loc) · 2.17 KB
/
pytest.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
name: pyhdk pytest
on:
workflow_call:
permissions: read-all
jobs:
build:
name: Build and Test (Linux - Conda - gcc-cpu)
runs-on: ubuntu-latest
env:
CONDA_ENV: omnisci-dev
steps:
- uses: actions/checkout@v3
- name: Set env context
run: |
echo CONDA_PATH=$CONDA >>$GITHUB_ENV
echo RUN_STAMP=${{ runner.os }}-${{ (env.cuda_compiler_version != 'None') && format('cuda{0}', env.cuda_compiler_version) || 'gcc-cpu' }} >>$GITHUB_ENV
echo CONDA_ENV_PATH=$CONDA/envs/${{ env.CONDA_ENV }} >>$GITHUB_ENV
- name: Restore Conda env cache
id: restore-conda-cache
uses: actions/cache/restore@v3
with:
path: |
${{ env.CONDA_ENV_PATH }}
key: ${{ env.RUN_STAMP }}-conda-pytest-${{ hashFiles('omniscidb/scripts/mapd-deps-conda-dev-env.yml') }}-${{ env.DATE }}
restore-keys: |
${{ env.RUN_STAMP }}-conda-pytest-${{ 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: Save Conda env cache
id: save-conda-cache
uses: actions/cache/save@v3
with:
path: |
${{ env.CONDA_ENV_PATH }}
key: ${{ env.RUN_STAMP }}-conda-pytest-${{ hashFiles('omniscidb/scripts/mapd-deps-conda-dev-env.yml') }}-${{ env.DATE }}
- name: Restore Maven cache
uses: actions/cache@v3
with:
path: |
~/.m2
key: maven-${{ hashFiles('**/pom.xml') }}
restore-keys: maven-
- name: Build
env:
CPU_COUNT: 4
RUN_TESTS: 1
run: |
rm -rf build
mkdir -p build
cd build
$CONDA/bin/conda run -n ${{ env.CONDA_ENV }} sh -c "cmake .. -DENABLE_CUDA=off -DENABLE_CONDA=on -DENABLE_PYTHON=on -DCMAKE_BUILD_TYPE=release && make -j2 && make install"
- name: Run pytest
run: |
$CONDA/bin/conda run -n ${{ env.CONDA_ENV }} pytest -s python/tests/ --ignore=python/tests/modin