-
Notifications
You must be signed in to change notification settings - Fork 92
79 lines (68 loc) · 2.4 KB
/
build_and_test.yml
File metadata and controls
79 lines (68 loc) · 2.4 KB
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
name: build and test
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
test:
name: ${{ matrix.config.name }} (Python ${{ matrix.python-version}})
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
python-version: [3.11, 3.12, 3.13]
config:
- {
name: Linux,
os: ubuntu-latest
}
defaults:
run:
# Using a login shell is necessary to persist the conda environment
shell: bash -l {0}
steps:
- name: Set up Miniconda
uses: conda-incubator/setup-miniconda@v3
with:
channels: conda-forge
conda-remove-defaults: "true"
auto-update-conda: true
conda-solver: libmamba
python-version: ${{ matrix.python-version }}
activate-environment: tomviz
- name: Checkout Tomviz
uses: actions/checkout@v5
with:
submodules: recursive
path: tomviz
- name: Install Build Requirements
# I can't get the defaults channel fully removed, so we have to
# --override-channels here.
run: |
conda install -y --override-channels -c conda-forge --file tomviz/.github/workflows/build_requirements.txt
# Record the whole build environment for caching
conda env export > build_env.yml
echo "build_env.yml file contents is:"
cat build_env.yml
- name: Build Tomviz
run: bash tomviz/.github/workflows/scripts/build_tomviz.sh
- name: Install Runtime Requirements
# I can't get the defaults channel fully removed, so we have to
# --override-channels here.
run: conda install -y --override-channels -c conda-forge --file tomviz/.github/workflows/runtime_requirements.txt
- name: Install Test Requirements
run: |
conda install -y --override-channels -c conda-forge --file tomviz/tests/python/requirements-dev.txt
pip install --no-build-isolation --no-deps -U tomviz/tomviz/python
pip install --no-build-isolation --no-deps -U tomviz/acquisition
- name: Run Tests
run: |
cd tomviz-build
TOMVIZ_TEST_PYTHON_EXECUTABLE=$(which python3) ctest --output-on-failure
- name: Upload CTest Log (On Failure Only)
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: TomvizCTestLog.log
path: tomviz-build/Testing/Temporary/LastTest.log