Add GitHub Actions workflow for NuGet release

This commit is contained in:
Lukas Dürrenberger committed 2024-05-18 15:44:02 +02:00
1 parent 2ec9764ac4
commit 7fd47811cb
5 files changed
+285 -6

No files matched your search

+24 -3
View File
@@ -5,9 +5,10 @@ set -e
if [[ -z "$1" ]]; then
echo 'No Runtime Identifier specified, running all known RIDs'
./build.docker.sh "alpine-x64"
./build.docker.sh "debian-x64"
./build.docker.sh "fedora-x64"
./build.docker.sh "linux-x64"
./build.docker.sh "linux-musl-x64"
./build.docker.sh "linux-arm"
./build.docker.sh "linux-arm64"
exit 0
fi
@@ -30,6 +31,26 @@ case "$RID" in
Shell='/bin/bash'
;;
'linux-x64')
Image='ubuntu:22.04'
Shell='/bin/bash'
;;
'linux-musl-x64')
Image='alpine:3.15'
Shell='/bin/sh'
;;
'linux-arm')
Image='arm32v7/ubuntu:22.04'
Shell='/bin/bash'
;;
'linux-arm64')
Image='arm64v8/ubuntu:22.04'
Shell='/bin/bash'
;;
*)
echo "Unknown Runtime Identifier $RID"
exit 1
+3 -1
View File
@@ -43,7 +43,7 @@ echo "Please note that all SFML dependencies must be installed and available to
RID="$1"
SFMLBranch="2.6.1" # The branch or tag of the SFML repository to be cloned
CSFMLDir="$(realpath "$(git rev-parse --show-toplevel)")" # The directory of the source code of CSFML
CSFMLDir="$(realpath ../../)" # The directory of the source code of CSFML
OutDir="./CSFML/runtimes/$RID/native" # The base directory of all CSFML modules, used to copy the final libraries
mkdir -p "$OutDir"
@@ -93,6 +93,7 @@ cmake -E env LDFLAGS="-z origin" \
"-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=$SFMLLibDir" \
'-DCMAKE_BUILD_WITH_INSTALL_RPATH=1' \
'-DCMAKE_INSTALL_RPATH=$ORIGIN' \
'-DSFML_BUILD_NETWORK=0' \
"$SFMLDir"
cmake --build . --config Release
@@ -118,6 +119,7 @@ cmake -E env LDFLAGS="-z origin" \
"-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=$CSFMLLibDir" \
'-DCMAKE_BUILD_WITH_INSTALL_RPATH=1' \
'-DCMAKE_INSTALL_RPATH=$ORIGIN' \
'-DCSFML_BUILD_NETWORK=0' \
"$CSFMLDir"
cmake --build . --config Release
+3 -1
View File
@@ -113,6 +113,7 @@ cmake -E env \
-D "CMAKE_INSTALL_PREFIX=$SFMLLibDir" \
-D "SFML_DEPENDENCIES_INSTALL_PREFIX=$SFMLLibDir" \
-D "SFML_MISC_INSTALL_PREFIX=$SFMLLibDir" \
-D "SFML_BUILD_NETWORK=0" \
"$SFMLDir"
cmake --build . --config Release --target install
@@ -141,6 +142,7 @@ cmake -E env \
-D 'CMAKE_INSTALL_RPATH=@loader_path' \
-D "CMAKE_INSTALL_PREFIX=$CSFMLLibDir" \
-D "INSTALL_MISC_DIR=$CSFMLLibDir" \
-D "CSFML_BUILD_NETWORK=0" \
"$CSFMLDir"
cmake --build . --config Release --target install
@@ -211,7 +213,7 @@ copymodule graphics
copymodule system
copymodule window
cp -R "$SFMLLibDir/"*.framework "$OutDir"
cp -R "$SFMLLibDir/lib/"*.framework "$OutDir"
popd # Pop CSFML
popd # Pop $RID
+3 -1
View File
@@ -48,7 +48,7 @@ Ensures that the last command run was a success, checking its exit code.
#>
function Ensure-Success() {
if ($LastExitCode -ne 0) {
exit
exit -1
}
}
@@ -119,6 +119,7 @@ cmake `
'-DCMAKE_BUILD_TYPE=Release' `
'-DCMAKE_SYSTEM_VERSION=8.1' `
'-DSFML_USE_STATIC_STD_LIBS=1' `
'-DSFML_BUILD_NETWORK=0' `
"-G$Generator" `
"-A$Architecture" `
$SFMLDir
@@ -158,6 +159,7 @@ cmake `
`
"-DBUILD_SHARED_LIBS=1" `
'-DCMAKE_BUILD_TYPE=Release' `
'-DCSFML_BUILD_NETWORK=0' `
`
"-G$generator" `
"-A$Architecture" `