2023-12-16 17:50:30 +02:00
|
|
|
name: Generate emu config script (Windows)
|
2023-12-16 07:20:05 +02:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2023-12-16 17:35:56 +02:00
|
|
|
branches: [
|
2023-12-17 01:58:52 +02:00
|
|
|
"ci-build-gen-win*",
|
2023-12-16 17:35:56 +02:00
|
|
|
"ci-build-all"
|
|
|
|
]
|
2023-12-17 01:58:52 +02:00
|
|
|
tags:
|
|
|
|
- release*
|
2023-12-16 17:35:56 +02:00
|
|
|
pull_request:
|
|
|
|
branches: [ "dev" ]
|
2023-12-17 01:58:52 +02:00
|
|
|
workflow_dispatch:
|
|
|
|
# nothing
|
2023-12-16 07:20:05 +02:00
|
|
|
|
|
|
|
permissions:
|
2023-12-17 01:58:52 +02:00
|
|
|
contents: write
|
|
|
|
|
|
|
|
env:
|
|
|
|
ARTIFACT_NAME: "generate_emu_config-win-${{ github.sha }}"
|
|
|
|
ARTIFACT_ROOT_PATH: "scripts/bin/win"
|
|
|
|
PACKAGE_ROOT_PATH: "scripts/bin/package"
|
|
|
|
|
|
|
|
# Expected format {owner}/{repo}.
|
|
|
|
DEPS_REPO: 'otavepto/gbe_fork'
|
|
|
|
THIRD_PARTY_BASE_DIR: 'third-party'
|
2023-12-16 07:20:05 +02:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: windows-2022
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Set up Python 3.10
|
|
|
|
uses: actions/setup-python@v3
|
|
|
|
with:
|
|
|
|
python-version: "3.10"
|
|
|
|
|
2023-12-16 07:25:21 +02:00
|
|
|
- name: Checkout branch
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
|
2023-12-17 01:58:52 +02:00
|
|
|
- name: Clone third-party deps (deps/win)
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
with:
|
|
|
|
repository: "${{env.DEPS_REPO}}"
|
|
|
|
ref: 'third-party/deps/win'
|
|
|
|
path: "${{env.THIRD_PARTY_BASE_DIR}}/deps/win"
|
|
|
|
|
2023-12-16 07:20:05 +02:00
|
|
|
- name: Install dependencies
|
|
|
|
shell: cmd
|
2023-12-16 07:25:21 +02:00
|
|
|
working-directory: ${{ github.workspace }}/scripts
|
2023-12-16 09:55:36 +02:00
|
|
|
run: recreate_venv_win.bat
|
2023-12-16 07:20:05 +02:00
|
|
|
|
|
|
|
- name: Rebuild
|
|
|
|
shell: cmd
|
2023-12-16 07:25:21 +02:00
|
|
|
working-directory: ${{ github.workspace }}/scripts
|
2023-12-16 09:55:36 +02:00
|
|
|
run: rebuild_win.bat
|
2023-12-16 07:20:05 +02:00
|
|
|
|
2023-12-17 01:58:52 +02:00
|
|
|
- name: Package build
|
|
|
|
shell: cmd
|
|
|
|
working-directory: ${{ github.workspace }}/scripts
|
|
|
|
run: package_win.bat
|
|
|
|
|
|
|
|
- name: Upload build package
|
2023-12-16 07:20:05 +02:00
|
|
|
uses: actions/upload-artifact@v4
|
|
|
|
with:
|
2023-12-17 01:58:52 +02:00
|
|
|
name: "${{ env.ARTIFACT_NAME }}"
|
|
|
|
path: "${{ env.PACKAGE_ROOT_PATH }}/win/"
|
2023-12-16 07:20:05 +02:00
|
|
|
if-no-files-found: 'error'
|
|
|
|
compression-level: 9
|
2023-12-16 17:35:20 +02:00
|
|
|
retention-days: 1
|
2023-12-17 01:58:52 +02:00
|
|
|
|
|
|
|
- name: Release
|
|
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
|
|
uses: softprops/action-gh-release@v1
|
|
|
|
with:
|
|
|
|
files: "${{ env.PACKAGE_ROOT_PATH }}/**/*"
|
2023-12-16 07:20:05 +02:00
|
|
|
|