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

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

env:
  BUILD_TYPE: Release

jobs:
  build:

    runs-on: windows-latest

    steps:
    - uses: actions/checkout@v1
    - name: Install MSYS2
      working-directory: ${{runner.workspace}}
      run: | # Fetch MSYS2 build from XQEmu. Official distribution causes a CI failure due to permission errors.
        choco install msys2
        C:\tools\msys64\usr\bin\bash.exe -lc "pacman -Syuq --noconfirm"
    - name: Install dependencies
      run: C:\tools\msys64\usr\bin\bash.exe -lc "pacman -Sq --noconfirm git make mingw-w64-x86_64-{cmake,mesa,SDL2,qt5-static,libslirp,libzip,toolchain}"
    - name: Create build environment
      run: |
        New-Item -ItemType directory -Path ${{runner.workspace}}\melonDS\build
        Copy-Item -Path ${{runner.workspace}}\melonDS -Destination C:\tools\msys64\home\runneradmin -Recurse
    - name: Configure
      run: |
        C:\tools\msys64\usr\bin\bash.exe -lc "export PATH=`"/mingw64/bin:`$PATH`" \
        && cd melonDS/build && cmake .. -G 'MSYS Makefiles' -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_STATIC=ON -DQT5_STATIC_DIR=C:/tools/msys64/mingw64/qt5-static"
    - name: Make
      run: |
        C:\tools\msys64\usr\bin\bash.exe -lc "export PATH=`"/mingw64/bin:`$PATH`" \
        && cd melonDS/build && make -j$(nproc --all)"
    - uses: actions/upload-artifact@v1
      with:
        name: melonDS
        path: C:\tools\msys64\home\runneradmin\melonDS\build\melonDS.exe