|
| 1 | +# This workflow will install compilers and packges on windows platform |
| 2 | + |
| 3 | +name: windows package |
| 4 | + |
| 5 | +on: |
| 6 | + release: |
| 7 | + types: [published] |
| 8 | + |
| 9 | +jobs: |
| 10 | + windows_package: |
| 11 | + runs-on: windows-2019 |
| 12 | + defaults: |
| 13 | + run: |
| 14 | + shell: bash -l {0} |
| 15 | + strategy: |
| 16 | + matrix: |
| 17 | + python-version: ["3.6","3.7", "3.8"] |
| 18 | + steps: |
| 19 | + - uses: actions/checkout@v2 |
| 20 | + - uses: conda-incubator/setup-miniconda@v2 |
| 21 | + with: |
| 22 | + auto-update-conda: true |
| 23 | + python-version: ${{ matrix.python-version }} |
| 24 | + - shell: bash -l {0} |
| 25 | + run: | |
| 26 | + export COMPILER_PATH=/c/Miniconda/envs/test/Library/mingw-w64/bin/ |
| 27 | + export CLIMT_OPT_FLAGS=-fno-asynchronous-unwind-tables |
| 28 | + conda activate test |
| 29 | + which python |
| 30 | + conda install -c msys2 m2w64-gcc m2w64-gcc-fortran m2w64-winpthreads-git m2w64-openblas |
| 31 | + conda install libpython |
| 32 | + which gcc |
| 33 | + which gfortran |
| 34 | + cp $COMPILER_PATH/x86_64-w64-mingw32-gcc-ar.exe $COMPILER_PATH/x86_64-w64-mingw32-ar.exe |
| 35 | + printf '[build]\r\ncompiler=mingw32\r\n' > $HOME/pydistutils.cfg |
| 36 | + ls $HOME; cat $HOME/pydistutils.cfg |
| 37 | + python -m pip install -r requirements_dev.txt |
| 38 | + touch libmsvcr140.dll |
| 39 | + cp /c/Miniconda/envs/test/Library/bin/vcruntime140.dll /c/Miniconda/envs/test/Library/bin/msvcr140.dll |
| 40 | + ls -l |
| 41 | + python setup.py develop |
| 42 | + py.test -v |
| 43 | +
|
| 44 | + - if: ${{ matrix.python-version == '3.6' }} |
| 45 | + run: | |
| 46 | + export COMPILER_PATH=/c/Miniconda/envs/test/Library/mingw-w64/bin/ |
| 47 | + python setup.py sdist |
| 48 | + |
| 49 | + - if: ${{ github.event_name == 'release' }} |
| 50 | + env: |
| 51 | + TWINE_USERNAME: __token__ |
| 52 | + TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }} |
| 53 | + run: | |
| 54 | + export COMPILER_PATH=/c/Miniconda/envs/test/Library/mingw-w64/bin/ |
| 55 | + export CLIMT_OPT_FLAGS=-fno-asynchronous-unwind-tables |
| 56 | + python setup.py bdist_wheel |
| 57 | + python -m pip install twine |
| 58 | + twine upload dist/* |
0 commit comments