mirror of
https://github.com/Detanup01/gbe_fork.git
synced 2024-11-30 14:25:36 +08:00
workflows for the migration script
This commit is contained in:
parent
d6643124ae
commit
7c95d41634
73
.github/workflows/build-migrate_gse-linux.yml
vendored
Normal file
73
.github/workflows/build-migrate_gse-linux.yml
vendored
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
name: Migrate GSE script (Linux)
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [
|
||||||
|
"ci-build-migrate-linux*",
|
||||||
|
"ci-build-all"
|
||||||
|
]
|
||||||
|
tags:
|
||||||
|
- release*
|
||||||
|
pull_request:
|
||||||
|
branches: [ "dev" ]
|
||||||
|
workflow_dispatch:
|
||||||
|
# allows manual trigger
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
env:
|
||||||
|
ARTIFACT_NAME: "migrate_gse-linux-${{ github.sha }}"
|
||||||
|
SCRIPT_BASE_DIR: "tools/migrate_gse"
|
||||||
|
PACKAGE_BASE_DIR: "tools/migrate_gse/bin/package/linux"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout branch
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
### fix folder permissions! not sure why this fails
|
||||||
|
# nested subdirs "build/linux/release" cause permission problems
|
||||||
|
- name: Give all permissions for repo folder
|
||||||
|
shell: bash
|
||||||
|
working-directory: ${{ github.workspace }}
|
||||||
|
run: sudo chmod -R 777 "${{ github.workspace }}"
|
||||||
|
|
||||||
|
# deps
|
||||||
|
- name: Install dependencies
|
||||||
|
shell: bash
|
||||||
|
working-directory: "${{ env.SCRIPT_BASE_DIR }}"
|
||||||
|
run: sudo chmod 77 recreate_venv_linux.sh && sudo ./recreate_venv_linux.sh
|
||||||
|
|
||||||
|
# build
|
||||||
|
- name: Rebuild
|
||||||
|
shell: bash
|
||||||
|
working-directory: "${{ env.SCRIPT_BASE_DIR }}"
|
||||||
|
run: sudo chmod 77 rebuild_linux.sh && sudo ./rebuild_linux.sh
|
||||||
|
|
||||||
|
# package
|
||||||
|
- name: Package build
|
||||||
|
shell: bash
|
||||||
|
working-directory: "${{ env.SCRIPT_BASE_DIR }}"
|
||||||
|
run: sudo chmod 77 package_linux.sh && sudo ./package_linux.sh
|
||||||
|
|
||||||
|
# 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
|
||||||
|
|
||||||
|
# release tag
|
||||||
|
- name: Release
|
||||||
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
|
uses: softprops/action-gh-release@v1
|
||||||
|
with:
|
||||||
|
files: "${{ env.PACKAGE_BASE_DIR }}/**/*"
|
||||||
|
|
87
.github/workflows/build-migrate_gse-win.yml
vendored
Normal file
87
.github/workflows/build-migrate_gse-win.yml
vendored
Normal file
@ -0,0 +1,87 @@
|
|||||||
|
name: Migrate GSE script (Windows)
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [
|
||||||
|
"ci-build-migrate-win*",
|
||||||
|
"ci-build-all"
|
||||||
|
]
|
||||||
|
tags:
|
||||||
|
- release*
|
||||||
|
pull_request:
|
||||||
|
branches: [ "dev" ]
|
||||||
|
workflow_dispatch:
|
||||||
|
# allows manual trigger
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
env:
|
||||||
|
ARTIFACT_NAME: "migrate_gse-win-${{ github.sha }}"
|
||||||
|
SCRIPT_BASE_DIR: "tools/migrate_gse"
|
||||||
|
PACKAGE_BASE_DIR: "tools/migrate_gse/bin/package/win"
|
||||||
|
|
||||||
|
THIRD_PARTY_BASE_DIR: 'third-party'
|
||||||
|
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
# package
|
||||||
|
- name: Package build
|
||||||
|
shell: cmd
|
||||||
|
working-directory: "${{ env.SCRIPT_BASE_DIR }}"
|
||||||
|
run: package_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
|
||||||
|
|
||||||
|
# release tag
|
||||||
|
- name: Release
|
||||||
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
|
uses: softprops/action-gh-release@v1
|
||||||
|
with:
|
||||||
|
files: "${{ env.PACKAGE_BASE_DIR }}/**/*"
|
||||||
|
|
13
README.md
13
README.md
@ -331,6 +331,19 @@ The following are special branches, pushing any code to them will trigger the bu
|
|||||||
|
|
||||||
>>>>>>>>> ___
|
>>>>>>>>> ___
|
||||||
|
|
||||||
|
* `ci-build-migrate-linux*`: any branch matching this pattern will trigger the **Linux** build of the script `migrate_gse`
|
||||||
|
Example of a valid branch name:
|
||||||
|
- `ci-build-migrate-linux`
|
||||||
|
- `ci-build-migrate-linux-test1`
|
||||||
|
- `ci-build-migrate-linux_trial`
|
||||||
|
* `ci-build-migrate-win*`: any branch matching this pattern will trigger the **Windows** build of the script `migrate_gse`
|
||||||
|
Example of a valid branch name:
|
||||||
|
- `ci-build-migrate-win`
|
||||||
|
- `ci-build-migrate-win-test1`
|
||||||
|
- `ci-build-migrate-win_trial`
|
||||||
|
|
||||||
|
>>>>>>>>> ___
|
||||||
|
|
||||||
* `ci-build-all`: pushing code to this exact branch will trigger all builds
|
* `ci-build-all`: pushing code to this exact branch will trigger all builds
|
||||||
|
|
||||||
---
|
---
|
||||||
|
Loading…
Reference in New Issue
Block a user