diff --git a/.github/workflows/nuget.yml b/.github/workflows/nuget.yml new file mode 100644 index 00000000..43828a65 --- /dev/null +++ b/.github/workflows/nuget.yml @@ -0,0 +1,60 @@ +name: NuGet Release + +on: [push, workflow_dispatch] + +concurrency: + group: nuget-${{github.ref}} + cancel-in-progress: true + +jobs: + windows: + name: Windows VS2022 + runs-on: windows-2022 + + steps: + - name: Checkout CSFML + uses: actions/checkout@v3 + with: + path: CSFML + + - name: Build x86 + shell: pwsh + run: | + cd CSFML/tools/nuget + ./build.win.ps1 "win-x86" + + - name: Build x64 + shell: pwsh + run: | + cd CSFML/tools/nuget + ./build.win.ps1 "win-x64" + + - name: Upload Artifact + uses: actions/upload-artifact@v3 + with: + name: CSFML-Windows + path: CSFML/tools/nuget/CSFML + + linux: + name: Linux x64 + runs-on: ubuntu-22.04 + container: + image: ubuntu:22.04 + + steps: + - name: Checkout CSFML + uses: actions/checkout@v3 + with: + path: CSFML + + - name: Build + shell: bash + run: | + cd CSFML/tools/nuget + sudo ./docker.linux-x64.sh + + - name: Upload Artifact + uses: actions/upload-artifact@v3 + with: + name: CSFML-Linux + path: CSFML/tools/nuget/CSFML diff --git a/tools/nuget/build.docker.sh b/tools/nuget/build.docker.sh index c37baa20..37569269 100755 --- a/tools/nuget/build.docker.sh +++ b/tools/nuget/build.docker.sh @@ -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 diff --git a/tools/nuget/build.linux.sh b/tools/nuget/build.linux.sh index 2795fe9d..19693743 100755 --- a/tools/nuget/build.linux.sh +++ b/tools/nuget/build.linux.sh @@ -42,7 +42,7 @@ echo "Please note that all SFML dependencies must be installed and available to RID="$1" -SFMLBranch="2.5.1" # The branch or tag of the SFML repository to be cloned +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 OutDir="./CSFML/runtimes/$RID/native" # The base directory of all CSFML modules, used to copy the final libraries diff --git a/tools/nuget/build.win.ps1 b/tools/nuget/build.win.ps1 index 0722be1d..fa318091 100644 --- a/tools/nuget/build.win.ps1 +++ b/tools/nuget/build.win.ps1 @@ -16,7 +16,7 @@ if (-not $RID) { exit } -$Generator = 'Visual Studio 16 2019' +$Generator = 'Visual Studio 17 2022' switch ($RID) { 'win-x86' { @@ -35,7 +35,7 @@ Write-Output "Building $RID" Write-Output "Using $Generator as the cmake generator" Write-Output "Using architecture $Architecture" -$SFMLBranch = "2.5.1" # The branch or tag of the SFML repository to be cloned +$SFMLBranch = "2.6.1" # The branch or tag of the SFML repository to be cloned $CSFMLDir = (Get-Item (git rev-parse --show-toplevel)).FullName # The directory of the source code of CSFML $OutDir = "./CSFML/runtimes/$RID/native" # The directory of all CSFML modules, used to copy the final dlls