aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/build-windows.yml
blob: a4026a7b8a368181798bc73f71525db9a62e9910 (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
name: CMake Build (Windows x86-64)

on:
  push:
    branches:
      - master
  pull_request:
    branches:
      - master

env:
  BUILD_TYPE: Release

jobs:
  build:

    runs-on: windows-latest
    
    defaults:
      run:
        shell: msys2 {0}
    steps:
    - uses: actions/checkout@v1
    - uses: msys2/setup-msys2@v2
      with:
          msystem: MINGW64
          update: true

    - name: Install dependencies
      run: pacman -Sq --noconfirm git make mingw-w64-x86_64-{cmake,mesa,SDL2,qt5-static,libslirp,libarchive,libepoxy,toolchain}
  
    - name: Create build environment
      working-directory: ${{runner.workspace}}
      run: mkdir build

    - name: Configure
      working-directory: ${{runner.workspace}}/build
      run: cmake $GITHUB_WORKSPACE -G 'MSYS Makefiles' -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_STATIC=ON -DQT5_STATIC_DIR=C:/tools/msys64/mingw64/qt5-static

    - name: Make
      working-directory: ${{runner.workspace}}/build
      run: make -j$(nproc --all)

    - uses: actions/upload-artifact@v1
      with:
        name: melonDS-windows-x86_64
        path: ${{runner.workspace}}\build\melonDS.exe