Bump actions/checkout from 5 to 6 #198
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: conda-test | |
| on: | |
| push: | |
| pull_request: | |
| jobs: | |
| build: | |
| strategy: | |
| matrix: | |
| os: [ ubuntu-latest, macos-latest ] | |
| runs-on: ${{ matrix.os }} | |
| defaults: | |
| run: | |
| shell: bash -el {0} | |
| env: | |
| CONDA_SOLVER: libmamba | |
| steps: | |
| - name: Checkout main repository | |
| uses: actions/checkout@v6 | |
| - name: Setup conda environment | |
| uses: conda-incubator/setup-miniconda@v3 | |
| with: | |
| activate-environment: sbenv | |
| environment-file: ./resources/conda_sbenv.yml | |
| - name: Conda list | |
| run: conda list | |
| - name: Install self | |
| run: | | |
| #NB: the simple-build-system conda package was installed, but we | |
| #remove it (and *only* it, hence --force), and add ourselves via pip | |
| #(one side-effect of this is that we no longer have the simplebuild | |
| #conda activation script!): | |
| conda remove --yes --force simple-build-system | |
| python3 -mpip install . | |
| echo "sb --version:" | |
| sb --version | |
| - name: Build-and-test-release-mode | |
| run: | | |
| mkdir myproj | |
| cd myproj | |
| sb --init core_val RELEASE COMPACT CACHEDIR::./somecustomcachedir | |
| sb -t --testexcerpts=100 --requirepkg CoreTests | |
| sbenv sb_core_extdeps --require-disabled NCrystal Numpy matplotlib Geant4 ZLib | |
| sb -t --testfilter='sb_coretests_testpycpp' --requirepkg CoreTests | |
| - name: Build-and-test-debug-mode | |
| run: | | |
| mkdir myproj_dbg | |
| cd myproj_dbg | |
| sb --init core_val DEBUG | |
| sb -t --testexcerpts=100 --requirepkg CoreTests | |
| sbenv sb_core_extdeps --require-disabled NCrystal Numpy matplotlib Geant4 ZLib | |
| - name: Verify-ncrystal-linkage | |
| run: | | |
| #This will fail with tool old ncrystal wheels, but should always be | |
| #ok in conda: | |
| cd myproj | |
| conda install --yes ncrystal | |
| sb -t --testexcerpts=100 --requirepkg 'CoreTests,CoreLinkTests' | |
| - name: cppcheck | |
| run: | | |
| cd myproj | |
| conda install --yes cppcheck | |
| sb --exportcmds=cmds.json --requirepkg 'CoreTests,CoreLinkTests' | |
| test -f cmds.json | |
| mkdir ./cppcheck_cache | |
| cppcheck --inline-suppr --project=cmds.json --check-level=exhaustive -j4 --cppcheck-build-dir="$PWD"/cppcheck_cache --suppress='*:'"$CONDA_PREFIX"'/include/*' --error-exitcode=1 |