Skip to content

Commit

Permalink
CI: Add windows x86 OpenGL2.0 Workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
dragonflylee committed Nov 30, 2023
1 parent 29d0aa5 commit cf7541f
Showing 1 changed file with 20 additions and 11 deletions.
31 changes: 20 additions & 11 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
VERSION: ${{ env.VERSION }}
run: |
echo "version=${VERSION}" >> $GITHUB_OUTPUT
echo "DIST_EXE=wiliwili-Windows-x64-${VERSION}" >> $GITHUB_OUTPUT
echo "DIST_EXE=wiliwili-Windows-${VERSION}" >> $GITHUB_OUTPUT
echo "DIST_UWP=wiliwili-windows-x64-uwp-${VERSION}" >> $GITHUB_OUTPUT
echo "DIST_NRO=wiliwili-NintendoSwitch-${VERSION}" >> $GITHUB_OUTPUT
echo "DIST_PS4=wiliwili-PS4-${VERSION}" >> $GITHUB_OUTPUT
Expand All @@ -87,7 +87,7 @@ jobs:
release:
needs: [ build-win-x64, build-switch, build-macos, build-flatpak, version ]
needs: [ build-win, build-switch, build-macos, build-flatpak, version ]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
Expand All @@ -108,18 +108,25 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}
allowUpdates: true
artifacts: >
${{ needs.version.outputs.DIST_EXE }}/${{ needs.version.outputs.DIST_EXE }}.7z
${{ needs.version.outputs.DIST_EXE }}-GL3/${{ needs.version.outputs.DIST_EXE }}-x86_64-GL3.7z
${{ needs.version.outputs.DIST_EXE }}-GL2/${{ needs.version.outputs.DIST_EXE }}-i686-GL2.7z
${{ needs.version.outputs.DIST_NRO }}/${{ needs.version.outputs.DIST_NRO }}.tar.gz
${{ needs.version.outputs.DIST_INTEL_DMG }}/${{ needs.version.outputs.DIST_INTEL_DMG }}.dmg
${{ needs.version.outputs.DIST_ARM_DMG }}/${{ needs.version.outputs.DIST_ARM_DMG }}.dmg
${{ needs.version.outputs.DIST_UNIVERSAL_DMG }}/${{ needs.version.outputs.DIST_UNIVERSAL_DMG }}.dmg
${{ needs.version.outputs.DIST_FLATPAK_X86_64 }}/${{ needs.version.outputs.DIST_FLATPAK_X86_64 }}.flatpak
build-win-x64:
build-win:
needs: [ version ]
runs-on: windows-2019
strategy:
fail-fast: false
matrix:
include:
- { msystem: MINGW64, driver: GL3 }
- { msystem: MINGW32, driver: GL2 }
env:
MSYSTEM: MINGW64
MSYSTEM: ${{ matrix.msystem }}
MSYS2_PATH_TYPE: inherit
defaults:
run:
Expand All @@ -144,8 +151,8 @@ jobs:
cmake -P ${BRLS_GLFW}/CMake/GenerateMappings.cmake ${BRLS_GLFW}/src/mappings.h.in ${BRLS_GLFW}/src/mappings.h
- name: Build dependency
run: |
curl -sL https://github.com/webmproject/libwebp/archive/v1.3.1.tar.gz | tar zxf - -C /tmp
cd /tmp/libwebp-1.3.1
curl -sL https://github.com/webmproject/libwebp/archive/v1.3.2.tar.gz | tar zxf - -C /tmp
cd /tmp/libwebp-1.3.2
cmake -B build -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \
Expand All @@ -167,6 +174,7 @@ jobs:
cmake -B build -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DPLATFORM_DESKTOP=ON \
-DUSE_${{ matrix.driver }}=ON \
-DWIN32_TERMINAL=OFF \
-DCURL_DISABLE_PROGRESS_METER=ON \
-DUSE_LIBIDN2=OFF \
Expand All @@ -178,13 +186,14 @@ jobs:
cd build
strip wiliwili.exe
7z a -mx=9 ../${{ needs.version.outputs.DIST_EXE }}.7z wiliwili.exe resources ${MINGW_PREFIX}/bin/libmpv-2.dll
7z a -mx=9 ../${{ needs.version.outputs.DIST_EXE }}-${MSYSTEM_CARCH}-${{ matrix.driver }}.7z \
wiliwili.exe resources ${MINGW_PREFIX}/bin/libmpv-2.dll
- name: Upload dist
uses: actions/upload-artifact@v3
with:
name: ${{ needs.version.outputs.DIST_EXE }}
path: "${{ needs.version.outputs.DIST_EXE }}.7z"
name: ${{ needs.version.outputs.DIST_EXE }}-${{ matrix.driver }}
path: "${{ needs.version.outputs.DIST_EXE }}-*.7z"

build-win-uwp:
needs: [ version ]
Expand All @@ -201,7 +210,7 @@ jobs:
- name: Cache xmake packages
uses: actions/cache@v3
with:
key: ${{ runner.os }}-build
key: ${{ runner.os }}-xmake
path: |
${{ runner.temp }}/.xmake/packages
- name: build
Expand Down

0 comments on commit cf7541f

Please sign in to comment.