gbe_fork/.github/workflows/build-gen_emu_config-win.yml

99 lines
2.2 KiB
YAML
Raw Normal View History

2023-12-16 17:50:30 +02:00
name: Generate emu config script (Windows)
on:
push:
branches: [
"ci-build-gen-win*",
"ci-build-all"
]
tags:
- release*
paths-ignore:
- '**/*.md'
- 'dev.notes/**'
- 'post_build/**'
- 'z_original_repo_files/**'
pull_request:
branches: [ "dev" ]
paths-ignore:
- '**/*.md'
- 'dev.notes/**'
- 'post_build/**'
- 'z_original_repo_files/**'
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/package/win"
THIRD_PARTY_BASE_DIR: 'third-party'
jobs:
build:
runs-on: windows-2022
steps:
- name: Set up Python 3.10
2024-04-14 21:09:32 +02:00
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Checkout branch
uses: actions/checkout@v4
2023-12-31 19:53:11 +02:00
## 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"
2023-12-31 19:53:11 +02:00
# deps
- name: Install dependencies
shell: cmd
working-directory: "${{ env.SCRIPT_BASE_DIR }}"
run: recreate_venv_win.bat
2023-12-31 19:53:11 +02:00
# build
- name: Rebuild
shell: cmd
working-directory: "${{ env.SCRIPT_BASE_DIR }}"
run: rebuild_win.bat
2023-12-31 19:53:11 +02:00
# package
- name: Package build
shell: cmd
working-directory: "${{ env.SCRIPT_BASE_DIR }}"
run: package_win.bat
2023-12-31 19:53:11 +02:00
# 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
2023-12-31 19:53:11 +02:00
# release tag
- name: Release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v1
with:
files: "${{ env.PACKAGE_BASE_DIR }}/**/*"