mirror of
https://github.com/Detanup01/gbe_fork.git
synced 2024-11-23 19:25:35 +08:00
scripts for gen_emu_config_tool
This commit is contained in:
parent
470003f926
commit
d14a726d75
@ -36,7 +36,7 @@ jobs:
|
|||||||
|
|
||||||
### fix folder permissions! not sure why this fails
|
### fix folder permissions! not sure why this fails
|
||||||
# nested subdirs "build/linux/release" cause permission problems
|
# nested subdirs "build/linux/release" cause permission problems
|
||||||
- name: Give all permissions for repo folder
|
- name: Give all permissions to repo folder
|
||||||
shell: bash
|
shell: bash
|
||||||
working-directory: ${{ github.workspace }}
|
working-directory: ${{ github.workspace }}
|
||||||
run: sudo chmod -R 777 "${{ github.workspace }}"
|
run: sudo chmod -R 777 "${{ github.workspace }}"
|
||||||
|
@ -105,7 +105,7 @@ jobs:
|
|||||||
|
|
||||||
### fix folder permissions! not sure why this fails
|
### fix folder permissions! not sure why this fails
|
||||||
# nested subdirs "build/linux/release" cause permission problems
|
# nested subdirs "build/linux/release" cause permission problems
|
||||||
- name: Give all permissions for repo folder
|
- name: Give all permissions to repo folder
|
||||||
shell: bash
|
shell: bash
|
||||||
working-directory: ${{ github.workspace }}
|
working-directory: ${{ github.workspace }}
|
||||||
run: sudo chmod -R 777 "${{ github.workspace }}"
|
run: sudo chmod -R 777 "${{ github.workspace }}"
|
||||||
|
2
.github/workflows/emu-deps-linux.yml
vendored
2
.github/workflows/emu-deps-linux.yml
vendored
@ -50,7 +50,7 @@ jobs:
|
|||||||
|
|
||||||
### fix folder permissions! not sure why this fails
|
### fix folder permissions! not sure why this fails
|
||||||
# nested subdirs "build/linux/release" cause permission problems
|
# nested subdirs "build/linux/release" cause permission problems
|
||||||
- name: Give all permissions for repo folder
|
- name: Give all permissions to repo folder
|
||||||
if: steps.emu-deps-cache-step.outputs.cache-hit != 'true'
|
if: steps.emu-deps-cache-step.outputs.cache-hit != 'true'
|
||||||
shell: bash
|
shell: bash
|
||||||
working-directory: ${{ github.workspace }}
|
working-directory: ${{ github.workspace }}
|
||||||
|
@ -1,20 +1,8 @@
|
|||||||
name: Generate emu config script (Linux)
|
name: Build gen_emu_config script (Linux)
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
workflow_call:
|
||||||
branches: [
|
# needed since it allows this to become a reusable workflow
|
||||||
"ci-build-gen-linux*",
|
|
||||||
"ci-build-all"
|
|
||||||
]
|
|
||||||
tags:
|
|
||||||
- release*
|
|
||||||
|
|
||||||
pull_request:
|
|
||||||
branches: [ "dev" ]
|
|
||||||
paths:
|
|
||||||
- '!**/*.md'
|
|
||||||
- 'tools/generate_emu_config/**'
|
|
||||||
|
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
# allows manual trigger
|
# allows manual trigger
|
||||||
|
|
||||||
@ -24,7 +12,7 @@ permissions:
|
|||||||
env:
|
env:
|
||||||
ARTIFACT_NAME: "generate_emu_config-linux-${{ github.sha }}"
|
ARTIFACT_NAME: "generate_emu_config-linux-${{ github.sha }}"
|
||||||
SCRIPT_BASE_DIR: "tools/generate_emu_config"
|
SCRIPT_BASE_DIR: "tools/generate_emu_config"
|
||||||
PACKAGE_BASE_DIR: "tools/generate_emu_config/bin/package/linux"
|
PACKAGE_BASE_DIR: "tools/generate_emu_config/bin/linux"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@ -36,13 +24,13 @@ jobs:
|
|||||||
|
|
||||||
### fix folder permissions! not sure why this fails
|
### fix folder permissions! not sure why this fails
|
||||||
# nested subdirs "build/linux/release" cause permission problems
|
# nested subdirs "build/linux/release" cause permission problems
|
||||||
- name: Give all permissions for repo folder
|
- name: Give all permissions to repo folder
|
||||||
shell: bash
|
shell: bash
|
||||||
working-directory: ${{ github.workspace }}
|
working-directory: ${{ github.workspace }}
|
||||||
run: sudo chmod -R 777 "${{ github.workspace }}"
|
run: sudo chmod -R 777 "${{ github.workspace }}"
|
||||||
|
|
||||||
# deps
|
# env
|
||||||
- name: Install dependencies
|
- name: Install env
|
||||||
shell: bash
|
shell: bash
|
||||||
working-directory: "${{ env.SCRIPT_BASE_DIR }}"
|
working-directory: "${{ env.SCRIPT_BASE_DIR }}"
|
||||||
run: sudo chmod 77 recreate_venv_linux.sh && sudo ./recreate_venv_linux.sh
|
run: sudo chmod 77 recreate_venv_linux.sh && sudo ./recreate_venv_linux.sh
|
||||||
@ -51,13 +39,7 @@ jobs:
|
|||||||
- name: Rebuild
|
- name: Rebuild
|
||||||
shell: bash
|
shell: bash
|
||||||
working-directory: "${{ env.SCRIPT_BASE_DIR }}"
|
working-directory: "${{ env.SCRIPT_BASE_DIR }}"
|
||||||
run: sudo chmod 77 rebuild_linux.sh && sudo ./rebuild_linux.sh
|
run: sudo chmod 77 rebuild_linux.sh && ./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
|
# upload artifact
|
||||||
- name: Upload build package
|
- name: Upload build package
|
||||||
@ -68,11 +50,3 @@ jobs:
|
|||||||
if-no-files-found: 'error'
|
if-no-files-found: 'error'
|
||||||
compression-level: 9
|
compression-level: 9
|
||||||
retention-days: 1
|
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 }}/**/*"
|
|
||||||
|
|
@ -1,20 +1,8 @@
|
|||||||
name: Generate emu config script (Windows)
|
name: Build gen_emu_config script (Windows)
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
workflow_call:
|
||||||
branches: [
|
# needed since it allows this to become a reusable workflow
|
||||||
"ci-build-gen-win*",
|
|
||||||
"ci-build-all"
|
|
||||||
]
|
|
||||||
tags:
|
|
||||||
- release*
|
|
||||||
|
|
||||||
pull_request:
|
|
||||||
branches: [ "dev" ]
|
|
||||||
paths:
|
|
||||||
- '!**/*.md'
|
|
||||||
- 'tools/generate_emu_config/**'
|
|
||||||
|
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
# allows manual trigger
|
# allows manual trigger
|
||||||
|
|
||||||
@ -24,10 +12,7 @@ permissions:
|
|||||||
env:
|
env:
|
||||||
ARTIFACT_NAME: "generate_emu_config-win-${{ github.sha }}"
|
ARTIFACT_NAME: "generate_emu_config-win-${{ github.sha }}"
|
||||||
SCRIPT_BASE_DIR: "tools/generate_emu_config"
|
SCRIPT_BASE_DIR: "tools/generate_emu_config"
|
||||||
PACKAGE_BASE_DIR: "tools/generate_emu_config/bin/package/win"
|
PACKAGE_BASE_DIR: "tools/generate_emu_config/bin/win"
|
||||||
|
|
||||||
THIRD_PARTY_BASE_DIR: 'third-party'
|
|
||||||
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@ -67,12 +52,6 @@ jobs:
|
|||||||
working-directory: "${{ env.SCRIPT_BASE_DIR }}"
|
working-directory: "${{ env.SCRIPT_BASE_DIR }}"
|
||||||
run: rebuild_win.bat
|
run: rebuild_win.bat
|
||||||
|
|
||||||
# package
|
|
||||||
- name: Package build
|
|
||||||
shell: cmd
|
|
||||||
working-directory: "${{ env.SCRIPT_BASE_DIR }}"
|
|
||||||
run: package_win.bat
|
|
||||||
|
|
||||||
# upload artifact
|
# upload artifact
|
||||||
- name: Upload build package
|
- name: Upload build package
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
@ -82,11 +61,3 @@ jobs:
|
|||||||
if-no-files-found: 'error'
|
if-no-files-found: 'error'
|
||||||
compression-level: 9
|
compression-level: 9
|
||||||
retention-days: 1
|
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 }}/**/*"
|
|
||||||
|
|
22
.github/workflows/gen_emu_config-pull-request.yml
vendored
Normal file
22
.github/workflows/gen_emu_config-pull-request.yml
vendored
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
name: Emu pull request
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches: [ "dev" ]
|
||||||
|
paths:
|
||||||
|
- '!**/*.md'
|
||||||
|
- 'tools/generate_emu_config/**'
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
script-win:
|
||||||
|
name: Gen emu config win
|
||||||
|
if: ${{ !cancelled() }}
|
||||||
|
uses: ./.github/workflows/gen_emu_config-build-win.yml
|
||||||
|
|
||||||
|
script-linux:
|
||||||
|
name: Gen emu config linux
|
||||||
|
if: ${{ !cancelled() }}
|
||||||
|
uses: ./.github/workflows/gen_emu_config-build-linux.yml
|
75
.github/workflows/release.yml
vendored
75
.github/workflows/release.yml
vendored
@ -12,7 +12,6 @@ permissions:
|
|||||||
contents: write
|
contents: write
|
||||||
|
|
||||||
env:
|
env:
|
||||||
PACKAGE_BASE_DIR: "build/package/win"
|
|
||||||
THIRD_PARTY_BASE_DIR: 'third-party'
|
THIRD_PARTY_BASE_DIR: 'third-party'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@ -21,7 +20,11 @@ jobs:
|
|||||||
if: ${{ !cancelled() }}
|
if: ${{ !cancelled() }}
|
||||||
uses: ./.github/workflows/emu-build-all-win.yml
|
uses: ./.github/workflows/emu-build-all-win.yml
|
||||||
|
|
||||||
|
gen_emu_script-win:
|
||||||
|
name: Gen emu config win
|
||||||
|
if: ${{ !cancelled() }}
|
||||||
|
uses: ./.github/workflows/gen_emu_config-build-win.yml
|
||||||
|
|
||||||
emu-win-prep:
|
emu-win-prep:
|
||||||
needs: [ emu-win-all ]
|
needs: [ emu-win-all ]
|
||||||
runs-on: windows-2022
|
runs-on: windows-2022
|
||||||
@ -37,21 +40,21 @@ jobs:
|
|||||||
|
|
||||||
# we need branch because it has package scripts
|
# we need branch because it has package scripts
|
||||||
- name: Checkout branch
|
- name: Checkout branch
|
||||||
if: steps.emu-deps-cache-step.outputs.cache-hit != 'true'
|
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Clone third-party deps (deps/win)
|
- name: Clone third-party deps (deps/win)
|
||||||
if: steps.emu-deps-cache-step.outputs.cache-hit != 'true'
|
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
ref: 'third-party/deps/win'
|
ref: 'third-party/deps/win'
|
||||||
path: "${{env.THIRD_PARTY_BASE_DIR}}/deps/win"
|
path: "${{env.THIRD_PARTY_BASE_DIR}}/deps/win"
|
||||||
|
|
||||||
|
## donwload artifacts
|
||||||
- name: Download emu build artifacts (Win)
|
- name: Download emu build artifacts (Win)
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
# name: "emu-win-release"
|
# name: "emu-win-release"
|
||||||
path: build/prep
|
path: build/prep
|
||||||
|
pattern: emu-*
|
||||||
merge-multiple: true
|
merge-multiple: true
|
||||||
|
|
||||||
- name: Extract all build artifacts (Win)
|
- name: Extract all build artifacts (Win)
|
||||||
@ -70,8 +73,8 @@ jobs:
|
|||||||
- name: Upload build package (release)
|
- name: Upload build package (release)
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: "build-win-release-${{ github.sha }}"
|
name: "build-win-release"
|
||||||
path: "${{ env.PACKAGE_BASE_DIR }}/release/"
|
path: "build/package/win/release/"
|
||||||
if-no-files-found: 'error'
|
if-no-files-found: 'error'
|
||||||
compression-level: 9
|
compression-level: 9
|
||||||
retention-days: 1
|
retention-days: 1
|
||||||
@ -86,12 +89,68 @@ jobs:
|
|||||||
- name: Upload build package (debug)
|
- name: Upload build package (debug)
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: "build-win-debug-${{ github.sha }}"
|
name: "build-win-debug"
|
||||||
path: "${{ env.PACKAGE_BASE_DIR }}/debug/"
|
path: "build/package/win/debug/"
|
||||||
if-no-files-found: 'error'
|
if-no-files-found: 'error'
|
||||||
compression-level: 9
|
compression-level: 9
|
||||||
retention-days: 1
|
retention-days: 1
|
||||||
|
|
||||||
|
gen_emu_script-win-prep:
|
||||||
|
needs: [ gen_emu_script-win ]
|
||||||
|
runs-on: windows-2022
|
||||||
|
steps:
|
||||||
|
# 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
|
||||||
|
|
||||||
|
# we need branch because it has package scripts
|
||||||
|
- name: Checkout branch
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- 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"
|
||||||
|
|
||||||
|
## donwload artifacts
|
||||||
|
- name: Download gen_emu_script build artifacts (Win)
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
# name: "emu-win-release"
|
||||||
|
path: build/prep
|
||||||
|
pattern: generate_emu_config-*
|
||||||
|
merge-multiple: true
|
||||||
|
|
||||||
|
- name: Extract all build artifacts (Win)
|
||||||
|
shell: cmd
|
||||||
|
working-directory: ${{ github.workspace }}
|
||||||
|
run: |
|
||||||
|
"${{env.THIRD_PARTY_BASE_DIR}}\deps\win\7za\7za.exe" x "build\prep\*.zip" -aos -o"tools\generate_emu_config\bin\win"
|
||||||
|
|
||||||
|
### package
|
||||||
|
- name: Package generate_emu_config
|
||||||
|
shell: cmd
|
||||||
|
working-directory: "tools/generate_emu_config"
|
||||||
|
run: package_win.bat
|
||||||
|
|
||||||
|
### upload artifact/package to github Actions
|
||||||
|
- name: Upload generate_emu_config package (release)
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: "generate_emu_config-win"
|
||||||
|
path: "generate_emu_config/bin/package/"
|
||||||
|
if-no-files-found: 'error'
|
||||||
|
compression-level: 9
|
||||||
|
retention-days: 1
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# ### release (debug + release modes)
|
# ### release (debug + release modes)
|
||||||
# - name: Release
|
# - name: Release
|
||||||
# uses: softprops/action-gh-release@v1
|
# uses: softprops/action-gh-release@v1
|
||||||
|
Loading…
Reference in New Issue
Block a user