From eddf5500c70e674b67a77265ff70ae2d9f9ea4df Mon Sep 17 00:00:00 2001 From: olebeck Date: Fri, 2 Jul 2021 13:03:53 +0200 Subject: [PATCH] new github action --- .github/workflows/build.yml | 56 +++++++++++++++ .github/workflows/linux.yml | 72 ------------------- .github/workflows/macos.yml | 42 ----------- .github/workflows/windows.yml | 53 -------------- .../{LinuxARM.pubxml => Linux-arm.pubxml} | 2 +- .../{LinuxARM64.pubxml => Linux-arm64.pubxml} | 2 +- .../{Linux64.pubxml => Linux-x64.pubxml} | 2 +- .../PublishProfiles/MacOS-arm64.pubxml | 19 +++++ .../{MacOS.pubxml => MacOS-x64.pubxml} | 2 +- .../PublishProfiles/Windows-arm64.pubxml | 18 +++++ .../{Win64.pubxml => Windows-x64.pubxml} | 2 +- .../{Win32.pubxml => Windows-x86.pubxml} | 2 +- 12 files changed, 99 insertions(+), 173 deletions(-) create mode 100755 .github/workflows/build.yml delete mode 100755 .github/workflows/linux.yml delete mode 100644 .github/workflows/macos.yml delete mode 100644 .github/workflows/windows.yml rename Horse Isle Server/HorseIsleServer/Properties/PublishProfiles/{LinuxARM.pubxml => Linux-arm.pubxml} (87%) rename Horse Isle Server/HorseIsleServer/Properties/PublishProfiles/{LinuxARM64.pubxml => Linux-arm64.pubxml} (88%) rename Horse Isle Server/HorseIsleServer/Properties/PublishProfiles/{Linux64.pubxml => Linux-x64.pubxml} (87%) create mode 100644 Horse Isle Server/HorseIsleServer/Properties/PublishProfiles/MacOS-arm64.pubxml rename Horse Isle Server/HorseIsleServer/Properties/PublishProfiles/{MacOS.pubxml => MacOS-x64.pubxml} (87%) create mode 100755 Horse Isle Server/HorseIsleServer/Properties/PublishProfiles/Windows-arm64.pubxml rename Horse Isle Server/HorseIsleServer/Properties/PublishProfiles/{Win64.pubxml => Windows-x64.pubxml} (87%) rename Horse Isle Server/HorseIsleServer/Properties/PublishProfiles/{Win32.pubxml => Windows-x86.pubxml} (87%) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100755 index 0000000..aff9813 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,56 @@ +name: build-server + +on: + push: + branches: [master] + pull_request: + branches: [master] + +defaults: + run: + working-directory: "./Horse Isle Server" + +jobs: + build-server: + runs-on: ${{ matrix.os }} + strategy: + matrix: + arch: ["x64", "arm64"] + os: ["ubuntu-latest", "macos-latest", "windows-latest"] + exclude: + - os: macos-latest + arch: arm64 # no arm64 mac runner on github + include: + - os: ubuntu-latest + arch: arm + - os: windows-latest + arch: x86 + + steps: + - uses: actions/checkout@v2 + + - name: Setup .NET + uses: actions/setup-dotnet@v1 + env: + DOTNET_CLI_TELEMETRY_OPTOUT: "true" + DOTNET_NOLOGO: "true" + with: + dotnet-version: 5.0.x + + - name: Build ${{ runner.os }}-${{ matrix.arch }} + continue-on-error: false + env: + DOTNET_CLI_TELEMETRY_OPTOUT: "true" + DOTNET_NOLOGO: "true" + run: | + dotnet publish -p:PublishProfile=${{ runner.os }}-${{ matrix.arch }}.pubxml + cp ../DataCollection/*.json "HorseIsleServer/bin/${{ matrix.arch }}/${{ runner.os }}/publish/" + cp ../DataCollection/*.MAP "HorseIsleServer/bin/${{ matrix.arch }}/${{ runner.os }}/publish/" + mkdir "HorseIsleServer/bin/${{ matrix.arch }}/${{ runner.os }}/publish/www" + cp -R ../WebInterface/* "HorseIsleServer/bin/${{ matrix.arch }}/${{ runner.os }}/publish/www" + + - name: upload ${{ runner.os }}-${{ matrix.arch }} + uses: actions/upload-artifact@v2 + with: + name: ${{ runner.os }}-${{ matrix.arch }} + path: Horse Isle Server/HorseIsleServer/bin/${{ matrix.arch }}/${{ runner.os }}/publish/ diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml deleted file mode 100755 index 798a3f6..0000000 --- a/.github/workflows/linux.yml +++ /dev/null @@ -1,72 +0,0 @@ -name: linux - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] -defaults: - run: - working-directory: ./Horse Isle Server - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - - name: Setup .NET - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 5.0.x - - - name: Restore dependencies - run: dotnet restore - - - - name: Build linux-64 - continue-on-error: false - run: | - dotnet publish -p:PublishProfile=Linux64.pubxml - cp ../DataCollection/*.json "HorseIsleServer/bin/x64/Linux/net5.0/linux-x64/publish/" - cp ../DataCollection/*.MAP "HorseIsleServer/bin/x64/Linux/net5.0/linux-x64/publish/" - mkdir "HorseIsleServer/bin/x64/Linux/net5.0/linux-x64/publish/www" - cp -R ../WebInterface/* "HorseIsleServer/bin/x64/Linux/net5.0/linux-x64/publish/www" - - - name: Build linux-arm - continue-on-error: false - run: | - dotnet publish -p:PublishProfile=LinuxARM.pubxml - cp ../DataCollection/*.json "HorseIsleServer/bin/ARM/Linux/net5.0/linux-arm/publish/" - cp ../DataCollection/*.MAP "HorseIsleServer/bin/ARM/Linux/net5.0/linux-arm/publish/" - mkdir "HorseIsleServer/bin/ARM/Linux/net5.0/linux-arm/publish/www" - cp -R ../WebInterface/* "HorseIsleServer/bin/ARM/Linux/net5.0/linux-arm/publish/www" - - - name: Build linux-arm64 - continue-on-error: false - run: | - dotnet publish -p:PublishProfile=LinuxARM64.pubxml - cp ../DataCollection/*.json "HorseIsleServer/bin/ARM64/Linux/net5.0/linux-arm64/publish/" - cp ../DataCollection/*.MAP "HorseIsleServer/bin/ARM64/Linux/net5.0/linux-arm64/publish/" - mkdir "HorseIsleServer/bin/ARM64/Linux/net5.0/linux-arm64/publish/www/" - cp -R ../WebInterface/* "HorseIsleServer/bin/ARM64/Linux/net5.0/linux-arm64/publish/www/" - - - name: upload linux-64 - uses: actions/upload-artifact@v2 - with: - name: linux-x64 - path: Horse Isle Server/HorseIsleServer/bin/x64/Linux/net5.0/linux-x64/publish/ - - - name: upload linux-arm - uses: actions/upload-artifact@v2 - with: - name: linux-arm - path: Horse Isle Server/HorseIsleServer/bin/ARM/Linux/net5.0/linux-arm/publish/ - - - name: upload linux-arm64 - uses: actions/upload-artifact@v2 - with: - name: linux-arm64 - path: Horse Isle Server/HorseIsleServer/bin/ARM64/Linux/net5.0/linux-arm64/publish/ diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml deleted file mode 100644 index 4833c6b..0000000 --- a/.github/workflows/macos.yml +++ /dev/null @@ -1,42 +0,0 @@ -name: macos - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] -defaults: - run: - working-directory: ./Horse Isle Server - -jobs: - build: - - runs-on: macos-latest - - steps: - - uses: actions/checkout@v2 - - - name: Setup .NET - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 5.0.x - - - name: Restore dependencies - run: dotnet restore - - - - name: Build mac-64 - continue-on-error: false - run: | - dotnet publish -p:PublishProfile=MacOS.pubxml - cp ../DataCollection/*.json "HorseIsleServer/bin/x64/MacOS/net5.0/osx-x64/publish/" - cp ../DataCollection/*.MAP "HorseIsleServer/bin/x64/MacOS/net5.0/osx-x64/publish/" - mkdir "HorseIsleServer/bin/x64/MacOS/net5.0/osx-x64/publish/www" - cp -R ../WebInterface/* "HorseIsleServer/bin/x64/MacOS/net5.0/osx-x64/publish/www" - - - name: upload mac-64 - uses: actions/upload-artifact@v2 - with: - name: mac-x64 - path: Horse Isle Server/HorseIsleServer/bin/x64/MacOS/net5.0/osx-x64/publish/ diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml deleted file mode 100644 index ad8c40d..0000000 --- a/.github/workflows/windows.yml +++ /dev/null @@ -1,53 +0,0 @@ -name: windows - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] -defaults: - run: - working-directory: ./Horse Isle Server - -jobs: - build: - - runs-on: windows-latest - - steps: - - uses: actions/checkout@v2 - - - name: Setup .NET - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 5.0.x - - - name: Restore dependencies - run: dotnet restore - - - - name: Build win-x64 - continue-on-error: false - run: | - dotnet publish -p:PublishProfile=Win64.pubxml - copy ..\DataCollection\gamedata.json "HorseIsleServer\bin\x64\Windows\net5.0\win-x64\publish\gamedata.json" - copy ..\DataCollection\HI1.MAP "HorseIsleServer\bin\x64\Windows\net5.0\win-x64\publish\HI1.MAP" - copy ..\WebInterface "HorseIsleServer\bin\x64\Windows\net5.0\win-x64\publish\www" -Recurse - - name: Build win-x86 - continue-on-error: false - run: | - dotnet publish -p:PublishProfile=Win32.pubxml - copy ..\DataCollection\gamedata.json "HorseIsleServer\bin\x86\Windows\net5.0\win-x86\publish\gamedata.json" - copy ..\DataCollection\HI1.MAP "HorseIsleServer\bin\x86\Windows\net5.0\win-x86\publish\HI1.MAP" - copy ..\WebInterface "HorseIsleServer\bin\x86\Windows\net5.0\win-x86\publish\www" -Recurse - - name: Upload win-x64 - uses: actions/upload-artifact@v2 - with: - name: win-x64 - path: Horse Isle Server\HorseIsleServer\bin/x64\Windows\net5.0\win-x64\publish\ - - - name: Upload win-x86 - uses: actions/upload-artifact@v2 - with: - name: win-x86 - path: Horse Isle Server\HorseIsleServer\bin\x86\Windows\net5.0\win-x86\publish\ diff --git a/Horse Isle Server/HorseIsleServer/Properties/PublishProfiles/LinuxARM.pubxml b/Horse Isle Server/HorseIsleServer/Properties/PublishProfiles/Linux-arm.pubxml similarity index 87% rename from Horse Isle Server/HorseIsleServer/Properties/PublishProfiles/LinuxARM.pubxml rename to Horse Isle Server/HorseIsleServer/Properties/PublishProfiles/Linux-arm.pubxml index db4d3fc..57cd2a2 100755 --- a/Horse Isle Server/HorseIsleServer/Properties/PublishProfiles/LinuxARM.pubxml +++ b/Horse Isle Server/HorseIsleServer/Properties/PublishProfiles/Linux-arm.pubxml @@ -6,7 +6,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121. Linux ARM - bin\ARM\Linux\net5.0\linux-arm\publish\ + bin\arm\Linux\publish\ FileSystem net5.0 linux-arm diff --git a/Horse Isle Server/HorseIsleServer/Properties/PublishProfiles/LinuxARM64.pubxml b/Horse Isle Server/HorseIsleServer/Properties/PublishProfiles/Linux-arm64.pubxml similarity index 88% rename from Horse Isle Server/HorseIsleServer/Properties/PublishProfiles/LinuxARM64.pubxml rename to Horse Isle Server/HorseIsleServer/Properties/PublishProfiles/Linux-arm64.pubxml index 1bedc71..5b6c1e5 100755 --- a/Horse Isle Server/HorseIsleServer/Properties/PublishProfiles/LinuxARM64.pubxml +++ b/Horse Isle Server/HorseIsleServer/Properties/PublishProfiles/Linux-arm64.pubxml @@ -6,7 +6,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121. Linux ARM64 - bin\ARM64\Linux\net5.0\linux-arm64\publish\ + bin\arm64\Linux\publish\ FileSystem net5.0 linux-arm64 diff --git a/Horse Isle Server/HorseIsleServer/Properties/PublishProfiles/Linux64.pubxml b/Horse Isle Server/HorseIsleServer/Properties/PublishProfiles/Linux-x64.pubxml similarity index 87% rename from Horse Isle Server/HorseIsleServer/Properties/PublishProfiles/Linux64.pubxml rename to Horse Isle Server/HorseIsleServer/Properties/PublishProfiles/Linux-x64.pubxml index 471f4a8..f862a57 100755 --- a/Horse Isle Server/HorseIsleServer/Properties/PublishProfiles/Linux64.pubxml +++ b/Horse Isle Server/HorseIsleServer/Properties/PublishProfiles/Linux-x64.pubxml @@ -6,7 +6,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121. Linux x64 - bin\x64\Linux\net5.0\linux-x64\publish\ + bin\x64\Linux\publish\ FileSystem net5.0 linux-x64 diff --git a/Horse Isle Server/HorseIsleServer/Properties/PublishProfiles/MacOS-arm64.pubxml b/Horse Isle Server/HorseIsleServer/Properties/PublishProfiles/MacOS-arm64.pubxml new file mode 100644 index 0000000..02bc848 --- /dev/null +++ b/Horse Isle Server/HorseIsleServer/Properties/PublishProfiles/MacOS-arm64.pubxml @@ -0,0 +1,19 @@ + + + + + MacOS + arm64 + bin\arm64\MacOS\publish\ + FileSystem + net5.0 + osx-arm64 + True + True + True + True + + \ No newline at end of file diff --git a/Horse Isle Server/HorseIsleServer/Properties/PublishProfiles/MacOS.pubxml b/Horse Isle Server/HorseIsleServer/Properties/PublishProfiles/MacOS-x64.pubxml similarity index 87% rename from Horse Isle Server/HorseIsleServer/Properties/PublishProfiles/MacOS.pubxml rename to Horse Isle Server/HorseIsleServer/Properties/PublishProfiles/MacOS-x64.pubxml index 7080eec..27ef88b 100644 --- a/Horse Isle Server/HorseIsleServer/Properties/PublishProfiles/MacOS.pubxml +++ b/Horse Isle Server/HorseIsleServer/Properties/PublishProfiles/MacOS-x64.pubxml @@ -6,7 +6,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121. MacOS x64 - bin\x64\MacOS\net5.0\osx-x64\publish\ + bin\x64\MacOS\publish\ FileSystem net5.0 osx-x64 diff --git a/Horse Isle Server/HorseIsleServer/Properties/PublishProfiles/Windows-arm64.pubxml b/Horse Isle Server/HorseIsleServer/Properties/PublishProfiles/Windows-arm64.pubxml new file mode 100755 index 0000000..560076e --- /dev/null +++ b/Horse Isle Server/HorseIsleServer/Properties/PublishProfiles/Windows-arm64.pubxml @@ -0,0 +1,18 @@ + + + + + Windows + arm64 + bin\arm64\Windows\publish\ + FileSystem + net5.0 + win-arm64 + True + True + True + True + + \ No newline at end of file diff --git a/Horse Isle Server/HorseIsleServer/Properties/PublishProfiles/Win64.pubxml b/Horse Isle Server/HorseIsleServer/Properties/PublishProfiles/Windows-x64.pubxml similarity index 87% rename from Horse Isle Server/HorseIsleServer/Properties/PublishProfiles/Win64.pubxml rename to Horse Isle Server/HorseIsleServer/Properties/PublishProfiles/Windows-x64.pubxml index 14e7809..d644103 100755 --- a/Horse Isle Server/HorseIsleServer/Properties/PublishProfiles/Win64.pubxml +++ b/Horse Isle Server/HorseIsleServer/Properties/PublishProfiles/Windows-x64.pubxml @@ -6,7 +6,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121. Windows x64 - bin\x64\Windows\net5.0\win-x64\publish\ + bin\x64\Windows\publish\ FileSystem net5.0 win-x64 diff --git a/Horse Isle Server/HorseIsleServer/Properties/PublishProfiles/Win32.pubxml b/Horse Isle Server/HorseIsleServer/Properties/PublishProfiles/Windows-x86.pubxml similarity index 87% rename from Horse Isle Server/HorseIsleServer/Properties/PublishProfiles/Win32.pubxml rename to Horse Isle Server/HorseIsleServer/Properties/PublishProfiles/Windows-x86.pubxml index ecb71ba..945dcf3 100755 --- a/Horse Isle Server/HorseIsleServer/Properties/PublishProfiles/Win32.pubxml +++ b/Horse Isle Server/HorseIsleServer/Properties/PublishProfiles/Windows-x86.pubxml @@ -6,7 +6,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121. Windows x86 - bin\x86\Windows\net5.0\win-x86\publish\ + bin\x86\Windows\publish\ FileSystem net5.0 win-x86