gbe_fork/.github/workflows/gen_emu_config-build-win.yml
2024-05-11 17:38:32 +03:00

64 lines
1.6 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"
jobs:
build:
runs-on: windows-2022
steps:
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Checkout branch
uses: actions/checkout@v4
## extra helpers/tools, these are not built inside the deps build dir
- 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"
- 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"
# deps
- name: Install dependencies
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