forked from libsdl-org/SDL
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'SDL2' into dreamcastSDL2
- Loading branch information
Showing
153 changed files
with
2,095 additions
and
647 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
name: 'Setup GDK (Game Development Kit) for Windows Desktop' | ||
description: 'Download GDK and install into MSBuild' | ||
inputs: | ||
# Keep edition and ref in sync! | ||
edition: | ||
description: 'GDK edition' | ||
default: '240601' # YYMMUU (Year Month Update) | ||
ref: | ||
description: 'Git reference' | ||
default: 'June_2024_Update_1' | ||
folder: | ||
description: 'Folder where to create Directory.Build.props' | ||
required: true | ||
default: '${{ github.workspace }}' | ||
runs: | ||
using: 'composite' | ||
steps: | ||
- uses: actions/setup-python@main | ||
with: | ||
python-version: 3.x | ||
- name: 'Calculate variables' | ||
id: calc | ||
shell: pwsh | ||
run: | | ||
$vs_folder=@(vswhere -latest -property installationPath) | ||
echo "vs-folder=${vs_folder}" >> $Env:GITHUB_OUTPUT | ||
echo "gdk-path=${{ runner.temp }}\GDK-${{ inputs.edition }}" >> $Env:GITHUB_OUTPUT | ||
echo "cache-key=gdk-${{ inputs.ref }}-${{ inputs.edition }}" >> $Env:GITHUB_OUTPUT | ||
- name: 'Restore cached GDK' | ||
id: cache-restore | ||
uses: actions/cache/restore@v4 | ||
with: | ||
path: '${{ steps.calc.outputs.gdk-path }}' | ||
key: ${{ steps.calc.outputs.cache-key }} | ||
- name: 'Download GDK' | ||
if: ${{ !steps.cache-restore.outputs.cache-hit }} | ||
shell: pwsh | ||
run: | | ||
python build-scripts/setup-gdk-desktop.py ` | ||
--download ` | ||
--temp-folder "${{ runner.temp }}" ` | ||
--gdk-path="${{ steps.calc.outputs.gdk-path }}" ` | ||
--ref-edition "${{ inputs.ref }},${{ inputs.edition }}" ` | ||
--vs-folder="${{ steps.calc.outputs.vs-folder }}" ` | ||
--no-user-props | ||
- name: 'Extract GDK' | ||
if: ${{ !steps.cache-restore.outputs.cache-hit }} | ||
shell: pwsh | ||
run: | | ||
python build-scripts/setup-gdk-desktop.py ` | ||
--extract ` | ||
--ref-edition "${{ inputs.ref }},${{ inputs.edition }}" ` | ||
--temp-folder "${{ runner.temp }}" ` | ||
--gdk-path="${{ steps.calc.outputs.gdk-path }}" ` | ||
--vs-folder="${{ steps.calc.outputs.vs-folder }}" ` | ||
--no-user-props | ||
- name: 'Cache GDK' | ||
if: ${{ !steps.cache-restore.outputs.cache-hit }} | ||
uses: actions/cache/save@v4 | ||
with: | ||
path: '${{ steps.calc.outputs.gdk-path }}' | ||
key: ${{ steps.calc.outputs.cache-key }} | ||
- name: 'Copy MSBuild files into GDK' | ||
shell: pwsh | ||
run: | | ||
python build-scripts/setup-gdk-desktop.py ` | ||
--ref-edition "${{ inputs.ref }},${{ inputs.edition }}" ` | ||
--gdk-path="${{ steps.calc.outputs.gdk-path }}" ` | ||
--vs-folder="${{ steps.calc.outputs.vs-folder }}" ` | ||
--copy-msbuild ` | ||
--no-user-props | ||
- name: 'Write user props' | ||
shell: pwsh | ||
run: | | ||
python build-scripts/setup-gdk-desktop.py ` | ||
--ref-edition "${{ inputs.ref }},${{ inputs.edition }}" ` | ||
--temp-folder "${{ runner.temp }}" ` | ||
--vs-folder="${{ steps.calc.outputs.vs-folder }}" ` | ||
--gdk-path="${{ steps.calc.outputs.gdk-path }}" ` | ||
"--props-folder=${{ inputs.folder }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: 'Setup ninja' | ||
description: 'Download ninja and add it to the PATH environment variable' | ||
inputs: | ||
version: | ||
description: 'Ninja version' | ||
default: '1.12.1' | ||
runs: | ||
using: 'composite' | ||
steps: | ||
- name: 'Calculate variables' | ||
id: calc | ||
shell: sh | ||
run: | | ||
case "${{ runner.os }}-${{ runner.arch }}" in | ||
"Linux-X86" | "Linux-X64") | ||
archive="ninja-linux.zip" | ||
;; | ||
"Linux-ARM64") | ||
archive="ninja-linux-aarch64.zip" | ||
;; | ||
"macOS-X86" | "macOS-X64" | "macOS-ARM64") | ||
archive="ninja-mac.zip" | ||
;; | ||
"Windows-X86" | "Windows-X64") | ||
archive="ninja-win.zip" | ||
;; | ||
"Windows-ARM64") | ||
archive="ninja-winarm64.zip" | ||
;; | ||
*) | ||
echo "Unsupported ${{ runner.os }}-${{ runner.arch }}" | ||
exit 1; | ||
;; | ||
esac | ||
echo "archive=${archive}" >> ${GITHUB_OUTPUT} | ||
echo "cache-key=${archive}-${{ inputs.version }}-${{ runner.os }}-${{ runner.arch }}" >> ${GITHUB_OUTPUT} | ||
- name: 'Restore cached ${{ steps.calc.outputs.archive }}' | ||
id: cache-restore | ||
uses: actions/cache/restore@v4 | ||
with: | ||
path: '${{ runner.temp }}/${{ steps.calc.outputs.archive }}' | ||
key: ${{ steps.calc.outputs.cache-key }} | ||
- name: 'Download ninja ${{ inputs.version }} for ${{ runner.os }} (${{ runner.arch }})' | ||
if: ${{ !steps.cache-restore.outputs.cache-hit }} | ||
shell: pwsh | ||
run: | | ||
Invoke-WebRequest "https://github.com/ninja-build/ninja/releases/download/v${{ inputs.version }}/${{ steps.calc.outputs.archive }}" -OutFile "${{ runner.temp }}/${{ steps.calc.outputs.archive }}" | ||
- name: 'Cache ${{ steps.calc.outputs.archive }}' | ||
if: ${{ !steps.cache-restore.outputs.cache-hit }} | ||
uses: actions/cache/save@v4 | ||
with: | ||
path: '${{ runner.temp }}/${{ steps.calc.outputs.archive }}' | ||
key: ${{ steps.calc.outputs.cache-key }} | ||
- name: 'Extract libusb' | ||
shell: pwsh | ||
run: | | ||
7z "-o${{ runner.temp }}/ninja-${{ inputs.version }}-${{ runner.arch }}" x "${{ runner.temp }}/${{ steps.calc.outputs.archive }}" | ||
- name: 'Set output variables' | ||
id: final | ||
shell: pwsh | ||
run: | | ||
echo "${{ runner.temp }}/ninja-${{ inputs.version }}-${{ runner.arch }}" >> $env:GITHUB_PATH |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.