Store header values as strings to prevent multiple conversions #110
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 Commit | |
on: | |
push: | |
paths: | |
- ".github/workflows/build-commit.yml" | |
- "benchmarks/**" | |
- "src/**" | |
- "tests/**" | |
- "HyperSharp.sln" | |
workflow_dispatch: | |
env: | |
DOTNET_NOLOGO: 1 | |
DOTNET_CLI_TELEMETRY_OPTOUT: 1 | |
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 | |
DOTNET_SYSTEM_GLOBALIZATION_INVARIANT: 1 | |
jobs: | |
build_commit: | |
name: Build Commit | |
runs-on: self-hosted | |
if: "!contains(format('{0} {1}', github.event.head_commit.message, github.event.pull_request.title), '[ci-skip]')" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: | | |
8 | |
7 | |
- name: Build Project | |
run: dotnet build | |
test_commit: | |
name: Test Commit | |
runs-on: self-hosted | |
needs: build_commit | |
steps: | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: | | |
8 | |
7 | |
- name: Test Project | |
run: dotnet test | |
benchmark_commit: | |
name: Benchmark Commit | |
runs-on: self-hosted | |
needs: test_commit | |
permissions: | |
contents: write | |
steps: | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: | | |
8 | |
7 | |
- name: Benchmark Project | |
run: dotnet run -c Release --project benchmarks/HyperSharp.Benchmarks.csproj --framework net8.0 | |
- name: Output Test Results | |
id: test-results | |
run: | | |
body="$(cat benchmark-results.md)" | |
delimiter="$(openssl rand -hex 8)" | |
echo "body<<$delimiter" >> $GITHUB_OUTPUT | |
echo "$body" >> $GITHUB_OUTPUT | |
echo "$delimiter" >> $GITHUB_OUTPUT | |
- name: Comment Results | |
uses: peter-evans/commit-comment@v2 | |
with: | |
body: ${{ steps.test-results.outputs.body }} | |
token: ${{ secrets.GITHUB_TOKEN }} |