From f8e7e4596546408a4c606f3cad79e8a135d20aa8 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sun, 19 Mar 2023 21:03:24 +0000 Subject: [PATCH] add a test workflow for dotnet --- .github/workflows/msbuildnet6.yml | 63 +++++++++++++++++++ .../Region/ScriptEngine/Shared/LSL_Types.cs | 2 +- 2 files changed, 64 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/msbuildnet6.yml diff --git a/.github/workflows/msbuildnet6.yml b/.github/workflows/msbuildnet6.yml new file mode 100644 index 0000000000..024dcb2ed6 --- /dev/null +++ b/.github/workflows/msbuildnet6.yml @@ -0,0 +1,63 @@ +name: .msbuildnet6 + +on: + push: + branches: [ "dotnet6" ] + paths: + - '**.cs' + workflow_dispatch: + +jobs: + build: + if: github.repository == 'opensim/opensim' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + ref: dotnet6 + - name: shortsha + id: vars + run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)" + - name: preBuild + run: bash ${GITHUB_WORKSPACE}/runprebuild.sh + + - name: Setup dotnet + uses: actions/setup-dotnet@v3 + with: + dotnet-version: '6.0.x' + - name: Build + id: build + run: dotnet build --configuration Release OpenSim.sln + + - name: release + if: success() + run: zip -r LastDotNetBuild.zip bin ThirdPartyLicenses README.md CONTRIBUTORS.txt LICENSE.txt + - uses: softprops/action-gh-release@v1 + if: success() + with: + tag_name: r${{ steps.vars.outputs.sha_short }} + name: LastDotNetAutoBuild + files: LastDotNetBuild.zip + + - name: report push to irc + if: github.event_name == 'push' + uses: rectalogic/notify-irc@v1 + with: + channel: "#opensim-dev" + server: "irc.libera.chat" + nickname: osgithub + message: | + ${{ github.actor }} pushed to ${{ github.repository }} + ${{ join(github.event.commits.*.message, '\n') }} + dotnet compile: ${{ steps.build.conclusion }} + + - name: manual report to irc + if: github.event_name == 'workflow_dispatch' + uses: rectalogic/notify-irc@v1 + with: + channel: "#opensim-dev" + server: "irc.libera.chat" + nickname: osgithub + message: | + ${{ github.repository }} + dotnet compile: ${{ steps.build.conclusion }} diff --git a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs index 694b8fbc35..807773b9f0 100644 --- a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs +++ b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs @@ -943,7 +943,7 @@ namespace OpenSim.Region.ScriptEngine.Shared return (float)dov; if (o is LSL_Types.LSLString lso) return Convert.ToSingle(lso.m_string); - throw new InvalidCastException(@"LSL float expected but {o is not null ? o.GetType().Name : ""null"")} given"); + throw new InvalidCastException(string.Format($"LSL float expected but {0} given", o is not null ? o.GetType().Name : "null")); } public LSL_Types.LSLString GetLSLStringItem(int itemIndex)