diff options
| author | 3gg <3gg@shellblade.net> | 2025-12-27 12:03:39 -0800 |
|---|---|---|
| committer | 3gg <3gg@shellblade.net> | 2025-12-27 12:03:39 -0800 |
| commit | 5a079a2d114f96d4847d1ee305d5b7c16eeec50e (patch) | |
| tree | 8926ab44f168acf787d8e19608857b3af0f82758 /contrib/SDL-3.2.8/.github/actions/setup-gdk-desktop/action.yml | |
Initial commit
Diffstat (limited to 'contrib/SDL-3.2.8/.github/actions/setup-gdk-desktop/action.yml')
| -rw-r--r-- | contrib/SDL-3.2.8/.github/actions/setup-gdk-desktop/action.yml | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/contrib/SDL-3.2.8/.github/actions/setup-gdk-desktop/action.yml b/contrib/SDL-3.2.8/.github/actions/setup-gdk-desktop/action.yml new file mode 100644 index 0000000..10427ac --- /dev/null +++ b/contrib/SDL-3.2.8/.github/actions/setup-gdk-desktop/action.yml | |||
| @@ -0,0 +1,82 @@ | |||
| 1 | name: 'Setup GDK (Game Development Kit) for Windows Desktop' | ||
| 2 | description: 'Download GDK and install into MSBuild' | ||
| 3 | inputs: | ||
| 4 | # Keep edition and ref in sync! | ||
| 5 | edition: | ||
| 6 | description: 'GDK edition' | ||
| 7 | default: '240601' # YYMMUU (Year Month Update) | ||
| 8 | ref: | ||
| 9 | description: 'Git reference' | ||
| 10 | default: 'June_2024_Update_1' | ||
| 11 | folder: | ||
| 12 | description: 'Folder where to create Directory.Build.props' | ||
| 13 | required: true | ||
| 14 | default: '${{ github.workspace }}' | ||
| 15 | runs: | ||
| 16 | using: 'composite' | ||
| 17 | steps: | ||
| 18 | - uses: actions/setup-python@main | ||
| 19 | with: | ||
| 20 | python-version: 3.x | ||
| 21 | - name: 'Calculate variables' | ||
| 22 | id: calc | ||
| 23 | shell: pwsh | ||
| 24 | run: | | ||
| 25 | $vs_folder=@(vswhere -latest -property installationPath) | ||
| 26 | echo "vs-folder=${vs_folder}" >> $Env:GITHUB_OUTPUT | ||
| 27 | |||
| 28 | echo "gdk-path=${{ runner.temp }}\GDK-${{ inputs.edition }}" >> $Env:GITHUB_OUTPUT | ||
| 29 | |||
| 30 | echo "cache-key=gdk-${{ inputs.ref }}-${{ inputs.edition }}" >> $Env:GITHUB_OUTPUT | ||
| 31 | - name: 'Restore cached GDK' | ||
| 32 | id: cache-restore | ||
| 33 | uses: actions/cache/restore@v4 | ||
| 34 | with: | ||
| 35 | path: '${{ steps.calc.outputs.gdk-path }}' | ||
| 36 | key: ${{ steps.calc.outputs.cache-key }} | ||
| 37 | - name: 'Download GDK' | ||
| 38 | if: ${{ !steps.cache-restore.outputs.cache-hit }} | ||
| 39 | shell: pwsh | ||
| 40 | run: | | ||
| 41 | python build-scripts/setup-gdk-desktop.py ` | ||
| 42 | --download ` | ||
| 43 | --temp-folder "${{ runner.temp }}" ` | ||
| 44 | --gdk-path="${{ steps.calc.outputs.gdk-path }}" ` | ||
| 45 | --ref-edition "${{ inputs.ref }},${{ inputs.edition }}" ` | ||
| 46 | --vs-folder="${{ steps.calc.outputs.vs-folder }}" ` | ||
| 47 | --no-user-props | ||
| 48 | - name: 'Extract GDK' | ||
| 49 | if: ${{ !steps.cache-restore.outputs.cache-hit }} | ||
| 50 | shell: pwsh | ||
| 51 | run: | | ||
| 52 | python build-scripts/setup-gdk-desktop.py ` | ||
| 53 | --extract ` | ||
| 54 | --ref-edition "${{ inputs.ref }},${{ inputs.edition }}" ` | ||
| 55 | --temp-folder "${{ runner.temp }}" ` | ||
| 56 | --gdk-path="${{ steps.calc.outputs.gdk-path }}" ` | ||
| 57 | --vs-folder="${{ steps.calc.outputs.vs-folder }}" ` | ||
| 58 | --no-user-props | ||
| 59 | - name: 'Cache GDK' | ||
| 60 | if: ${{ !steps.cache-restore.outputs.cache-hit }} | ||
| 61 | uses: actions/cache/save@v4 | ||
| 62 | with: | ||
| 63 | path: '${{ steps.calc.outputs.gdk-path }}' | ||
| 64 | key: ${{ steps.calc.outputs.cache-key }} | ||
| 65 | - name: 'Copy MSBuild files into GDK' | ||
| 66 | shell: pwsh | ||
| 67 | run: | | ||
| 68 | python build-scripts/setup-gdk-desktop.py ` | ||
| 69 | --ref-edition "${{ inputs.ref }},${{ inputs.edition }}" ` | ||
| 70 | --gdk-path="${{ steps.calc.outputs.gdk-path }}" ` | ||
| 71 | --vs-folder="${{ steps.calc.outputs.vs-folder }}" ` | ||
| 72 | --copy-msbuild ` | ||
| 73 | --no-user-props | ||
| 74 | - name: 'Write user props' | ||
| 75 | shell: pwsh | ||
| 76 | run: | | ||
| 77 | python build-scripts/setup-gdk-desktop.py ` | ||
| 78 | --ref-edition "${{ inputs.ref }},${{ inputs.edition }}" ` | ||
| 79 | --temp-folder "${{ runner.temp }}" ` | ||
| 80 | --vs-folder="${{ steps.calc.outputs.vs-folder }}" ` | ||
| 81 | --gdk-path="${{ steps.calc.outputs.gdk-path }}" ` | ||
| 82 | "--props-folder=${{ inputs.folder }}" | ||
