diff --git a/.github/workflows/build-win-2.yml b/.github/workflows/build-win-2.yml index 85643072..505daf39 100644 --- a/.github/workflows/build-win-2.yml +++ b/.github/workflows/build-win-2.yml @@ -20,7 +20,7 @@ on: build architecture, unused when 'emu-variant' == 'all' or 'emu-variant' == 'tools' true: x32 false: x64 - default: false + default: true required: false type: boolean @@ -62,14 +62,16 @@ jobs: - name: Setup build vars shell: cmd run: | - echo env file = "${{ GITHUB_ENV }}" + echo env file = "%GITHUB_ENV%" + echo workspace = "${{ github.workspace }}" + set "build_mode=" if /i "${{ inputs.debug }}"=="true" ( - set "build_switches=%build_switches% debug" - >>"${{ GITHUB_ENV }}" echo build_mode=debug + set "build_mode=debug" ) else ( - >>"${{ GITHUB_ENV }}" echo build_mode=release + set "build_mode=release" ) + >>"%GITHUB_ENV%" echo build_mode=%build_mode% set "arch=" if /i "${{ inputs.x32 }}"=="true" ( @@ -77,6 +79,7 @@ jobs: ) else ( set "arch=64" ) + >>"%GITHUB_ENV%" echo build_arch=%arch% set "build_switches=" if "${{ inputs.emu-variant }}"=="regular" ( @@ -95,7 +98,7 @@ jobs: ) echo final build switches %build_switches% - >>"${{ GITHUB_ENV }}" echo build_switches=%build_switches% + >>"%GITHUB_ENV%" echo build_switches=%build_switches% ### on Windows Git will auto change line ending to CRLF, not preferable - name: Ensure LF line ending @@ -168,11 +171,11 @@ jobs: package_win.bat release || exit /b %errorlevel% package_win.bat debug || exit /b %errorlevel% -### upload artifact/package to github Actions (release mode) +### upload artifact/package to github Actions - name: Upload build package uses: actions/upload-artifact@v4 with: - name: "build-win-release-${{ github.sha }}" + name: "win-${{ inputs.emu-variant }}-${{ env.build_arch }}-${{ env.build_mode }}-${{ github.sha }}" path: "${{ env.PACKAGE_BASE_DIR }}/" if-no-files-found: 'error' compression-level: 9 diff --git a/.github/workflows/deps-win.yml b/.github/workflows/deps-win.yml index ccd287b6..f24a9253 100644 --- a/.github/workflows/deps-win.yml +++ b/.github/workflows/deps-win.yml @@ -18,7 +18,7 @@ env: jobs: # this helps in manual runs, if build fails, then deps are saved - build: + deps-build: runs-on: windows-2022 if: ${{ !cancelled() }} steps: diff --git a/.github/workflows/pull-request-win.yml b/.github/workflows/pull-request-win.yml new file mode 100644 index 00000000..0fff2292 --- /dev/null +++ b/.github/workflows/pull-request-win.yml @@ -0,0 +1,151 @@ +name: Emu pull request (Windows) + +on: + pull_request: + branches: [ "dev" ] + paths-ignore: + - '**/*.md' + - 'dev.notes/**' + - 'post_build/**' + - 'z_original_repo_files/**' + - 'sdk/*.txt' + - 'LICENSE' + # tools + - 'tools/generate_emu_config/**' + - 'tools/migrate_gse/**' + - 'tools/steamclient_loader/linux/**' + + workflow_dispatch: + # allows manual trigger + +permissions: + contents: write + +jobs: + emu-regular-x32-release: + name: Regular x32 (release) + if: ${{ !cancelled() }} + uses: ./.github/workflows/build-win-2.yml + with: + emu-variant: regular + x32: true + debug: false + + emu-regular-x32-debug: + name: Regular x32 (debug) + if: ${{ !cancelled() }} + uses: ./.github/workflows/build-win-2.yml + with: + emu-variant: regular + x32: true + debug: true + + emu-exp-x32-release: + name: Experimental x32 (release) + if: ${{ !cancelled() }} + uses: ./.github/workflows/build-win-2.yml + with: + emu-variant: exp + x32: true + debug: false + + emu-exp-x32-debug: + name: Experimental x32 (debug) + if: ${{ !cancelled() }} + uses: ./.github/workflows/build-win-2.yml + with: + emu-variant: exp + x32: true + debug: true + + emu-client-x32-release: + name: Client x32 (release) + if: ${{ !cancelled() }} + uses: ./.github/workflows/build-win-2.yml + with: + emu-variant: client + x32: true + debug: false + + emu-client-x32-debug: + name: Client x32 (debug) + if: ${{ !cancelled() }} + uses: ./.github/workflows/build-win-2.yml + with: + emu-variant: client + x32: true + debug: true + + + + emu-regular-x64-release: + name: Regular x64 (release) + if: ${{ !cancelled() }} + uses: ./.github/workflows/build-win-2.yml + with: + emu-variant: regular + x32: false + debug: false + + emu-regular-x64-debug: + name: Regular x64 (debug) + if: ${{ !cancelled() }} + uses: ./.github/workflows/build-win-2.yml + with: + emu-variant: regular + x32: false + debug: true + + emu-exp-x64-release: + name: Experimental x64 (release) + if: ${{ !cancelled() }} + uses: ./.github/workflows/build-win-2.yml + with: + emu-variant: exp + x32: false + debug: false + + emu-exp-x64-debug: + name: Experimental x64 (debug) + if: ${{ !cancelled() }} + uses: ./.github/workflows/build-win-2.yml + with: + emu-variant: exp + x32: false + debug: true + + emu-client-x64-release: + name: Client x64 (release) + if: ${{ !cancelled() }} + uses: ./.github/workflows/build-win-2.yml + with: + emu-variant: client + x32: false + debug: false + + emu-client-x64-debug: + name: Client x64 (debug) + if: ${{ !cancelled() }} + uses: ./.github/workflows/build-win-2.yml + with: + emu-variant: client + x32: false + debug: true + + + + tools-release: + name: Tools (release) + if: ${{ !cancelled() }} + uses: ./.github/workflows/build-win-2.yml + with: + emu-variant: tools + debug: false + + tools-debug: + name: Tools (debug) + if: ${{ !cancelled() }} + uses: ./.github/workflows/build-win-2.yml + with: + emu-variant: tools + debug: true