forked from libsdl-org/SDL
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
400 changed files
with
57,374 additions
and
10,146 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,53 @@ | ||
name: 'Setup LoongArch64 toolchain' | ||
description: 'Download Linux LoongArch64 toolchain and set output variables' | ||
inputs: | ||
version: | ||
description: 'LoongArch64 version' | ||
default: '2022.09.06' | ||
outputs: | ||
prefix: | ||
description: "LoongArch toolchain prefix" | ||
value: ${{ steps.final.outputs.prefix }} | ||
cc: | ||
description: "LoongArch C compiler" | ||
value: ${{ steps.final.outputs.cc }} | ||
cxx: | ||
description: "LoongArch C++ compiler" | ||
value: ${{ steps.final.outputs.cxx }} | ||
runs: | ||
using: 'composite' | ||
steps: | ||
- uses: actions/cache/restore@v4 | ||
id: restore-cache | ||
with: | ||
path: /opt/cross-tools | ||
key: loongarch64-${{ inputs.version }} | ||
|
||
- name: 'Download LoongArch64 gcc+glibc toolchain' | ||
if: ${{ !steps.restore-cache.outputs.cache-hit }} | ||
shell: bash | ||
run: | | ||
url="https://github.com/loongson/build-tools/releases/download/${{ inputs.version }}/loongarch64-clfs-6.3-cross-tools-gcc-glibc.tar.xz" | ||
wget "$url" -O /tmp/toolchain.tar.xz | ||
mkdir -p /opt | ||
tar -C /opt -x -f /tmp/toolchain.tar.xz | ||
- uses: actions/cache/save@v4 | ||
if: ${{ !steps.restore-cache.outputs.cache-hit }} | ||
with: | ||
path: /opt/cross-tools | ||
key: loongarch64-${{ inputs.version }} | ||
- name: 'Set output vars' | ||
id: final | ||
shell: bash | ||
run: | | ||
prefix=/opt/cross-tools | ||
echo "prefix=${prefix}" >> $GITHUB_OUTPUT | ||
cc="${prefix}/bin/loongarch64-unknown-linux-gnu-gcc" | ||
cxx="${prefix}/bin/loongarch64-unknown-linux-gnu-g++" | ||
echo "cc=${cc}" >> $GITHUB_OUTPUT | ||
echo "cxx=${cxx}" >> $GITHUB_OUTPUT | ||
echo "LOONGARCH64_CC=${cc}" >>$GITHUB_ENV | ||
echo "LOONGARCH64_CXX=${cxx}" >>$GITHUB_ENV |
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
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,93 @@ | ||
name: 'Setup GLES for PlayStation Vita' | ||
description: 'Download GLES for VITA (PVR or PIB), and copy it into the vita sdk' | ||
inputs: | ||
pib-version: | ||
description: 'PIB version' | ||
default: '1.1.4' | ||
pvr-version: | ||
description: 'PVR_PSP2 version' | ||
default: '3.9' | ||
type: | ||
description: '"pib" or "pvr"' | ||
default: '' | ||
runs: | ||
using: 'composite' | ||
steps: | ||
- name: 'Calculate variables' | ||
id: calc | ||
shell: sh | ||
run: | | ||
if test "x${VITASDK}" = "x"; then | ||
echo "VITASDK must be defined" | ||
exit 1; | ||
fi | ||
case "x${{ inputs.type }}" in | ||
"xpvr") | ||
echo "cache-key=SDL-vita-gles-pvr-${{ inputs.pvr-version}}" >> ${GITHUB_OUTPUT} | ||
;; | ||
"xpib") | ||
echo "cache-key=SDL-vita-gles-pib-${{ inputs.pib-version}}" >> ${GITHUB_OUTPUT} | ||
;; | ||
*) | ||
echo "Invalid type. Must be 'pib' or 'pvr'." | ||
exit 1 | ||
;; | ||
esac | ||
- uses: actions/cache/restore@v4 | ||
id: restore-cache | ||
with: | ||
path: /vita/dependencies | ||
key: '${{ steps.calc.outputs.cache-key }}' | ||
- name: 'Download PVR_PSP2 (GLES)' | ||
if: ${{ !steps.restore-cache.outputs.cache-hit && inputs.type == 'pvr' }} | ||
shell: sh | ||
run: | | ||
pvr_psp2_version=${{ inputs.pvr-version }} | ||
mkdir -p /vita/dependencies/include | ||
mkdir -p /vita/dependencies/lib | ||
# Configure PVR_PSP2 headers | ||
wget https://github.com/GrapheneCt/PVR_PSP2/archive/refs/tags/v$pvr_psp2_version.zip -P/tmp | ||
unzip /tmp/v$pvr_psp2_version.zip -d/tmp | ||
cp -r /tmp/PVR_PSP2-$pvr_psp2_version/include/* /vita/dependencies/include | ||
rm /tmp/v$pvr_psp2_version.zip | ||
# include guard of PVR_PSP2's khrplatform.h does not match the usual one | ||
sed -i -e s/__drvkhrplatform_h_/__khrplatform_h_/ /vita/dependencies/include/KHR/khrplatform.h | ||
# Configure PVR_PSP2 stub libraries | ||
wget https://github.com/GrapheneCt/PVR_PSP2/releases/download/v$pvr_psp2_version/vitasdk_stubs.zip -P/tmp | ||
unzip /tmp/vitasdk_stubs.zip -d/tmp/pvr_psp2_stubs | ||
find /tmp/pvr_psp2_stubs -type f -name "*.a" -exec cp {} /vita/dependencies/lib \; | ||
rm /tmp/vitasdk_stubs.zip | ||
rm -rf /tmp/pvr_psp2_stubs | ||
- name: 'Download gl4es4vita (OpenGL)' | ||
if: ${{ !steps.restore-cache.outputs.cache-hit && inputs.type == 'pib' }} | ||
shell: sh | ||
run: | | ||
gl4es4vita_version=${{ inputs.pib-version }} | ||
mkdir -p /vita/dependencies/include | ||
mkdir -p /vita/dependencies/lib | ||
# Configure gl4es4vita headers | ||
wget https://github.com/SonicMastr/gl4es4vita/releases/download/v$gl4es4vita_version-vita/include.zip -P/tmp | ||
unzip -o /tmp/include.zip -d/vita/dependencies/include | ||
rm /tmp/include.zip | ||
# Configure gl4es4vita stub libraries | ||
wget https://github.com/SonicMastr/gl4es4vita/releases/download/v$gl4es4vita_version-vita/vitasdk_stubs.zip -P/tmp | ||
unzip /tmp/vitasdk_stubs.zip -d/vita/dependencies/lib | ||
- uses: actions/cache/save@v4 | ||
if: ${{ !steps.restore-cache.outputs.cache-hit }} | ||
with: | ||
path: /vita/dependencies | ||
key: '${{ steps.calc.outputs.cache-key }}' | ||
|
||
- name: Copy PVR_PSP2 (GLES) or gl4es4vita (OpenGL) to vita toolchain dir | ||
shell: sh | ||
run: | | ||
cp -rv /vita/dependencies/* ${VITASDK}/arm-vita-eabi |
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,48 @@ | ||
name: 'Build (All)' | ||
|
||
on: [push, pull_request] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
controller: | ||
name: 'Create test plan' | ||
runs-on: 'ubuntu-latest' | ||
outputs: | ||
platforms-level1: ${{ steps.plan.outputs.platforms-level1 }} | ||
platforms-others: ${{ steps.plan.outputs.platforms-others }} | ||
steps: | ||
- uses: actions/setup-python@main | ||
with: | ||
python-version: 3.x | ||
- uses: actions/checkout@main | ||
with: | ||
sparse-checkout: '.github/workflows/create-test-plan.py' | ||
- name: 'Create plan' | ||
id: plan | ||
run: | | ||
# Adding [sdl-ci-filter GLOB] to the commit message will limit the jobs | ||
# e.g. [sdl-ci-filter msvc-*] | ||
EOF=$(openssl rand -hex 32) | ||
cat >/tmp/commit_message.txt <<$EOF | ||
${{ github.event.head_commit.message }} | ||
$EOF | ||
python .github/workflows/create-test-plan.py \ | ||
--github-variable-prefix platforms \ | ||
--github-ci \ | ||
--verbose \ | ||
${{ (github.repository_owner != 'libsdl-org' && '--no-artifact') || '' }} \ | ||
--commit-message-file /tmp/commit_message.txt | ||
level1: | ||
needs: [controller] | ||
uses: './.github/workflows/generic.yml' | ||
with: | ||
platforms: ${{ needs.controller.outputs.platforms-level1 }} | ||
level2: | ||
needs: [controller, level1] | ||
uses: './.github/workflows/generic.yml' | ||
with: | ||
platforms: ${{ needs.controller.outputs.platforms-others }} |
Oops, something went wrong.