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*
|
2024-05-03 22:28:44 +02:00
|
|
|
paths-ignore:
|
|
|
|
- '**/*.md'
|
2024-05-06 19:14:03 +03:00
|
|
|
- 'dev.notes/**'
|
|
|
|
- 'post_build/**'
|
|
|
|
- 'z_original_repo_files/**'
|
|
|
|
|
2023-12-16 17:35:56 +02:00
|
|
|
pull_request:
|
|
|
|
branches: [ "dev" ]
|
2024-05-03 22:28:44 +02:00
|
|
|
paths-ignore:
|
|
|
|
- '**/*.md'
|
2024-05-06 19:14:03 +03:00
|
|
|
- 'dev.notes/**'
|
|
|
|
- 'post_build/**'
|
|
|
|
- 'z_original_repo_files/**'
|
|
|
|
|
2023-12-17 01:58:52 +02:00
|
|
|
workflow_dispatch:
|
2023-12-20 15:07:01 +02:00
|
|
|
# allows manual trigger
|
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 }}"
|
2023-12-28 02:15:39 +02:00
|
|
|
SCRIPT_BASE_DIR: "tools/generate_emu_config"
|
|
|
|
PACKAGE_BASE_DIR: "tools/generate_emu_config/bin/package/win"
|
2023-12-17 01:58:52 +02:00
|
|
|
|
|
|
|
THIRD_PARTY_BASE_DIR: 'third-party'
|
2023-12-26 02:14:37 +02:00
|
|
|
|
2023-12-16 07:20:05 +02:00
|
|
|
|
|
|
|
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
|
2023-12-16 07:20:05 +02:00
|
|
|
with:
|
|
|
|
python-version: "3.10"
|
|
|
|
|
2023-12-16 07:25:21 +02:00
|
|
|
- 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
|
2023-12-17 01:58:52 +02:00
|
|
|
- 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"
|
|
|
|
|
2023-12-31 19:54:03 +02:00
|
|
|
- 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
|
2023-12-16 07:20:05 +02:00
|
|
|
- name: Install dependencies
|
|
|
|
shell: cmd
|
2023-12-26 02:14:37 +02:00
|
|
|
working-directory: "${{ env.SCRIPT_BASE_DIR }}"
|
2023-12-16 09:55:36 +02:00
|
|
|
run: recreate_venv_win.bat
|
2023-12-16 07:20:05 +02:00
|
|
|
|
2023-12-31 19:53:11 +02:00
|
|
|
# build
|
2023-12-16 07:20:05 +02:00
|
|
|
- name: Rebuild
|
|
|
|
shell: cmd
|
2023-12-26 02:14:37 +02:00
|
|
|
working-directory: "${{ env.SCRIPT_BASE_DIR }}"
|
2023-12-16 09:55:36 +02:00
|
|
|
run: rebuild_win.bat
|
2023-12-16 07:20:05 +02:00
|
|
|
|
2023-12-31 19:53:11 +02:00
|
|
|
# package
|
2023-12-17 01:58:52 +02:00
|
|
|
- name: Package build
|
|
|
|
shell: cmd
|
2023-12-26 02:14:37 +02:00
|
|
|
working-directory: "${{ env.SCRIPT_BASE_DIR }}"
|
2023-12-17 01:58:52 +02:00
|
|
|
run: package_win.bat
|
|
|
|
|
2023-12-31 19:53:11 +02:00
|
|
|
# upload artifact
|
2023-12-17 01:58:52 +02:00
|
|
|
- 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 }}"
|
2023-12-28 02:15:39 +02:00
|
|
|
path: "${{ env.PACKAGE_BASE_DIR }}/"
|
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
|
|
|
|
2023-12-31 19:53:11 +02:00
|
|
|
# release tag
|
2023-12-17 01:58:52 +02:00
|
|
|
- name: Release
|
|
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
|
|
uses: softprops/action-gh-release@v1
|
|
|
|
with:
|
2023-12-26 02:14:37 +02:00
|
|
|
files: "${{ env.PACKAGE_BASE_DIR }}/**/*"
|
2023-12-16 07:20:05 +02:00
|
|
|
|