Merge branch 'dev' into 1458-AddMapThreadsParam

This commit is contained in:
Jordan Dominion
2023-06-20 19:37:25 -04:00
59 changed files with 1359 additions and 450 deletions
@@ -16,7 +16,7 @@ concurrency:
jobs:
approve-pr-if-dominion-is-author:
name: Approve PR if Dominion is Author
if: github.event.pull_request.user.login == 'Cyberboss' && (github.event.pull_request.base.repo.owner.login == 'tgstation' || github.event.pull_request.base.repo.owner.login == 'Cyberboss')
if: github.event.pull_request.user.login == 'Cyberboss' && !github.event.pull_request.draft && (github.event.pull_request.base.repo.owner.login == 'tgstation' || github.event.pull_request.base.repo.owner.login == 'Cyberboss')
runs-on: ubuntu-latest
steps:
- name: GitHub API Call
+118 -34
View File
@@ -230,9 +230,6 @@ jobs:
with:
ref: "refs/pull/${{ github.event.number }}/merge"
- name: Upgrade NPM
run: sudo npm install -g npm
- name: Build
run: dotnet build -c ${{ matrix.configuration }}NoService
@@ -273,9 +270,6 @@ jobs:
with:
ref: "refs/pull/${{ github.event.number }}/merge"
- name: Upgrade NPM
run: npm install -g npm
- name: Build
run: dotnet build -c ${{ matrix.configuration }}
@@ -312,9 +306,6 @@ jobs:
with:
dotnet-version: ${{ env.TGS_DOTNET_VERSION }}
- name: Upgrade NPM
run: npm install -g npm
- name: Set TGS_TEST_DUMP_API_SPEC
if: ${{ matrix.configuration == 'Release' && matrix.watchdog-type == 'System' && matrix.database-type == 'SqlServer' }}
run: echo "TGS_TEST_DUMP_API_SPEC=yes" >> $Env:GITHUB_ENV
@@ -489,14 +480,6 @@ jobs:
sudo apt-get update
sudo apt-get install -y -o APT::Immediate-Configure=0 libc6-i386 libstdc++6:i386 gdb libgcc-s1:i386
- name: Install Node 12.X
uses: actions/setup-node@v3
with:
node-version: 12.x
- name: Upgrade NPM
run: npm install -g npm
- name: Setup dotnet
uses: actions/setup-dotnet@v2
with:
@@ -601,11 +584,6 @@ jobs:
if: "!(cancelled() || failure()) && needs.windows-integration-test.result == 'success'"
runs-on: ubuntu-latest
steps:
- name: Install Node 12.X
uses: actions/setup-node@v3
with:
node-version: 12.x
- name: Install IBM OpenAPI Validator
run: npm i -g ibm-openapi-validator@0.51.3
@@ -884,11 +862,65 @@ jobs:
directory: ./code_coverage
fail_ci_if_error: true
build-deb:
name: Build .deb Package
needs: start-ci-run-gate
runs-on: ubuntu-latest
if: "!(cancelled() || failure()) && needs.start-ci-run-gate.result == 'success'"
strategy:
fail-fast: false
matrix:
arch: [ 'amd64' ] # Can't do i386 due to https://github.com/dotnet/core/issues/4595
steps:
- name: Import GPG Key
run: |
sudo apt-get update
sudo apt-get install -y gnupg2
echo "${{ secrets.PACKAGING_PRIVATE_KEY }}" > private.pgp
echo ${{ secrets.PACKAGING_PRIVATE_KEY_PASSPHRASE }} | gpg --batch --yes --passphrase-fd 0 --import private.pgp
rm private.pgp
- name: Checkout
uses: actions/checkout@v3
- name: Execute Build Script
env:
PACKAGING_PRIVATE_KEY_PASSPHRASE: ${{ secrets.PACKAGING_PRIVATE_KEY_PASSPHRASE }}
run: sudo -E build/package/deb/build_package.sh
- name: Parse TGS version
run: |
echo "TGS_VERSION=$(xmlstarlet sel -N X="http://schemas.microsoft.com/developer/msbuild/2003" --template --value-of /X:Project/X:PropertyGroup/X:TgsCoreVersion build/Version.props)" >> $GITHUB_ENV
- name: Validate .dsc Signature
run: gpg --verify tgstation-server_${{ env.TGS_VERSION }}-1.dsc
- name: Upload .deb Artifact
uses: actions/upload-artifact@v3
with:
name: package-deb-${{ matrix.arch }}
path: tgstation-server_${{ env.TGS_VERSION }}-1_${{ matrix.arch }}.deb
- name: Upload .dsc Artifact
uses: actions/upload-artifact@v3
with:
name: package-dsc
path: tgstation-server_${{ env.TGS_VERSION }}-1.dsc
deployment-gate:
name: Deployment Gate
needs: [ dox-build, docker-build, build-deb, validate-openapi-spec, upload-code-coverage ]
runs-on: ubuntu-latest
if: "!(cancelled() || failure()) && needs.dox-build.result == 'success' && needs.docker-build.result == 'success' && needs.build-deb.result == 'success' && needs.validate-openapi-spec.result == 'success' && needs.upload-code-coverage.result == 'success' && github.event_name == 'push'"
steps:
- name: GitHub Requires at Least One Step for a Job
run: exit 0
deploy-http:
name: Deploy HTTP API
needs: [upload-code-coverage, validate-openapi-spec]
needs: deployment-gate
runs-on: windows-latest
if: "!(cancelled() || failure()) && needs.upload-code-coverage.result == 'success' && github.event_name != 'schedule' && needs.validate-openapi-spec.result == 'success' && github.event_name == 'push' && contains(github.event.head_commit.message, '[APIDeploy]')"
if: "!(cancelled() || failure()) && needs.deployment-gate.result == 'success' && github.event_name == 'push' && contains(github.event.head_commit.message, '[APIDeploy]')"
steps:
- name: Checkout
uses: actions/checkout@v3
@@ -929,9 +961,9 @@ jobs:
deploy-dm:
name: Deploy DreamMaker API
needs: [upload-code-coverage, validate-openapi-spec]
needs: deployment-gate
runs-on: windows-latest
if: "!(cancelled() || failure()) && needs.upload-code-coverage.result == 'success' && github.event_name != 'schedule' && needs.validate-openapi-spec.result == 'success' && github.event_name == 'push' && contains(github.event.head_commit.message, '[DMDeploy]')"
if: "!(cancelled() || failure()) && needs.deployment-gate.result == 'success' && github.event_name == 'push' && contains(github.event.head_commit.message, '[DMDeploy]')"
steps:
- name: Checkout
uses: actions/checkout@v3
@@ -971,9 +1003,9 @@ jobs:
deploy-client:
name: Deploy Nuget Packages
needs: [upload-code-coverage, validate-openapi-spec]
needs: deployment-gate
runs-on: ubuntu-latest
if: "!(cancelled() || failure()) && needs.upload-code-coverage.result == 'success' && github.event_name != 'schedule' && needs.validate-openapi-spec.result == 'success' && github.event_name == 'push' && contains(github.event.head_commit.message, '[NugetDeploy]')"
if: "!(cancelled() || failure()) && needs.upload-code-coverage.result == 'success' && needs.validate-openapi-spec.result == 'success' && github.event_name == 'push' && contains(github.event.head_commit.message, '[NugetDeploy]')"
steps:
- name: Setup dotnet
uses: actions/setup-dotnet@v2
@@ -1011,7 +1043,7 @@ jobs:
name: Ensure TGS Release is Latest GitHub Release
needs: [deploy-dm, deploy-http]
runs-on: ubuntu-latest
if: "!(cancelled() || failure()) && github.event_name != 'schedule' && (needs.deploy-dm.result == 'success' || needs.deploy-http.result == 'success') && !contains(github.event.head_commit.message, '[TGSDeploy]')"
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@v2
@@ -1026,9 +1058,9 @@ jobs:
deploy-tgs:
name: Deploy TGS
needs: [deploy-dm, deploy-http, upload-code-coverage, validate-openapi-spec]
needs: [deploy-dm, deploy-http, deployment-gate]
runs-on: windows-latest
if: "!(cancelled() || failure()) && github.event_name != 'schedule' && (needs.upload-code-coverage.result == 'success' || needs.validate-openapi-spec.result == 'success') && github.event_name == 'push' && github.event.ref == 'refs/heads/master' && contains(github.event.head_commit.message, '[TGSDeploy]')"
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@v2
@@ -1069,6 +1101,18 @@ jobs:
name: openapi-spec
path: swagger
- name: Retrieve amd64 .deb
uses: actions/download-artifact@v3
with:
name: package-deb-amd64
path: package-deb-amd64
- name: Retrieve .dsc
uses: actions/download-artifact@v3
with:
name: package-dsc
path: package-dsc
- name: Zip Artifacts
shell: powershell
run: |
@@ -1076,6 +1120,7 @@ jobs:
&"C:/Program Files/7-Zip/7z.exe" a ServerService.zip ./ServerService/* -tzip
&"C:/Program Files/7-Zip/7z.exe" a ServerConsole.zip ./ServerConsole/* -tzip
&"C:/Program Files/7-Zip/7z.exe" a ServerUpdatePackage.zip ./ServerUpdatePackage/* -tzip
&"C:/Program Files/7-Zip/7z.exe" a ServerUpdatePackage.zip ./ServerUpdatePackage/* -tzip
- name: Generate Release Notes
run: dotnet run -c Release --project tools/ReleaseNotes ${{ env.TGS_VERSION }}
@@ -1137,14 +1182,34 @@ jobs:
GITHUB_TOKEN: ${{ secrets.DEV_PUSH_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./ServerUpdatePackage.zip
asset_path: ./package-deb-amd64/ServerUpdatePackage.zip
asset_name: ServerUpdatePackage.zip
asset_content_type: application/zip
- name: Upload amd64 .deb Artifact
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.DEV_PUSH_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./package-deb-amd64/tgstation-server_${{ env.TGS_VERSION }}-1_amd64.deb
asset_name: tgstation-server_${{ env.TGS_VERSION }}-1_amd64.deb
asset_content_type: application/vnd.debian.binary-package
- name: Upload .dsc Artifact
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.DEV_PUSH_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./package-dsc/tgstation-server_${{ env.TGS_VERSION }}-1.dsc
asset_name: tgstation-server_${{ env.TGS_VERSION }}-1.dsc
asset_content_type: application/octet-stream
deploy-docker:
name: Deploy TGS (Docker)
needs: [deploy-tgs]
if: "!(cancelled() || failure()) && github.event_name != 'schedule' && needs.deploy-tgs.result == 'success'"
needs: deploy-tgs
if: "!(cancelled() || failure()) && needs.deploy-tgs.result == 'success'"
runs-on: ubuntu-latest
steps:
- name: Checkout
@@ -1164,3 +1229,22 @@ jobs:
password: ${{ secrets.DOCKER_PASSWORD }}
dockerfile: build/Dockerfile
tags: "latest,v${{ env.TGS_VERSION }}"
deploy-ppa:
name: Deploy TGS (PPA)
needs: deploy-tgs
if: "!(cancelled() || failure()) && needs.deploy-tgs.result == 'success'"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Parse TGS version
run: |
sudo apt-get update
sudo apt-get install -y xmlstarlet
echo "TGS_VERSION=$(xmlstarlet sel -N X="http://schemas.microsoft.com/developer/msbuild/2003" --template --value-of /X:Project/X:PropertyGroup/X:TgsCoreVersion build/Version.props)" >> $GITHUB_ENV
- name: Trigger tgstation-ppa workflow
run: |
curl -XPOST -u "${{ secrets.DEV_PUSH_USERNAME }}:${{ secrets.DEV_PUSH_TOKEN }}" -H "Accept: application/vnd.github.everest-preview+json" -H "Content-Type: application/json" https://api.github.com/repos/tgstation/tgstation-ppa/actions/workflows/add_tgs_version.yml/dispatches --data '{"ref":"main","inputs":{"tgs_semver": "${{ env.TGS_VERSION }}"}}'
+2 -10
View File
@@ -26,14 +26,6 @@ jobs:
security-events: write
if: ${{ vars.TGS_ENABLE_CODE_QL }} == 'true'
steps:
- name: Install Node 12.X
uses: actions/setup-node@v3
with:
node-version: 12.x
- name: Upgrade NPM
run: npm install -g npm
- name: Checkout
uses: actions/checkout@v3
@@ -42,8 +34,8 @@ jobs:
with:
languages: csharp
- name: Autobuild
uses: github/codeql-action/autobuild@v2
- name: Build
run: dotnet build -c ReleaseNoService
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2