summaryrefslogtreecommitdiff
path: root/.github/workflows/nmake.yml
blob: cf1989866e4ccbf0ffa9001dd8bfcaae7bc5a77b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: CI NMake
on: [push, pull_request]
jobs:
  ci-cmake:
    name: ${{ matrix.name }}
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        include:
          - name: Windows NMake x86
            os: windows-latest
            makefile: win32/Makefile.msc
            vc-vars: x86

          - name: Windows NMake x64
            os: windows-latest
            makefile: win32/Makefile.msc
            vc-vars: x86_amd64

          - name: Windows NMake ARM No Test
            os: windows-latest
            makefile: win32/Makefile.arm
            vc-vars: x86_arm

          - name: Windows NMake ARM64 No Test
            os: windows-latest
            makefile: win32/Makefile.a64
            vc-vars: x86_arm64

    steps:
    - name: Checkout repository
      uses: actions/checkout@v2

    - name: Compile source code
      shell: cmd
      run: |
        call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" ${{ matrix.vc-vars }}
        nmake -f ${{ matrix.makefile }}

    - name: Run test cases
      shell: cmd
      # Don't run tests on Windows ARM
      if: contains(matrix.vc-vars, 'arm') == false
      run: |
        call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" ${{ matrix.vc-vars }}
        nmake -f ${{ matrix.makefile }} test
        nmake -f ${{ matrix.makefile }} testdll