|
| 1 | +name: debug self-tests on Windows w/3.11 |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_dispatch: # Allows running this workflow manually |
| 5 | + # Runs on pushes targeting the default branch |
| 6 | +# push: |
| 7 | +# branches-ignore: |
| 8 | +# - master |
| 9 | + # branches: ['main'] |
| 10 | +# pull_request: |
| 11 | +# branches: ['main'] |
| 12 | + |
| 13 | + |
| 14 | +jobs: |
| 15 | + test-GSAS-II: |
| 16 | + strategy: |
| 17 | + fail-fast: false |
| 18 | + matrix: |
| 19 | +# python-version: ["3.11", "3.12", "3.13"] |
| 20 | + python-version: ["3.11"] |
| 21 | +# python-version: ["3.12"] |
| 22 | + runs-on: 'windows-latest' |
| 23 | + steps: |
| 24 | + - uses: conda-incubator/setup-miniconda@v3 |
| 25 | + with: |
| 26 | + auto-update-conda: true |
| 27 | + python-version: ${{ matrix.python-version }} |
| 28 | + - name: Conda install |
| 29 | + shell: bash -el {0} |
| 30 | + run: | |
| 31 | + # tailor the numpy version to match the GSAS-II binaries |
| 32 | + if [ "${{ matrix.python-version }}" == "3.13" ]; then |
| 33 | + npver="2.2 python-gil" |
| 34 | + elif [ "${{ matrix.python-version }}" == "3.12" ]; then |
| 35 | + npver=2.2 |
| 36 | + elif [ "${{ matrix.python-version }}" == "3.11" ]; then |
| 37 | + npver=1.26 |
| 38 | + fi |
| 39 | + #conda list |
| 40 | + #conda info |
| 41 | + conda install python=${{ matrix.python-version }} numpy=${npver} scipy requests pytest git gitpython pycifrw -c conda-forge --override-channels --quiet |
| 42 | + #conda install --quiet numpy=${npver} requests pytest briantoby::gsas2pkg -c conda-forge |
| 43 | + conda info |
| 44 | + conda list |
| 45 | + - name: GSAS-II install |
| 46 | + shell: bash -el {0} |
| 47 | + run: | |
| 48 | + #mkdir G2 |
| 49 | + #cd G2 |
| 50 | + curl -L -O https://github.com/AdvancedPhotonSource/GSAS-II-buildtools/raw/main/install/gitstrap.py |
| 51 | + python gitstrap.py --nocheck --noshortcut --branch=main |
| 52 | +
|
| 53 | + - name: find files |
| 54 | + shell: bash -el {0} |
| 55 | + run: | |
| 56 | + ls -l GSAS-II/GSASII-bin/win_64_p3.11_n1.26 |
| 57 | + #ls -l GSAS-II/GSASII-bin/win_64_p3.12_n2.2 |
| 58 | + ls -l GSAS-II/tests |
| 59 | +
|
| 60 | + - name: GSAS-II single test |
| 61 | + if: always() |
| 62 | + shell: bash -el {0} |
| 63 | + run: | |
| 64 | + cd GSAS-II |
| 65 | + python tests/test_elm.py |
| 66 | + python tests/test_spg.py |
| 67 | +
|
| 68 | + # - name: GSAS-II all tests |
| 69 | + # if: always() |
| 70 | + # shell: bash -el {0} |
| 71 | + # run: | |
| 72 | + # cd GSAS-II |
| 73 | + # ls |
| 74 | + # python -m pytest |
| 75 | + |
| 76 | + - name: try pyspg |
| 77 | + if: always() |
| 78 | + shell: bash -el {0} |
| 79 | + run: | |
| 80 | + cd GSAS-II/GSASII-bin/win_64_p3.11_n1.26 |
| 81 | + #cd GSAS-II/GSASII-bin/win_64_p3.12_n2.2 |
| 82 | + python -VV |
| 83 | + python -c "import sys; print(sys.path)" |
| 84 | + python -c "import pyspg" |
| 85 | +
|
| 86 | + - name: try ldd |
| 87 | + if: always() |
| 88 | + shell: bash -el {0} |
| 89 | + run: | |
| 90 | + #conda create -n ntldd python=3.12 numpy=2.2 m2w64-ntldd-git |
| 91 | + conda create -n ntldd python=3.11 numpy=1.26 m2w64-ntldd-git |
| 92 | + conda activate ntldd |
| 93 | + cd GSAS-II/GSASII-bin/win_64_p3.11_n1.26 |
| 94 | + #cd GSAS-II/GSASII-bin/win_64_p3.12_n2.2 |
| 95 | + ls |
| 96 | + ntldd *.pyd |
| 97 | + python -c "import sys; sys.path.insert(0,'.'); import pyspg" |
0 commit comments