|
| 1 | +name: Validate registered models |
| 2 | +'on': |
| 3 | + push: |
| 4 | + branches-ignore: |
| 5 | + - gh-pages |
| 6 | + tags: |
| 7 | + - '*' |
| 8 | + schedule: |
| 9 | + - cron: 0 10 * * 1 |
| 10 | +jobs: |
| 11 | + test: |
| 12 | + runs-on: ${{ matrix.os }} |
| 13 | + defaults: |
| 14 | + run: |
| 15 | + shell: bash -el {0} |
| 16 | + strategy: |
| 17 | + matrix: |
| 18 | + os: [ubuntu-latest, macos-latest, windows-latest] |
| 19 | + yggdrasil-version: [latest, dev] |
| 20 | + fail-fast: false |
| 21 | + steps: |
| 22 | + - name: Check out repository code |
| 23 | + uses: actions/checkout@v4 |
| 24 | + with: |
| 25 | + submodules: true |
| 26 | + |
| 27 | + ################################### |
| 28 | + # CONDA SETUP |
| 29 | + ################################### |
| 30 | + - name: Set up MSVC Compiler on windows |
| 31 | + uses: ilammy/msvc-dev-cmd@v1 |
| 32 | + if: matrix.os == 'windows-latest' |
| 33 | + - name: Set up miniconda test environment |
| 34 | + uses: conda-incubator/setup-miniconda@v3 |
| 35 | + with: |
| 36 | + auto-update-conda: true |
| 37 | + channels: conda-forge |
| 38 | + channel-priority: strict |
| 39 | + miniforge-variant: Miniforge3 |
| 40 | + miniforge-version: latest |
| 41 | + conda-remove-defaults: true |
| 42 | + - name: Check conda installation |
| 43 | + run: | |
| 44 | + conda info |
| 45 | + conda list |
| 46 | + - name: Install R (Windows) |
| 47 | + uses: r-lib/actions/setup-r@v2 |
| 48 | + if: matrix.os == 'windows-latest' |
| 49 | + # - name: Install compilers using conda on Linux/Mac |
| 50 | + # if: matrix.os != 'windows-latest' |
| 51 | + # run: | |
| 52 | + # conda install c-compiler cxx-compiler |
| 53 | + - name: Install development version of Yggdrasil |
| 54 | + if: matrix.yggdrasil-version == 'dev' |
| 55 | + run: | |
| 56 | + git clone https://github.com/cropsinsilico/yggdrasil.git |
| 57 | + cd yggdrasil |
| 58 | + python utils/setup_test_env.py conda-dev --build-method direct |
| 59 | + - name: Install specific version of Yggdrasil via conda |
| 60 | + if: matrix.yggdrasil-version != 'latest' && matrix.yggdrasil-version != 'dev' |
| 61 | + run: | |
| 62 | + conda install yggdrasil==${{ matrix.yggdrasil-version }} -y |
| 63 | + - name: Install R (Unix) |
| 64 | + if: matrix.os != 'windows-latest' && matrix.yggdrasil-version != 'dev' |
| 65 | + run: |
| 66 | + conda install yggdrasil.r |
| 67 | + - name: Check conda installation |
| 68 | + run: | |
| 69 | + conda info |
| 70 | + conda list |
| 71 | +
|
| 72 | + ################################### |
| 73 | + # Validate |
| 74 | + ################################### |
| 75 | + - name: Check installed packages |
| 76 | + run: | |
| 77 | + conda list |
| 78 | + ygginfo --verbose |
| 79 | + - name: Validate models |
| 80 | + run: | |
| 81 | + python -m yggdrasil validate models |
0 commit comments