gse/.github/workflows/gen_emu_config-build-win.yml
alex47exe 6c5819b3f0 release workflow improvements
- added bat scripts to automatically pack latest steam_api dlss and tools for generate_emu_config and migrate_gse
- removed previous steam_api dlls and 7z archives from generate_emu_config and migrate_gse
- removed previous generate_interfaces and lobby_connect 7z archives from generate_emu_config and migrate_gse
- moved some default required files for generate_emu_config from _DEFAULT\1 to _DEFAULT\0 folder, thus eliminating the need to duplicate them for every other default configuration folder you might create (_DEFAULT\2 - _DEFAULT\5)
2024-10-07 15:56:41 +01:00

84 lines
2.3 KiB
YAML

name: "Build gen_emu_config script (Windows)"
on:
workflow_call:
# needed since it allows this to become a reusable workflow
workflow_dispatch:
# allows manual trigger
permissions:
contents: "write"
env:
ARTIFACT_NAME: "generate_emu_config-win-${{ github.sha }}"
SCRIPT_BASE_DIR: "tools/generate_emu_config"
PACKAGE_BASE_DIR: "tools/generate_emu_config/bin/win"
THIRD_PARTY_BASE_DIR: "third-party"
jobs:
build:
runs-on: "windows-2022"
steps:
- name: "Set up Python"
uses: actions/setup-python@v5
with:
python-version: "3.12"
### on Windows Git will auto change line ending to CRLF, not preferable
- name: "Ensure LF line ending"
shell: "cmd"
working-directory: "${{ github.workspace }}"
run: |
git config --local core.autocrlf false
git config --system core.autocrlf false
git config --global core.autocrlf false
- name: "Checkout branch"
uses: actions/checkout@v4
## extra helpers/tools, these are not built inside the deps build dir
- name: "Clone third-party deps (build/win)"
uses: actions/checkout@v4
with:
ref: "third-party/build/win"
path: "${{env.THIRD_PARTY_BASE_DIR}}/build/win"
## clone this for 7za.exe
- name: "Clone third-party deps (deps/win)"
uses: actions/checkout@v4
with:
ref: "third-party/deps/win"
path: "${{env.THIRD_PARTY_BASE_DIR}}/deps/win"
# download artifacts
- name: "Download emu build artifacts (Win)"
uses: actions/download-artifact@v4
with:
path: "build/win"
pattern: "emu-win-*"
merge-multiple: true
# env
- name: "Install env"
shell: "cmd"
working-directory: "${{ env.SCRIPT_BASE_DIR }}"
run: recreate_venv_win.bat
# build
- name: "Rebuild"
shell: "cmd"
working-directory: "${{ env.SCRIPT_BASE_DIR }}"
run: rebuild_win.bat
# upload artifact
- name: "Upload build package"
uses: actions/upload-artifact@v4
with:
name: "${{ env.ARTIFACT_NAME }}"
path: "${{ env.PACKAGE_BASE_DIR }}/"
if-no-files-found: "error"
compression-level: 9
retention-days: 1