Build gen_emu_config_old script (Windows) #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Build gen_emu_config_old 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: "gen_emu_config_old-win-${{ github.sha }}" | |
SCRIPT_BASE_DIR: "generate_emu_config_old" | |
PACKAGE_BASE_DIR: "generate_emu_config_old/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 | |
# 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 |