Fix example compilation errors and guard against built w/o Yggdrasil … #3
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: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| python-version: ["3.11"] | |
| 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 | |
| uses: conda-incubator/setup-miniconda@v3 | |
| with: | |
| activate-environment: "" | |
| auto-activate-base: true | |
| auto-update-conda: true | |
| channels: conda-forge | |
| channel-priority: strict | |
| miniforge-version: latest | |
| conda-remove-defaults: true | |
| - name: Install conda-build | |
| run: | | |
| conda info | |
| conda list | |
| conda install conda-build cmake numpy -y | |
| - name: Check conda installation | |
| run: | | |
| conda info | |
| conda list | |
| conda create -n test python=${{ matrix.python-version }} | |
| - name: Build conda recipe | |
| run: | | |
| conda-build --use-local --no-anaconda-upload --output-folder ./local_channel/ --python ${{ matrix.python-version }} recipe/ | |
| - name: Install from local conda recipe | |
| run: | | |
| conda install -n test -c ./local_channel yggdrasil_rapidjson | |
| conda list -n test | |
| ################################### | |
| # Test | |
| ################################### | |
| # TODO: Update to yggdrasil version | |
| - name: Build & run serialize test example using conda installation | |
| run: | | |
| mkdir example/serialize/build | |
| cd example/serialize/build | |
| conda run -n test cmake .. -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON | |
| conda run -n test cmake --build . --config Debug | |
| conda run -n test ./serialize | |
| - name: Build & run yggdrasil test example using conda installation | |
| run: | | |
| mkdir example/yggdrasil/build | |
| cd example/yggdrasil/build | |
| conda run -n test cmake .. -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON | |
| conda run -n test cmake --build . --config Debug | |
| conda run -n test ./yggdrasil | |
| - name: Build & run schemanormalizer test example using conda installation | |
| run: | | |
| mkdir example/units/build | |
| cd example/units/build | |
| conda run -n test cmake .. -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON | |
| conda run -n test cmake --build . --config Debug | |
| conda run -n test ./units |