melonDS/.github/workflows/build-windows.yml

44 lines
1.5 KiB
YAML
Raw Normal View History

2019-12-12 13:44:34 -07:00
name: CMake Build (Windows x86-64)
2020-03-21 16:35:43 -06:00
on:
push:
branches:
- master
pull_request:
branches:
- master
2019-12-12 13:44:34 -07:00
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
2019-12-12 13:44:34 -07:00
C:\tools\msys64\usr\bin\bash.exe -lc "pacman -Syuq --noconfirm"
- name: Install dependencies
2020-07-26 13:43:01 -06:00
run: C:\tools\msys64\usr\bin\bash.exe -lc "pacman -Sq --noconfirm git make mingw-w64-x86_64-{cmake,mesa,SDL2,qt5-static,libslirp,toolchain}"
2019-12-12 13:44:34 -07:00
- 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`" \
2020-05-29 14:00:31 -06:00
&& 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"
2019-12-12 13:44:34 -07:00
- name: Make
run: |
C:\tools\msys64\usr\bin\bash.exe -lc "export PATH=`"/mingw64/bin:`$PATH`" \
&& cd melonDS/build && make -j$(nproc --all)"
2019-12-12 20:06:57 -07:00
- uses: actions/upload-artifact@v1
with:
name: melonDS
path: C:\tools\msys64\home\runneradmin\melonDS\build\melonDS.exe