|
1 | | -# This is a basic workflow to help you get started with Actions |
2 | | - |
3 | 1 | name: Windows build |
4 | 2 |
|
5 | 3 | defaults: |
@@ -31,59 +29,43 @@ jobs: |
31 | 29 |
|
32 | 30 | steps: |
33 | 31 | - uses: actions/checkout@v2 |
34 | | - - uses: ilammy/msvc-dev-cmd@v1 |
| 32 | + - name: install-rtools |
| 33 | + run: | |
| 34 | + choco install rtools --no-progress |
| 35 | + - name: show-gfortran |
| 36 | + run: | |
| 37 | + gcc --version |
| 38 | + gfortran --version |
35 | 39 |
|
36 | | - - name: Setup |
| 40 | + - name: Set env variables |
37 | 41 | run: | |
38 | 42 | BITS=${{ matrix.BUILD_BITS }} |
39 | 43 | echo "BUILD_BITS=$BITS" >> $GITHUB_ENV; |
| 44 | + # For interpretation of MSYSTEM, see: |
| 45 | + # https://sourceforge.net/p/msys2/discussion/general/thread/b7dfdac8/#3939 |
40 | 46 | if [ "$BITS" == "32" ]; then |
41 | | - echo "PLAT=i686" >> $GITHUB_ENV; |
| 47 | + echo "PLAT=i686" >> $GITHUB_ENV |
| 48 | + echo "MSYSTEM=MINGW32" >> $GITHUB_ENV |
| 49 | + echo "LDFLAGS='-static -static-libgcc'" >> $GITHUB_ENV |
42 | 50 | else |
43 | | - echo "PLAT=x86_64" >> $GITHUB_ENV; |
| 51 | + echo "PLAT=x86_64" >> $GITHUB_ENV |
| 52 | + echo "MSYSTEM=UCRT64" >> $GITHUB_ENV |
| 53 | + echo "LDFLAGS='-lucrt -static -static-libgcc'" >> $GITHUB_ENV |
44 | 54 | fi |
45 | | - echo "START_DIR=$PWD" >> $GITHUB_ENV; |
46 | | - choco install -y zip |
47 | | -
|
48 | | - - run: | |
49 | | - choco install -y mingw --forcex86 --force --version=8.1.0 |
50 | | - choco install -y make |
51 | | - name: Install 32-bit mingw |
52 | | - shell: powershell |
53 | | - if: ${{ matrix.BUILD_BITS == '32' }} |
54 | | -
|
55 | | - - run: | |
56 | | - # see https://www.mail-archive.com/[email protected]/msg586184.html |
57 | | - if [ "${{ matrix.BUILD_BITS }}" == "64" ]; then |
58 | | - include=/c/ProgramData/Chocolatey/lib/mingw/tools/install/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/avx512fintrin.h |
59 | | - else |
60 | | - include=/c/ProgramData/Chocolatey/lib/mingw/tools/install/mingw32/lib/gcc/i686-w64-mingw32/8.1.0/include/avx512fintrin.h |
| 55 | + echo "START_DIR=$PWD" >> $GITHUB_ENV |
| 56 | + if [ "${{ matrix.INTERFACE64 }}" == "1" ]; then |
| 57 | + echo "INTERFACE64=1" >> $GITHUB_ENV |
61 | 58 | fi |
62 | | - sed -i -e"s/_mm512_abs_pd (__m512 __A)/_mm512_abs_pd (__m512d __A)/" $include |
63 | | - name: Fix gcc bug |
| 59 | + # Preserve the current working directory in bash call. |
| 60 | + echo "CHERE_INVOKING='yes'" >> $GITHUB_ENV |
64 | 61 |
|
65 | 62 | - name: Build |
66 | 63 | run: | |
67 | | - BITS=${{ matrix.BUILD_BITS }} |
68 | | - if [ "${{ matrix.INTERFACE64 }}" == "1" ]; then |
69 | | - export INTERFACE64=1 |
70 | | - fi |
71 | | - if [ "$BITS" == "32" ]; then |
72 | | - export PATH=/c/ProgramData/chocolatey/lib/mingw/tools/install/mingw32/bin:$PATH |
73 | | - fi |
74 | | - echo $PATH |
75 | 64 | git submodule update --init --recursive |
76 | | - tools/build_openblas.sh |
| 65 | + /c/rtools40/usr/bin/bash -lc tools/build_openblas.sh |
77 | 66 |
|
78 | 67 | - name: Test |
79 | 68 | run: | |
80 | | - BITS=${{ matrix.BUILD_BITS }} |
81 | | - if [ "$BITS" == "32" ]; then |
82 | | - export PATH=/c/ProgramData/chocolatey/lib/mingw/tools/install/mingw32/bin:$PATH |
83 | | - fi |
84 | | - if [ "${{ matrix.INTERFACE64 }}" == "1" ]; then |
85 | | - export INTERFACE64=1 |
86 | | - fi |
87 | 69 | tools/build_gfortran.sh |
88 | 70 | cp test.exe builds |
89 | 71 | cp test_dyn.exe builds |
|
0 commit comments