Fix some collectability thresholds #197
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
push | |
env: | |
PLUGIN_REPO: WorkingRobot/MyDalamudPlugins | |
PROJECT_NAME: Craftimizer | |
IS_OFFICIAL: ${{true}} | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
DOTNET_CLI_TELEMETRY_OPTOUT: true | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: '8.0' | |
- name: Download Dalamud | |
run: | | |
wget https://goatcorp.github.io/dalamud-distrib/latest.zip | |
unzip latest.zip -d dalamud/ | |
echo "DALAMUD_HOME=$PWD/dalamud" >> $GITHUB_ENV | |
- name: Restore | |
run: | | |
dotnet restore -r win | |
- name: Build | |
run: | | |
dotnet build --configuration Release --no-restore | |
- name: Test | |
run: | | |
dotnet test --configuration Release --logger "trx;logfilename=results.trx" --logger "html;logfilename=results.html" --logger "console;verbosity=detailed" --no-build --results-directory="TestResults" | |
- name: Create Unofficial Builds | |
if: ${{env.IS_OFFICIAL}} | |
run: python ./.github/create_unofficial.py ${{env.PROJECT_NAME}} | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{env.PROJECT_NAME}} | |
path: ${{env.PROJECT_NAME}}/bin/x64/Release/${{env.PROJECT_NAME}} | |
if-no-files-found: error | |
- name: Upload Test Results | |
uses: actions/upload-artifact@v4 | |
if: ${{ !cancelled() }} | |
with: | |
name: TestResults | |
path: TestResults | |
- name: Create Release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
id: release | |
with: | |
files: ${{env.PROJECT_NAME}}/bin/x64/Release/${{env.PROJECT_NAME}}/* | |
- name: Trigger Plugin Repo Update | |
uses: peter-evans/repository-dispatch@v2 | |
if: ${{ steps.release.conclusion == 'success' }} | |
with: | |
token: ${{secrets.PAT}} | |
repository: ${{env.PLUGIN_REPO}} | |
event-type: new-release | |
bench: | |
runs-on: windows-latest | |
env: | |
DOTNET_CLI_TELEMETRY_OPTOUT: true | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: '8.0' | |
- name: Download Dalamud | |
run: | | |
Invoke-WebRequest -Uri https://goatcorp.github.io/dalamud-distrib/stg/latest.zip -OutFile latest.zip | |
Expand-Archive -Force latest.zip "$env:AppData\XIVLauncher\addon\Hooks\dev\" | |
- name: Restore | |
run: | | |
dotnet restore -r win | |
- name: Benchmark | |
run: | | |
dotnet run --configuration Release --project Benchmark -- -e json html github csv -f * -d -m | |
- name: Upload Test Results | |
uses: actions/upload-artifact@v4 | |
with: | |
name: BenchmarkResults | |
path: BenchmarkDotNet.Artifacts | |
- name: Cache Benchmark Data | |
uses: actions/cache@v4 | |
with: | |
path: ./bench-cache | |
key: ${{runner.os}}-${{ github.head_ref || github.ref_name }}-benchmark | |
- name: Publish Benchmarks | |
uses: rhysd/github-action-benchmark@v1 | |
with: | |
tool: benchmarkdotnet | |
output-file-path: BenchmarkDotNet.Artifacts/results/Craftimizer.Benchmark.Bench-report-full-compressed.json | |
external-data-json-path: ./bench-cache/external.json | |
github-token: ${{secrets.GITHUB_TOKEN}} | |
comment-always: true | |
alert-threshold: '150%' | |
alert-comment-cc-users: '@${{github.actor}}' |