Fix hard coded values and add conda libraries preferentially during d… #86
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: Test of conda recipe build | |
| 'on': | |
| push: | |
| branches-ignore: | |
| - gh-pages | |
| tags: | |
| - '*' | |
| schedule: | |
| - cron: 0 10 * * 1 | |
| jobs: | |
| build_conda_recipe: | |
| runs-on: ${{ matrix.os }} | |
| defaults: | |
| run: | |
| shell: bash -el {0} | |
| strategy: | |
| matrix: | |
| sundials-version: [latest] | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| fail-fast: false | |
| steps: | |
| - name: Check out repository code | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| ################################### | |
| # CONDA SETUP | |
| ################################### | |
| - name: Set up MSVC Compiler on windows | |
| uses: ilammy/msvc-dev-cmd@v1 | |
| if: matrix.os == 'windows-latest' | |
| - name: Set up miniconda test environment (W/O MPI) | |
| uses: conda-incubator/setup-miniconda@v3 | |
| with: | |
| activate-environment: "" | |
| auto-activate-base: true | |
| auto-update-conda: true | |
| channels: conda-forge | |
| channel-priority: strict | |
| miniforge-variant: Miniforge3 | |
| miniforge-version: latest | |
| conda-remove-defaults: true | |
| - name: Install conda-build | |
| run: | | |
| conda info | |
| conda list | |
| conda install conda-build py-lief=0.14 cmake numpy -y | |
| - name: Check conda installation | |
| run: | | |
| conda info | |
| conda list | |
| conda create -n test python=3.11 | |
| - name: Build conda recipe | |
| run: | | |
| conda-build --use-local --no-anaconda-upload --output-folder ./local_channel/ --python 3.11 recipe/ | |
| - name: Install from local conda recipe | |
| run: | | |
| conda install -n test -c ./local_channel ePhotosynthesis | |
| conda list -n test | |
| ################################### | |
| # Test | |
| ################################### | |
| - name: Test ePhoto executable install by conda | |
| run: | | |
| conda run -n test ePhoto -d 4 --evn tests/data/InputEvn.txt --grn tests/data/InputGRNC.txt --enzyme tests/data/InputEnzyme.txt --atpcost tests/data/InputATPCost.txt --output output_conda.data | |
| - name: Check output from ePhoto executable install by conda | |
| run: | | |
| conda run -n test python scripts/devtasks.py compare-files output_conda.data --driver 4 | |
| - name: Build example against the installed library using CMake/Make (Unix) | |
| if: matrix.os != 'windows-latest' | |
| run: | | |
| conda list -n test | |
| cd tests/external | |
| mkdir build | |
| cd build | |
| conda run -n test cmake .. -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON | |
| conda run -n test cmake --build . | |
| - name: Build example against the installed library using CMake/Ninja (Windows) | |
| if: matrix.os == 'windows-latest' | |
| run: | | |
| conda list -n test | |
| cd tests/external | |
| mkdir build | |
| cd build | |
| conda run -n test cmake -GNinja -D CMAKE_BUILD_TYPE=Release -D CMAKE_VERBOSE_MAKEFILE:BOOL=ON .. | |
| conda run -n test cmake --build . | |
| - name: Test built example executable (Unix) | |
| if: matrix.os != 'windows-latest' | |
| run: | | |
| cd tests | |
| conda run -n test ./external/build/example | |
| - name: Test built example executable (Windows) | |
| if: matrix.os == 'windows-latest' | |
| run: | | |
| cd tests | |
| ls | |
| ls ./external/build/ | |
| # ./external/build/Release/example | |
| conda run -n test ./external/build/example | |
| - name: Check built example executable output | |
| run: | | |
| conda run -n test python scripts/devtasks.py compare-files tests/example_output.data --driver 4 |