mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-25 15:19:53 -06:00
Use setup-msys2 GitHub Action (#1029)
* Use setup-msys2 GitHub Action This makes the Windows CI a few minutes faster
This commit is contained in:
36
.github/workflows/build-windows.yml
vendored
36
.github/workflows/build-windows.yml
vendored
@ -16,28 +16,32 @@ jobs:
|
|||||||
|
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
|
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: msys2 {0}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
- name: Install MSYS2
|
- uses: msys2/setup-msys2@v2
|
||||||
working-directory: ${{runner.workspace}}
|
with:
|
||||||
run: | # Fetch MSYS2 build from XQEmu. Official distribution causes a CI failure due to permission errors.
|
msystem: MINGW64
|
||||||
choco install msys2
|
update: true
|
||||||
C:\tools\msys64\usr\bin\bash.exe -lc "pacman -Syuq --noconfirm"
|
|
||||||
- name: Install dependencies
|
- 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,libarchive,libepoxy,toolchain}"
|
run: pacman -Sq --noconfirm git make mingw-w64-x86_64-{cmake,mesa,SDL2,qt5-static,libslirp,libarchive,libepoxy,toolchain}
|
||||||
|
|
||||||
- name: Create build environment
|
- name: Create build environment
|
||||||
run: |
|
working-directory: ${{runner.workspace}}
|
||||||
New-Item -ItemType directory -Path ${{runner.workspace}}\melonDS\build
|
run: mkdir build
|
||||||
Copy-Item -Path ${{runner.workspace}}\melonDS -Destination C:\tools\msys64\home\runneradmin -Recurse
|
|
||||||
- name: Configure
|
- name: Configure
|
||||||
run: |
|
working-directory: ${{runner.workspace}}/build
|
||||||
C:\tools\msys64\usr\bin\bash.exe -lc "export PATH=`"/mingw64/bin:`$PATH`" \
|
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
|
||||||
&& 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
|
- name: Make
|
||||||
run: |
|
working-directory: ${{runner.workspace}}/build
|
||||||
C:\tools\msys64\usr\bin\bash.exe -lc "export PATH=`"/mingw64/bin:`$PATH`" \
|
run: make -j$(nproc --all)
|
||||||
&& cd melonDS/build && make -j$(nproc --all)"
|
|
||||||
- uses: actions/upload-artifact@v1
|
- uses: actions/upload-artifact@v1
|
||||||
with:
|
with:
|
||||||
name: melonDS
|
name: melonDS
|
||||||
path: C:\tools\msys64\home\runneradmin\melonDS\build\melonDS.exe
|
path: ${{runner.workspace}}\build\melonDS.exe
|
||||||
|
Reference in New Issue
Block a user