From 405e274f22beca254354b48c065b7271558b3256 Mon Sep 17 00:00:00 2001 From: FalloutFalcon <86381784+FalloutFalcon@users.noreply.github.com> Date: Tue, 14 Jan 2025 00:08:26 -0600 Subject: [PATCH] Adds a .NET 9 SDK setup action to linters (#3979) ## About The Pull Request https://github.com/tgstation/tgstation/pull/88988 --------- Co-authored-by: Mark Suckerberg --- .github/workflows/autowiki.yml | 125 ++++++++++--------- .github/workflows/ci_suite.yml | 35 +++--- .github/workflows/docker_publish.yml | 2 +- .github/workflows/generate_documentation.yml | 4 +- .github/workflows/make_changelogs.yml | 2 +- .github/workflows/rerun_flaky_tests.yml | 4 +- .github/workflows/run_integration_tests.yml | 14 +-- .github/workflows/update_tgs_dmapi.yml | 2 +- .tgs.yml | 2 +- dependencies.sh | 2 +- 10 files changed, 100 insertions(+), 92 deletions(-) diff --git a/.github/workflows/autowiki.yml b/.github/workflows/autowiki.yml index 10d3cea1e676..baeb57421361 100644 --- a/.github/workflows/autowiki.yml +++ b/.github/workflows/autowiki.yml @@ -1,7 +1,7 @@ name: Autowiki on: schedule: - - cron: "5 4 * * *" + - cron: "5 4 * * *" workflow_dispatch: permissions: @@ -11,74 +11,75 @@ jobs: autowiki: runs-on: ubuntu-latest steps: - - name: "Check for AUTOWIKI_USERNAME" - id: secrets_set - env: - ENABLER_SECRET: ${{ secrets.AUTOWIKI_USERNAME }} - run: | - unset SECRET_EXISTS - if [ -n "$ENABLER_SECRET" ]; then SECRET_EXISTS=true ; fi - echo "SECRETS_ENABLED=$SECRET_EXISTS" >> $GITHUB_OUTPUT + - name: "Check for AUTOWIKI_USERNAME" + id: secrets_set + env: + ENABLER_SECRET: ${{ secrets.AUTOWIKI_USERNAME }} + run: | + unset SECRET_EXISTS + if [ -n "$ENABLER_SECRET" ]; then SECRET_EXISTS=true ; fi + echo "SECRETS_ENABLED=$SECRET_EXISTS" >> $GITHUB_OUTPUT - - name: Checkout - if: steps.secrets_set.outputs.SECRETS_ENABLED - uses: actions/checkout@v3 + - name: Checkout + if: steps.secrets_set.outputs.SECRETS_ENABLED + uses: actions/checkout@v4 - - name: Setup BYOND cache - id: cache-byond - if: steps.secrets_set.outputs.SECRETS_ENABLED - uses: actions/cache@v3 - with: - path: ~/BYOND - key: ${{ runner.os }}-byond-cache-${{ secrets.CACHE_PURGE_KEY }}-${{ hashFiles('dependencies.sh') }} + - name: Setup BYOND cache + id: cache-byond + if: steps.secrets_set.outputs.SECRETS_ENABLED + uses: actions/cache@v4 + with: + path: ~/BYOND + key: ${{ runner.os }}-byond-cache-${{ secrets.CACHE_PURGE_KEY }}-${{ hashFiles('dependencies.sh') }}-${{ hashFiles('.github/workflows/autowiki.yml') }} - - name: Install BYOND - if: steps.cache-byond.outputs.cache-hit != 'true' && steps.secrets_set.outputs.SECRETS_ENABLED - run: bash tools/ci/install_byond.sh + - name: Install BYOND + if: steps.cache-byond.outputs.cache-hit != 'true' && steps.secrets_set.outputs.SECRETS_ENABLED + run: bash tools/ci/install_byond.sh - - name: Install runtime dependencies - if: steps.secrets_set.outputs.SECRETS_ENABLED - run: | - sudo dpkg --add-architecture i386 - sudo apt update || true - sudo apt install -o APT::Immediate-configure=false libssl-dev:i386 - bash tools/ci/install_rust_g.sh + - name: Install runtime dependencies + if: steps.secrets_set.outputs.SECRETS_ENABLED + run: | + sudo dpkg --add-architecture i386 + sudo apt update || true + sudo apt install -o APT::Immediate-configure=false libssl-dev:i386 libgcc-s1:i386 + bash tools/ci/install_rust_g.sh - - name: Cache dependencies - if: steps.secrets_set.outputs.SECRETS_ENABLED - uses: actions/cache@v3 - with: - path: ~/.byond/bin - key: ${{ runner.os }}-deps-cache-${{ secrets.CACHE_PURGE_KEY }}-${{ hashFiles('dependencies.sh') }} + - name: Cache dependencies + id: cache-deps + if: steps.secrets_set.outputs.SECRETS_ENABLED + uses: actions/cache@v4 + with: + path: ~/.byond/bin + key: ${{ runner.os }}-autowiki-deps-cache-${{ secrets.CACHE_PURGE_KEY }}-${{ hashFiles('dependencies.sh') }}-${{ hashFiles('.github/workflows/autowiki.yml') }} - - name: Install build dependencies - if: steps.cache-deps.outputs.cache-hit != 'true' && steps.secrets_set.outputs.SECRETS_ENABLED - run: | - sudo apt install -o APT::Immediate-Configure=false libgcc-s1:i386 g++-multilib zlib1g-dev:i386 - rustup target add i686-unknown-linux-gnu + - name: Install build dependencies + if: steps.cache-deps.outputs.cache-hit != 'true' && steps.secrets_set.outputs.SECRETS_ENABLED + run: | + sudo apt install -o APT::Immediate-Configure=false g++-multilib zlib1g-dev:i386 + rustup target add i686-unknown-linux-gnu - - name: Build auxmos - if: steps.cache-deps.outputs.cache-hit != 'true' && steps.secrets_set.outputs.SECRETS_ENABLED - run: bash tools/ci/build_auxmos.sh + - name: Build auxmos + if: steps.cache-deps.outputs.cache-hit != 'true' && steps.secrets_set.outputs.SECRETS_ENABLED + run: bash tools/ci/build_auxmos.sh - - name: Build rust-g - if: steps.cache-deps.outputs.cache-hit != 'true' && steps.secrets_set.outputs.SECRETS_ENABLED - run: bash tools/ci/build_rust_g.sh + - name: Build rust-g + if: steps.cache-deps.outputs.cache-hit != 'true' && steps.secrets_set.outputs.SECRETS_ENABLED + run: bash tools/ci/build_rust_g.sh - - name: Compile and generate Autowiki files - if: steps.secrets_set.outputs.SECRETS_ENABLED - run: | - bash tools/ci/install_byond.sh - source $HOME/BYOND/byond/bin/byondsetup - tools/build/build --ci autowiki + - name: Compile and generate Autowiki files + if: steps.secrets_set.outputs.SECRETS_ENABLED + run: | + bash tools/ci/install_byond.sh + source $HOME/BYOND/byond/bin/byondsetup + tools/build/build --ci autowiki - - name: Run Autowiki - if: steps.secrets_set.outputs.SECRETS_ENABLED - env: - USERNAME: ${{ secrets.AUTOWIKI_USERNAME }} - PASSWORD: ${{ secrets.AUTOWIKI_PASSWORD }} - run: | - cd tools/autowiki - npm install - cd ../.. - node tools/autowiki/autowiki.js data/autowiki_edits.txt data/autowiki_files/ + - name: Run Autowiki + if: steps.secrets_set.outputs.SECRETS_ENABLED + env: + USERNAME: ${{ secrets.AUTOWIKI_USERNAME }} + PASSWORD: ${{ secrets.AUTOWIKI_PASSWORD }} + run: | + cd tools/autowiki + npm install + cd ../.. + node tools/autowiki/autowiki.js data/autowiki_edits.txt data/autowiki_files/ diff --git a/.github/workflows/ci_suite.yml b/.github/workflows/ci_suite.yml index 568e19a20a88..cfb850bd16fc 100644 --- a/.github/workflows/ci_suite.yml +++ b/.github/workflows/ci_suite.yml @@ -32,14 +32,13 @@ jobs: timeout-minutes: 20 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: ref: master - - uses: actions/checkout@v3 - name: Restore SpacemanDMM cache id: cache-spacemandmm - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/dreamchecker key: ${{ runner.os }}-spacemandmm-cache-${{ secrets.CACHE_PURGE_KEY }}-${{ hashFiles('dependencies.sh') }} @@ -48,22 +47,24 @@ jobs: - name: Restore BYOND cache id: cache-byond - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/BYOND - key: ${{ runner.os }}-byond-cache-${{ secrets.CACHE_PURGE_KEY }}-${{ hashFiles('dependencies.sh') }} + key: ${{ runner.os }}-byond-cache-${{ secrets.CACHE_PURGE_KEY }}-${{ hashFiles('dependencies.sh') }}-${{ hashFiles('.github/workflows/ci_suite.yml') }} + - name: Install BYOND if: steps.cache-byond.outputs.cache-hit != 'true' run: bash tools/ci/install_byond.sh - name: Restore Yarn cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: tgui/.yarn/cache - key: ${{ runner.os }}-yarn-${{ secrets.CACHE_PURGE_KEY }}-${{ hashFiles('tgui/yarn.lock') }} + key: ${{ runner.os }}-yarn-${{ secrets.CACHE_PURGE_KEY }}-${{ hashFiles('tgui/yarn.lock') }}-${{ hashFiles('.github/workflows/ci_suite.yml') }} restore-keys: | - ${{ runner.os }}-build-${{ secrets.CACHE_PURGE_KEY }}- - ${{ runner.os }}-build- + ${{ runner.os }}-yarn-${{ secrets.CACHE_PURGE_KEY }}-${{ hashFiles('tgui/yarn.lock') }}- + ${{ runner.os }}-yarn-${{ secrets.CACHE_PURGE_KEY }}- + ${{ runner.os }}-yarn- ${{ runner.os }}- - name: Install Tools @@ -108,8 +109,13 @@ jobs: tools/bootstrap/python -m ci.check_regex --log-changes-only --github-actions cat check_regex_output.txt + - name: Setup .NET SDK + uses: actions/setup-dotnet@v4.2.0 + with: + dotnet-version: 9.x + - name: Install OpenDream - uses: robinraju/release-downloader@v1.9 + uses: robinraju/release-downloader@v1.11 with: repository: "OpenDreamProject/OpenDream" tag: "latest" @@ -134,7 +140,7 @@ jobs: uses: actions/cache@v3 with: path: ~/BYOND - key: ${{ runner.os }}-byond-cache-${{ secrets.CACHE_PURGE_KEY }}-${{ hashFiles('dependencies.sh') }} + key: ${{ runner.os }}-byond-cache-${{ secrets.CACHE_PURGE_KEY }}-${{ hashFiles('dependencies.sh') }}-${{ hashFiles('.github/workflows/ci_suite.yml') }} - name: Install BYOND if: steps.cache-byond.outputs.cache-hit != 'true' run: bash tools/ci/install_byond.sh @@ -187,10 +193,11 @@ jobs: uses: actions/cache@v3 with: path: tgui/.yarn/cache - key: ${{ runner.os }}-yarn-${{ secrets.CACHE_PURGE_KEY }}-${{ hashFiles('tgui/yarn.lock') }} + key: ${{ runner.os }}-yarn-${{ secrets.CACHE_PURGE_KEY }}-${{ hashFiles('tgui/yarn.lock') }}-${{ hashFiles('.github/workflows/ci_suite.yml') }} restore-keys: | - ${{ runner.os }}-build-${{ secrets.CACHE_PURGE_KEY }}- - ${{ runner.os }}-build- + ${{ runner.os }}-yarn-${{ secrets.CACHE_PURGE_KEY }}-${{ hashFiles('tgui/yarn.lock') }}- + ${{ runner.os }}-yarn-${{ secrets.CACHE_PURGE_KEY }}- + ${{ runner.os }}-yarn- ${{ runner.os }}- - name: Compile diff --git a/.github/workflows/docker_publish.yml b/.github/workflows/docker_publish.yml index 1d7c299831a2..65bccd871720 100644 --- a/.github/workflows/docker_publish.yml +++ b/.github/workflows/docker_publish.yml @@ -11,7 +11,7 @@ jobs: if: "!contains(github.event.head_commit.message, '[ci skip]')" runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Build and Publish Docker Image to Registry uses: elgohr/Publish-Docker-Github-Action@master diff --git a/.github/workflows/generate_documentation.yml b/.github/workflows/generate_documentation.yml index e987d05ad2a9..57362bd74f6d 100644 --- a/.github/workflows/generate_documentation.yml +++ b/.github/workflows/generate_documentation.yml @@ -23,9 +23,9 @@ jobs: url: ${{ steps.deployment.outputs.page_url }} runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Restore SpacemanDMM cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/SpacemanDMM key: ${{ runner.os }}-spacemandmm-${{ secrets.CACHE_PURGE_KEY }} diff --git a/.github/workflows/make_changelogs.yml b/.github/workflows/make_changelogs.yml index 1a30c8183e35..2d79d1c85e45 100644 --- a/.github/workflows/make_changelogs.yml +++ b/.github/workflows/make_changelogs.yml @@ -11,7 +11,7 @@ jobs: if: "!contains(github.event.head_commit.message, '[ci skip]')" steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 25 - name: Python setup diff --git a/.github/workflows/rerun_flaky_tests.yml b/.github/workflows/rerun_flaky_tests.yml index 317356dcee00..0e1b07ba33e1 100644 --- a/.github/workflows/rerun_flaky_tests.yml +++ b/.github/workflows/rerun_flaky_tests.yml @@ -16,7 +16,7 @@ jobs: if: ${{ github.event.workflow_run.conclusion == 'failure' && github.event.workflow_run.run_attempt == 1 }} steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Rerun flaky tests uses: actions/github-script@v6 with: @@ -28,7 +28,7 @@ jobs: if: ${{ github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.run_attempt == 2 }} steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Report flaky tests uses: actions/github-script@v6 with: diff --git a/.github/workflows/run_integration_tests.yml b/.github/workflows/run_integration_tests.yml index 699151fe6f99..b9db5633076f 100644 --- a/.github/workflows/run_integration_tests.yml +++ b/.github/workflows/run_integration_tests.yml @@ -28,14 +28,14 @@ jobs: - 3306 options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup BYOND cache id: cache-byond - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/BYOND - key: ${{ runner.os }}-byond-cache-${{ secrets.CACHE_PURGE_KEY }}-${{ hashFiles('dependencies.sh') }} + key: ${{ runner.os }}-byond-cache-${{ secrets.CACHE_PURGE_KEY }}-${{ hashFiles('dependencies.sh') }}-${{ hashFiles('.github/workflows/run_integration_tests.yml') }} - name: Install BYOND if: steps.cache-byond.outputs.cache-hit != 'true' @@ -45,19 +45,19 @@ jobs: run: | sudo dpkg --add-architecture i386 sudo apt update || true - sudo apt install -o APT::Immediate-Configure=false libssl-dev:i386 + sudo apt install -o APT::Immediate-Configure=false libssl-dev:i386 libgcc-s1:i386 - name: Setup dependencies cache id: cache-deps - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.byond/bin - key: ${{ runner.os }}-deps-cache-${{ secrets.CACHE_PURGE_KEY }}-${{ hashFiles('dependencies.sh') }} + key: ${{ runner.os }}-deps-cache-${{ secrets.CACHE_PURGE_KEY }}-${{ hashFiles('dependencies.sh') }}-${{ hashFiles('.github/workflows/run_integration_tests.yml') }} - name: Install build dependencies if: steps.cache-deps.outputs.cache-hit != 'true' run: | - sudo apt install -o APT::Immediate-Configure=false libgcc-s1:i386 g++-multilib zlib1g-dev:i386 + sudo apt install -o APT::Immediate-Configure=false g++-multilib zlib1g-dev:i386 rustup target add i686-unknown-linux-gnu - name: Build auxmos diff --git a/.github/workflows/update_tgs_dmapi.yml b/.github/workflows/update_tgs_dmapi.yml index 8aa77d0d6310..f014a93be9f1 100644 --- a/.github/workflows/update_tgs_dmapi.yml +++ b/.github/workflows/update_tgs_dmapi.yml @@ -11,7 +11,7 @@ jobs: name: Update the TGS DMAPI steps: - name: Clone - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Branch run: | diff --git a/.tgs.yml b/.tgs.yml index 76a53577b505..c29326d77603 100644 --- a/.tgs.yml +++ b/.tgs.yml @@ -3,7 +3,7 @@ version: 1 # The BYOND version to use (kept in sync with dependencies.sh by the "TGS Test Suite" CI job) # Must be interpreted as a string, keep quoted -byond: "515.1633" +byond: "515.1642" # Folders to create in "/Configuration/GameStaticFiles/" static_files: # Config directory should be static diff --git a/dependencies.sh b/dependencies.sh index b702df60dacd..88e2d7a6422d 100755 --- a/dependencies.sh +++ b/dependencies.sh @@ -5,7 +5,7 @@ # byond version export BYOND_MAJOR=515 -export BYOND_MINOR=1633 +export BYOND_MINOR=1642 #rust version export RUST_VERSION=1.73.0