From 36ad335ff874de74c4b29e9f40d1c23c01399cf1 Mon Sep 17 00:00:00 2001 From: Jordan Dominion Date: Mon, 29 Jan 2024 08:45:36 -0500 Subject: [PATCH 1/3] Update deprecated actions `cache` and `setup-dotnet` from @v3 to @v4 --- .github/workflows/ci-pipeline.yml | 42 ++++++++++++++--------------- .github/workflows/code-scanning.yml | 2 +- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/.github/workflows/ci-pipeline.yml b/.github/workflows/ci-pipeline.yml index cc033d61a7..fa2ec2ff20 100644 --- a/.github/workflows/ci-pipeline.yml +++ b/.github/workflows/ci-pipeline.yml @@ -97,7 +97,7 @@ jobs: sudo apt-get install -y -o APT::Immediate-Configure=0 libc6-i386 libstdc++6:i386 libgcc-s1:i386 - name: Cache BYOND .zips - uses: actions/cache@v3 + uses: actions/cache@v4 id: cache-byond with: path: ~/byond-zips-cache @@ -174,7 +174,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Setup dotnet - uses: actions/setup-dotnet@v3 + uses: actions/setup-dotnet@v4 with: dotnet-version: '${{ env.OD_DOTNET_VERSION }}.0.x' dotnet-quality: ${{ env.TGS_DOTNET_QUALITY }} @@ -214,7 +214,7 @@ jobs: if: (!(cancelled() || failure()) && needs.start-ci-run-gate.result == 'success') steps: - name: Setup dotnet - uses: actions/setup-dotnet@v3 + uses: actions/setup-dotnet@v4 with: dotnet-version: '${{ env.TGS_DOTNET_VERSION }}.0.x' dotnet-quality: ${{ env.TGS_DOTNET_QUALITY }} @@ -316,7 +316,7 @@ jobs: sudo apt-get install -y -o APT::Immediate-Configure=0 libc6-i386 libstdc++6:i386 libgcc-s1:i386 - name: Setup dotnet - uses: actions/setup-dotnet@v3 + uses: actions/setup-dotnet@v4 with: dotnet-version: '${{ env.TGS_DOTNET_VERSION }}.0.x' dotnet-quality: ${{ env.TGS_DOTNET_QUALITY }} @@ -338,7 +338,7 @@ jobs: run: dotnet build -c ${{ matrix.configuration }}NoWindows - name: Cache BYOND .zips - uses: actions/cache@v3 + uses: actions/cache@v4 id: cache-byond with: path: ~/byond-zips-cache @@ -367,7 +367,7 @@ jobs: runs-on: windows-latest steps: - name: Setup dotnet - uses: actions/setup-dotnet@v3 + uses: actions/setup-dotnet@v4 with: dotnet-version: '${{ env.TGS_DOTNET_VERSION }}.0.x' dotnet-quality: ${{ env.TGS_DOTNET_QUALITY }} @@ -389,7 +389,7 @@ jobs: run: dotnet build -c ${{ matrix.configuration }}NoWix - name: Cache BYOND .zips - uses: actions/cache@v3 + uses: actions/cache@v4 id: cache-byond with: path: ~/byond-zips-cache @@ -424,7 +424,7 @@ jobs: sqlcmd -l 600 -S "(localdb)\MSSQLLocalDB" -Q "SELECT @@VERSION;" - name: Setup dotnet - uses: actions/setup-dotnet@v3 + uses: actions/setup-dotnet@v4 with: dotnet-version: | ${{ env.TGS_DOTNET_VERSION }}.0.x @@ -504,7 +504,7 @@ jobs: run: dotnet build -c ${{ matrix.configuration }} tests/Tgstation.Server.Tests/Tgstation.Server.Tests.csproj - name: Cache BYOND .zips - uses: actions/cache@v3 + uses: actions/cache@v4 id: cache-byond with: path: ~/byond-zips-cache @@ -656,7 +656,7 @@ jobs: sudo apt-get install -y -o APT::Immediate-Configure=0 libc6-i386 libstdc++6:i386 gdb libgcc-s1:i386 - name: Setup dotnet - uses: actions/setup-dotnet@v3 + uses: actions/setup-dotnet@v4 with: dotnet-version: | ${{ env.TGS_DOTNET_VERSION }}.0.x @@ -709,7 +709,7 @@ jobs: run: dotnet build -c ${{ matrix.configuration }}NoWindows tests/Tgstation.Server.Tests/Tgstation.Server.Tests.csproj - name: Cache BYOND .zips - uses: actions/cache@v3 + uses: actions/cache@v4 id: cache-byond with: path: ~/byond-zips-cache @@ -1072,7 +1072,7 @@ jobs: sudo apt-get install -y dotnet-sdk-${{ env.TGS_DOTNET_VERSION }}.0 - name: Setup dotnet - uses: actions/setup-dotnet@v3 + uses: actions/setup-dotnet@v4 with: dotnet-version: '${{ env.TGS_DOTNET_VERSION }}.0.x' dotnet-quality: ${{ env.TGS_DOTNET_QUALITY }} @@ -1162,7 +1162,7 @@ jobs: GITHUB_TOKEN: ${{ env.WINGET_PUSH_TOKEN }} - name: Setup dotnet - uses: actions/setup-dotnet@v3 + uses: actions/setup-dotnet@v4 with: dotnet-version: '${{ env.TGS_DOTNET_VERSION }}.0.x' dotnet-quality: ${{ env.TGS_DOTNET_QUALITY }} @@ -1288,7 +1288,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Setup dotnet - uses: actions/setup-dotnet@v3 + uses: actions/setup-dotnet@v4 with: dotnet-version: '${{ env.TGS_DOTNET_VERSION }}.0.x' dotnet-quality: ${{ env.TGS_DOTNET_QUALITY }} @@ -1343,7 +1343,7 @@ jobs: if: (!(cancelled() || failure()) && needs.deployment-gate.result == 'success' && contains(github.event.head_commit.message, '[APIDeploy]')) steps: - name: Setup dotnet - uses: actions/setup-dotnet@v3 + uses: actions/setup-dotnet@v4 with: dotnet-version: '${{ env.TGS_DOTNET_VERSION }}.0.x' dotnet-quality: ${{ env.TGS_DOTNET_QUALITY }} @@ -1407,7 +1407,7 @@ jobs: if: (!(cancelled() || failure()) && needs.deployment-gate.result == 'success' && contains(github.event.head_commit.message, '[DMDeploy]')) steps: - name: Setup dotnet - uses: actions/setup-dotnet@v3 + uses: actions/setup-dotnet@v4 with: dotnet-version: '${{ env.TGS_DOTNET_VERSION }}.0.x' dotnet-quality: ${{ env.TGS_DOTNET_QUALITY }} @@ -1470,7 +1470,7 @@ jobs: if: (!(cancelled() || failure()) && needs.deployment-gate.result == 'success' && contains(github.event.head_commit.message, '[NugetDeploy]')) steps: - name: Setup dotnet - uses: actions/setup-dotnet@v3 + uses: actions/setup-dotnet@v4 with: dotnet-version: '${{ env.TGS_DOTNET_VERSION }}.0.x' dotnet-quality: ${{ env.TGS_DOTNET_QUALITY }} @@ -1521,7 +1521,7 @@ jobs: if: (!(cancelled() || failure()) && (needs.deploy-dm.result == 'success' || needs.deploy-http.result == 'success') && !contains(github.event.head_commit.message, '[TGSDeploy]')) steps: - name: Setup dotnet - uses: actions/setup-dotnet@v3 + uses: actions/setup-dotnet@v4 with: dotnet-version: '${{ env.TGS_DOTNET_VERSION }}.0.x' dotnet-quality: ${{ env.TGS_DOTNET_QUALITY }} @@ -1545,7 +1545,7 @@ jobs: if: (!(cancelled() || failure()) && needs.deployment-gate.result == 'success' && github.event.ref == 'refs/heads/master' && contains(github.event.head_commit.message, '[TGSDeploy]')) steps: - name: Setup dotnet - uses: actions/setup-dotnet@v3 + uses: actions/setup-dotnet@v4 with: dotnet-version: '${{ env.TGS_DOTNET_VERSION }}.0.x' dotnet-quality: ${{ env.TGS_DOTNET_QUALITY }} @@ -1757,7 +1757,7 @@ jobs: if: (!(cancelled() || failure()) && needs.deploy-tgs.result == 'success') steps: - name: Setup dotnet - uses: actions/setup-dotnet@v3 + uses: actions/setup-dotnet@v4 with: dotnet-version: '${{ env.TGS_DOTNET_VERSION }}.0.x' dotnet-quality: ${{ env.TGS_DOTNET_QUALITY }} @@ -1845,7 +1845,7 @@ jobs: runs-on: windows-latest steps: - name: Setup dotnet - uses: actions/setup-dotnet@v3 + uses: actions/setup-dotnet@v4 with: dotnet-version: '${{ env.TGS_DOTNET_VERSION }}.0.x' dotnet-quality: ${{ env.TGS_DOTNET_QUALITY }} diff --git a/.github/workflows/code-scanning.yml b/.github/workflows/code-scanning.yml index b661059144..f533584ce5 100644 --- a/.github/workflows/code-scanning.yml +++ b/.github/workflows/code-scanning.yml @@ -29,7 +29,7 @@ jobs: if: ${{ vars.TGS_ENABLE_CODE_QL }} == 'true' steps: - name: Setup dotnet - uses: actions/setup-dotnet@v3 + uses: actions/setup-dotnet@v4 with: dotnet-version: '${{ env.TGS_DOTNET_VERSION }}.0.x' dotnet-quality: ${{ env.TGS_DOTNET_QUALITY }} From ba59184f75378b8ea564aaa118ba178e778f170e Mon Sep 17 00:00:00 2001 From: Jordan Dominion Date: Mon, 29 Jan 2024 08:57:27 -0500 Subject: [PATCH 2/3] Make tests install proper OD dotnet versions --- .github/workflows/ci-pipeline.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-pipeline.yml b/.github/workflows/ci-pipeline.yml index fa2ec2ff20..b3bb0dd220 100644 --- a/.github/workflows/ci-pipeline.yml +++ b/.github/workflows/ci-pipeline.yml @@ -37,7 +37,8 @@ on: env: TGS_DOTNET_VERSION: 8 - OD_DOTNET_VERSION: 7 + OD_MIN_COMPAT_DOTNET_VERSION: 7 + OD_DOTNET_VERSION: 8 TGS_DOTNET_QUALITY: ga TGS_TEST_GITHUB_TOKEN: ${{ secrets.LIVE_TESTS_TOKEN }} TGS_RELEASE_NOTES_TOKEN: ${{ secrets.DEV_PUSH_TOKEN }} @@ -175,10 +176,18 @@ jobs: steps: - name: Setup dotnet uses: actions/setup-dotnet@v4 + if: matrix.committish == 'master' with: dotnet-version: '${{ env.OD_DOTNET_VERSION }}.0.x' dotnet-quality: ${{ env.TGS_DOTNET_QUALITY }} + - name: Setup dotnet (min-compat) + uses: actions/setup-dotnet@v4 + if: matrix.committish == 'tgs-min-compat' + with: + dotnet-version: '${{ env.OD_MIN_COMPAT_DOTNET_VERSION }}.0.x' + dotnet-quality: ${{ env.TGS_DOTNET_QUALITY }} + - name: Checkout (Branch) uses: actions/checkout@v4 if: github.event_name == 'push' || github.event_name == 'schedule' @@ -429,6 +438,7 @@ jobs: dotnet-version: | ${{ env.TGS_DOTNET_VERSION }}.0.x ${{ env.OD_DOTNET_VERSION }}.0.x + ${{ env.OD_MIN_COMPAT_DOTNET_VERSION }}.0.x dotnet-quality: ${{ env.TGS_DOTNET_QUALITY }} - name: Set TGS_TEST_DUMP_API_SPEC @@ -661,6 +671,7 @@ jobs: dotnet-version: | ${{ env.TGS_DOTNET_VERSION }}.0.x ${{ env.OD_DOTNET_VERSION }}.0.x + ${{ env.OD_MIN_COMPAT_DOTNET_VERSION }}.0.x dotnet-quality: ${{ env.TGS_DOTNET_QUALITY }} - name: Set Sqlite Connection Info From 7add890f4d6574f5aeee8481fa57481ac27ca631 Mon Sep 17 00:00:00 2001 From: Jordan Dominion Date: Mon, 29 Jan 2024 08:58:48 -0500 Subject: [PATCH 3/3] Update CONTRIBUTING.md with info about .NET 7.0 SDK requirement --- .github/CONTRIBUTING.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 0dee22f9b4..1dd8c6e4d7 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -42,7 +42,8 @@ In order to build the service version and/or the Windows installer you need a to In addition, the installer project uses the Wix v4 Toolset which will cause an error on loading the .sln in Visual Studio if the [HeatWave for VS2022 Extension](https://marketplace.visualstudio.com/items?itemName=FireGiant.FireGiantHeatWaveDev17) is not installed. -In order to run the integration tests you must have the following environment variables set. To run them more accurately, include the optional ones. +In order to run the integration tests you must have the dotnet 7.0 SDK installed to properly build the OpenDream minimum compatible version. +You must also have the following environment variables set. To run them more accurately, include the optional ones. - `TGS_TEST_DATABASE_TYPE`: `MySql`, `MariaDB`, `PostgresSql`, or `SqlServer`. - `TGS_TEST_CONNECTION_STRING`: To a valid database connection string. You can use the setup wizard to create one. - (Optional) `TGS_TEST_GITHUB_TOKEN`: A GitHub personal access token with no scopes used to bypass rate limits.