diff --git a/.github/workflows/gen_emu_config-build-win.yml b/.github/workflows/gen_emu_config-build-win.yml index 5bdeb10e..ea77ed5e 100644 --- a/.github/workflows/gen_emu_config-build-win.yml +++ b/.github/workflows/gen_emu_config-build-win.yml @@ -36,8 +36,8 @@ jobs: ref: 'third-party/build/win' path: "${{env.THIRD_PARTY_BASE_DIR}}/build/win" -# deps - - name: Install dependencies +# env + - name: Install env shell: cmd working-directory: "${{ env.SCRIPT_BASE_DIR }}" run: recreate_venv_win.bat diff --git a/.github/workflows/gen_emu_config-pull-request.yml b/.github/workflows/gen_emu_config-pull-request.yml index 531eb977..3ef80fa6 100644 --- a/.github/workflows/gen_emu_config-pull-request.yml +++ b/.github/workflows/gen_emu_config-pull-request.yml @@ -1,4 +1,4 @@ -name: Emu pull request +name: Gen emu config pull request on: pull_request: diff --git a/.github/workflows/build-migrate_gse-linux.yml b/.github/workflows/migrate_gse-build-linux.yml similarity index 58% rename from .github/workflows/build-migrate_gse-linux.yml rename to .github/workflows/migrate_gse-build-linux.yml index 60d62d79..57f3686c 100644 --- a/.github/workflows/build-migrate_gse-linux.yml +++ b/.github/workflows/migrate_gse-build-linux.yml @@ -1,20 +1,8 @@ -name: Migrate GSE script (Linux) +name: Build migrate_gse script (Linux) on: - push: - branches: [ - "ci-build-migrate-linux*", - "ci-build-all" - ] - tags: - - release* - - pull_request: - branches: [ "dev" ] - paths: - - '!**/*.md' - - 'tools/migrate_gse/**' - + workflow_call: + # needed since it allows this to become a reusable workflow workflow_dispatch: # allows manual trigger @@ -24,7 +12,7 @@ permissions: env: ARTIFACT_NAME: "migrate_gse-linux-${{ github.sha }}" SCRIPT_BASE_DIR: "tools/migrate_gse" - PACKAGE_BASE_DIR: "tools/migrate_gse/bin/package/linux" + PACKAGE_BASE_DIR: "tools/migrate_gse/bin/linux" jobs: build: @@ -41,8 +29,8 @@ jobs: working-directory: ${{ github.workspace }} run: sudo chmod -R 777 "${{ github.workspace }}" -# deps - - name: Install dependencies +# env + - name: Install env shell: bash working-directory: "${{ env.SCRIPT_BASE_DIR }}" run: sudo chmod 777 recreate_venv_linux.sh && sudo ./recreate_venv_linux.sh @@ -51,13 +39,7 @@ jobs: - name: Rebuild shell: bash working-directory: "${{ env.SCRIPT_BASE_DIR }}" - run: sudo chmod 777 rebuild_linux.sh && sudo ./rebuild_linux.sh - -# package - - name: Package build - shell: bash - working-directory: "${{ env.SCRIPT_BASE_DIR }}" - run: sudo chmod 777 package_linux.sh && sudo ./package_linux.sh + run: sudo chmod 777 rebuild_linux.sh && ./rebuild_linux.sh # upload artifact - name: Upload build package @@ -68,11 +50,3 @@ jobs: 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 }}/**/*" - \ No newline at end of file diff --git a/.github/workflows/build-migrate_gse-win.yml b/.github/workflows/migrate_gse-build-win.yml similarity index 58% rename from .github/workflows/build-migrate_gse-win.yml rename to .github/workflows/migrate_gse-build-win.yml index e6de1d40..a9869a5a 100644 --- a/.github/workflows/build-migrate_gse-win.yml +++ b/.github/workflows/migrate_gse-build-win.yml @@ -1,20 +1,8 @@ -name: Migrate GSE script (Windows) +name: Build migrate_gse script (Windows) on: - push: - branches: [ - "ci-build-migrate-win*", - "ci-build-all" - ] - tags: - - release* - - pull_request: - branches: [ "dev" ] - paths: - - '!**/*.md' - - 'tools/migrate_gse/**' - + workflow_call: + # needed since it allows this to become a reusable workflow workflow_dispatch: # allows manual trigger @@ -24,11 +12,10 @@ permissions: env: ARTIFACT_NAME: "migrate_gse-win-${{ github.sha }}" SCRIPT_BASE_DIR: "tools/migrate_gse" - PACKAGE_BASE_DIR: "tools/migrate_gse/bin/package/win" + PACKAGE_BASE_DIR: "tools/migrate_gse/bin/win" THIRD_PARTY_BASE_DIR: 'third-party' - jobs: build: runs-on: windows-2022 @@ -43,20 +30,14 @@ jobs: 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 +# env + - name: Install env shell: cmd working-directory: "${{ env.SCRIPT_BASE_DIR }}" run: recreate_venv_win.bat @@ -67,12 +48,6 @@ jobs: 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 @@ -82,11 +57,3 @@ jobs: 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 }}/**/*" - \ No newline at end of file diff --git a/.github/workflows/migrate_gse-pull-request.yml b/.github/workflows/migrate_gse-pull-request.yml new file mode 100644 index 00000000..cbdfa7ee --- /dev/null +++ b/.github/workflows/migrate_gse-pull-request.yml @@ -0,0 +1,22 @@ +name: Migrate GSE pull request + +on: + pull_request: + branches: [ "dev" ] + paths: + - '!**/*.md' + - 'tools/migrate_gse/**' + +permissions: + contents: write + +jobs: + script-win: + name: Migrate GSE win + if: ${{ !cancelled() }} + uses: ./.github/workflows/migrate_gse-build-win.yml + + script-linux: + name: Migrate GSE linux + if: ${{ !cancelled() }} + uses: ./.github/workflows/migrate_gse-build-linux.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 63808317..fd5aff5f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,11 +20,6 @@ jobs: if: ${{ !cancelled() }} 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: needs: [ emu-win-all ] runs-on: windows-2022 @@ -95,6 +90,11 @@ jobs: compression-level: 9 retention-days: 1 + gen_emu_script-win: + name: Gen emu config win + if: ${{ !cancelled() }} + uses: ./.github/workflows/gen_emu_config-build-win.yml + gen_emu_script-win-prep: needs: [ gen_emu_script-win ] runs-on: windows-2022