melonDS/.github/workflows/build-windows.yml
Nadia Holmquist Pedersen 94b33c924e
Modernize CMake build system (#1434)
These changes modernize the CMake build system to (hopefully) match newer best practices

* Library linking is simpler and more automatic because of using imported targets
* Multi-configuration builds should be supported (Ninja Multi-Config, Visual Studio, etc. generators)
* Clean up build options using cmake_dependent_option
* Let CMake do its job in more cases, like finding the math/dl libraries and detecting and enabling LTO support
* Remove platform-specific kludges like the Fedora/flatpak LTO workaround and a bunch of Windows stuff
* Simplify Windows static builds
* Consistent formatting
2022-05-21 19:54:55 +02:00

48 lines
1.1 KiB
YAML

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 -DCMAKE_PREFIX_PATH=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