summaryrefslogtreecommitdiffstatshomepage
path: root/.github/workflows/ci-windows.yml
blob: aa90a612829103624a125336c3558700b97a40ee (plain) (blame)
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: CI (Windows)

on:
  push:
    paths:
    - '.github/**'
    - '3rdparty/**'
    - 'scripts/**'
    - 'src/**'
    - 'COPYING'
    - 'makefile'
  pull_request:
    paths:
    - '.github/**'
    - '3rdparty/**'
    - 'scripts/**'
    - 'src/**'
    - 'COPYING'
    - 'makefile'

permissions:
  contents: read

jobs:

  build-windows:
    runs-on: windows-latest
    defaults:
      run:
        shell: msys2 {0}
    strategy:
      matrix:
        compiler: [gcc, clang]
        include:
          - compiler: gcc
            cc: gcc
            cxx: g++
            subtarget: mame
            executable: mame
          - compiler: clang
            cc: clang
            cxx: clang++
            subtarget: tiny
            executable: mametiny
    steps:
    - uses: msys2/setup-msys2@v2
      with:
        install: git make mingw-w64-x86_64-${{ matrix.compiler }} mingw-w64-x86_64-python mingw-w64-x86_64-lld mingw-w64-x86_64-libc++
    - uses: actions/checkout@master
    - name: Build
      env:
        MINGW64: "/mingw64"
        OVERRIDE_AR: "llvm-ar"
        OVERRIDE_CC: ${{ matrix.cc }}
        OVERRIDE_CXX: ${{ matrix.cxx }}
        ARCHOPTS: "-fuse-ld=lld"
        SUBTARGET: ${{ matrix.subtarget }}
        TOOLS: 1
      run: make -j2
    - name: Validate
      run: ./${{ matrix.executable }}.exe -validate
    - uses: actions/upload-artifact@master
      with:
        name: ${{ matrix.executable }}-windows-${{ matrix.compiler }}-${{ github.sha }}
        path: |
          ${{ matrix.executable }}.exe
          chdman.exe
          unidasm.exe