work on self-tests 3; force gil #27
Workflow file for this run
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: run self-tests on Windows | |
| on: | |
| # Runs on pushes targeting the default branch | |
| push: | |
| branches-ignore: | |
| - master | |
| - main | |
| # branches: ['develop'] | |
| # pull_request: | |
| # branches: ['main'] | |
| workflow_dispatch: # Allows running this workflow manually | |
| # Default to bash | |
| #defaults: | |
| # run: | |
| # shell: bash | |
| jobs: | |
| test-G2: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| # python-version: ["3.11", "3.12", "3.13"] | |
| python-version: ["3.13"] | |
| runs-on: 'windows-latest' | |
| steps: | |
| - uses: conda-incubator/setup-miniconda@v3 | |
| with: | |
| auto-update-conda: true | |
| python-version: ${{ matrix.python-version }} | |
| - name: Conda install | |
| shell: bash -el {0} | |
| run: | | |
| # tailor the numpy version to match the GSAS-II binaries | |
| if [ "${{ matrix.python-version }}" == "3.13" ]; then | |
| npver=2.2 | |
| elif [ "${{ matrix.python-version }}" == "3.12" ]; then | |
| npver=2.2 | |
| elif [ "${{ matrix.python-version }}" == "3.11" ]; then | |
| npver=1.26 | |
| fi | |
| conda install python-gil python=${{ matrix.python-version }} numpy=${npver} scipy requests pytest git gitpython -c conda-forge --override-channels --quiet | |
| #conda install --quiet numpy=${npver} requests pytest briantoby::gsas2pkg -c conda-forge | |
| conda info | |
| conda list | |
| - name: GSAS-II install | |
| shell: bash -el {0} | |
| run: | | |
| #mkdir G2 | |
| #cd G2 | |
| curl -L -O https://github.com/AdvancedPhotonSource/GSAS-II-buildtools/raw/main/install/gitstrap.py | |
| python gitstrap.py --nocheck --noshortcut --branch=main | |
| - name: find files | |
| shell: bash -el {0} | |
| run: | | |
| ls -l GSAS-II/GSASII-bin/win_64_p3.13_n2.2 | |
| ls -l GSAS-II/tests | |
| - name: GSAS-II single test | |
| if: always() | |
| shell: bash -el {0} | |
| run: | | |
| cd GSAS-II | |
| python tests/test_elm.py | |
| # python tests/test_spg.py | |
| # - name: GSAS-II all tests | |
| # if: always() | |
| # shell: bash -el {0} | |
| # run: | | |
| # cd GSAS-II | |
| # ls | |
| # python -m pytest | |
| - name: try pyspg | |
| if: always() | |
| shell: bash -el {0} | |
| run: | | |
| cd GSAS-II/GSASII-bin/win_64_p3.13_n2.2 | |
| python -VV | |
| python -v -c "import sys; print(sys.path)" | |
| python -v -c "import pyspg" | |
| - name: try ldd | |
| if: always() | |
| shell: bash -el {0} | |
| run: | | |
| conda create -n ntldd python=3.13 numpy=2.2 m2w64-ntldd-git | |
| conda activate ntldd | |
| cd GSAS-II/GSASII-bin/win_64_p3.13_n2.2 | |
| ls | |
| ntldd *.pyd | |
| python -c "import pyspg" | |
| # #uses: conda-incubator/setup-miniconda@030178870c779d9e5e1b4e563269f3aa69b04081 # v3.0.3 using hash for security | |
| # with: | |
| # #activate-environment: build | |
| # miniforge-version: latest | |
| # auto-activate-base: true | |
| # #python-version: ${{ matrix.python-version }} | |
| # #channels: conda-forge | |
| # - name: config python |