Merge pull request #7 from psavery/python-site-packages #4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |