瀏覽代碼

Merge pull request #240 from JuliaMath/vs/msys

Update ci.yml for Windows and msys2
Viral B. Shah 4 年之前
父節點
當前提交
6ea5fa2408
共有 1 個文件被更改,包括 28 次插入8 次删除
  1. 28 8
      .github/workflows/ci.yml

+ 28 - 8
.github/workflows/ci.yml

@@ -8,7 +8,6 @@ on:
 
 jobs:
   build:
-
     runs-on: ${{ matrix.os }}
     strategy:
       fail-fast: false
@@ -19,13 +18,34 @@ jobs:
           - windows-latest
         arch:
           - x64
-          - x32
+          - x86
           - armv7
           - aarch64
-          
+        exclude:
+          - os: windows-latest
+            arch: aarch64
+          - os: windows-latest
+            arch: armv7
+          - os: windows-latest
+            arch: x86
+          - os: macos-latest
+            arch: armv7
+          - os: macos-latest
+            arch: x86
+            
     steps:
-    - uses: actions/checkout@v2
-    - name: make
-      run: make
-    - name: make test
-      run: make test
+      - uses: actions/checkout@v2
+      - name: Install i686-w64-mingw32-gcc
+        if: ${{ matrix.os == 'windows-latest' && matrix.arch == 'x86' }}
+        shell: bash
+        run: |
+          choco install mingw -y --x86 --force --params "/exception:sjlj"
+          choco install make -y
+          echo "CC=i686-w64-mingw32-gcc" >> "${GITHUB_ENV}"
+      - name: Set compiler for 64-bit Windows
+        if: ${{ matrix.os == 'windows-latest' && matrix.arch == 'x64' }}
+        shell: bash
+        run: |
+          echo "CC=x86_64-w64-mingw32-gcc" >> "${GITHUB_ENV}"
+      - name: Build and run tests
+        run: make && make test