Update re3_msvc_x86.yml

This commit is contained in:
Dima353
2025-07-09 18:57:41 +03:00
committed by GitHub
parent 932ca6e14b
commit 5a0701abf5
+61 -45
View File
@@ -1,67 +1,83 @@
name: re3 premake x86 name: re3 premake x86 build
on: on:
pull_request: pull_request:
push: push:
branches: [ main ]
release: release:
types: published types: [published]
env: env:
GLFW_VER: "3.3.2" GLFW_VER: "3.3.2"
GLFW_BASE: "glfw-3.3.2.bin.WIN32" GLFW_BASE: "glfw-3.3.2.bin.WIN32"
GLFW_FILE: "glfw-3.3.2.bin.WIN32.zip" GLFW_FILE: "glfw-3.3.2.bin.WIN32.zip"
GLFW_URL: "https://github.com/glfw/glfw/releases/download/3.3.2/glfw-3.3.2.bin.WIN32.zip" GLFW_URL: "https://github.com/glfw/glfw/releases/download/3.3.2/glfw-3.3.2.bin.WIN32.zip"
jobs: jobs:
build: build:
runs-on: windows-2019 runs-on: windows-2019
strategy: strategy:
matrix: matrix:
platform: [win-x86-librw_d3d9-mss, win-x86-librw_gl3_glfw-mss, win-x86-librw_d3d9-oal, win-x86-librw_gl3_glfw-oal] platform:
- win-x86-librw_d3d9-mss
- win-x86-librw_gl3_glfw-mss
- win-x86-librw_d3d9-oal
- win-x86-librw_gl3_glfw-oal
buildtype: [Debug, Release, Vanilla] buildtype: [Debug, Release, Vanilla]
fail-fast: false
steps: steps:
- name: Add msbuild to PATH - name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v1.0.2 uses: microsoft/setup-msbuild@v1.0.2
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with: with:
submodules: 'true' submodules: recursive
- if: ${{ matrix.platform }} == "win-x86-librw_gl3_glfw-mss"
name: Download glfw - name: Download GLFW
if: contains(matrix.platform, 'librw_gl3_glfw')
uses: carlosperate/download-file-action@v1.0.3 uses: carlosperate/download-file-action@v1.0.3
with: with:
file-url: ${{env.GLFW_URL}} file-url: ${{ env.GLFW_URL }}
- if: ${{ matrix.platform }} == "win-x86-librw_gl3_glfw-mss" file-name: ${{ env.GLFW_FILE }}
name: Unpack archives
run: | - name: Extract GLFW
7z x ${{env.GLFW_FILE}} if: contains(matrix.platform, 'librw_gl3_glfw')
- name: Configure build shell: pwsh
run: | run: |
./premake5 vs2019 --with-librw --no-full-paths --glfwdir32=${{env.GLFW_BASE}} Expand-Archive -Path "${{ env.GLFW_FILE }}" -DestinationPath "${{ env.GLFW_BASE }}"
- name: Build
run: | - name: Configure build
msbuild -m build/re3.sln /property:Configuration=${{matrix.buildtype}} /property:Platform=${{matrix.platform}} shell: cmd
# - name: Pack artifacts run: |
# run: | premake5 vs2019 --with-librw --no-full-paths --glfwdir32="${{ env.GLFW_BASE }}"
# 7z a re3_${{matrix.buildtype}}_${{matrix.platform}}.zip ./bin/${{matrix.platform}}/${{matrix.buildtype}}/*
- name: Move binaries to gamefiles - name: Build
run: | shell: cmd
mv ./bin/${{matrix.platform}}/${{matrix.buildtype}}/re3.exe ./gamefiles/ run: |
mv ./bin/${{matrix.platform}}/${{matrix.buildtype}}/re3.pdb ./gamefiles/ msbuild -m -p:Configuration=${{ matrix.buildtype }} -p:Platform=${{ matrix.platform }} build/re3.sln
- if: contains(matrix.platform, 'oal')
name: Move dynamic dependencies to gamefiles - name: Create gamefiles directory
run: | shell: pwsh
mv ./vendor/mpg123/dist/Win32/libmpg123-0.dll ./gamefiles/ run: |
mv ./vendor/openal-soft/dist/Win32/OpenAL32.dll ./gamefiles/ New-Item -ItemType Directory -Path "gamefiles" -Force
- name: Upload artifact to actions
uses: actions/upload-artifact@v2 - name: Copy binaries
with: shell: pwsh
name: re3_${{matrix.buildtype}}_${{matrix.platform}} run: |
path: ./gamefiles/* Move-Item -Path "bin/${{ matrix.platform }}/${{ matrix.buildtype }}/re3.exe" -Destination "gamefiles/" -Force
# - name: Upload artifact to Bintray Move-Item -Path "bin/${{ matrix.platform }}/${{ matrix.buildtype }}/re3.pdb" -Destination "gamefiles/" -Force
# uses: hpcsc/upload-bintray-docker-action@v1
# with: - name: Copy OAL dependencies
# repository: re3 if: contains(matrix.platform, 'oal')
# package: ${{matrix.buildtype}}_${{matrix.platform}} shell: pwsh
# version: 1.0-$(echo ${GITHUB_SHA} run: |
# sourcePath: ./bin/${{matrix.platform}}/${{matrix.buildtype}} Move-Item -Path "vendor/mpg123/dist/Win32/libmpg123-0.dll" -Destination "gamefiles/" -Force
# username: gtamodding Move-Item -Path "vendor/openal-soft/dist/Win32/OpenAL32.dll" -Destination "gamefiles/" -Force
# apiKey: ${{secrets.BINTRAY_API_KEY}}
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: re3_${{ matrix.buildtype }}_${{ matrix.platform }}
path: gamefiles/*