Skip to content

Add support for seeking to arbitrary ticks #114

Add support for seeking to arbitrary ticks

Add support for seeking to arbitrary ticks #114

Workflow file for this run

name: .NET
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
- name: Build
run: dotnet build
- name: Cache demos
id: cache-demos
uses: actions/cache@v3
with:
path: demos
key: demos-${{ hashFiles('demos/download.sh') }}
- name: Download demos for integration test
if: steps.cache-demos.outputs.cache-hit != 'true'
working-directory: ./demos
run: ./download.sh
- name: Test
run: dotnet test
- name: Testing example projects with demo
working-directory: examples
run: |
dirs=($(find . -mindepth 1 -maxdepth 1 -type d))
for dir in "${dirs[@]}"; do
echo "Running example: $dir..."
dotnet run -v quiet -c Release --project "$dir" -- ../demos/navi-javelins-vs-9-pandas-fearless-m1-mirage.dem
done
- name: Benchmark
if: github.ref != 'refs/heads/main'
id: benchmark
continue-on-error: true
run: |
dotnet run -c Release --project src/DemoFile.Benchmark -- --exporters=github
- name: Comment on PR with benchmark results
if: github.ref != 'refs/heads/main' && steps.benchmark.conclusion == 'success'
uses: thollander/actions-comment-pull-request@v2
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
filePath: ./BenchmarkDotNet.Artifacts/results/DemoFile.Benchmark.DemoParserBenchmark-report-github.md
comment_tag: benchmark
deploy:
needs: [build]
if: github.ref == 'refs/heads/main'
name: Deploy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
- name: Pull version from package.json
working-directory: src/DemoFile
run: |
VERSION=$(nbgv get-version -f json | jq -r '.NuGetPackageVersion')
echo "Current package version: $VERSION"
echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "TAG=v$VERSION" >> $GITHUB_ENV
- uses: mukunku/tag-exists-action@v1.0.0
id: checkTag
with:
tag: ${{ env.TAG }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Ensure release notes are available
if: ${{ steps.checkTag.outputs.exists == 'false' }}
run: grep -Fxq "### $VERSION (`date -u '+%Y-%m-%d'`)" RELEASE_NOTES.md || exit 1
- name: Version package and tag
if: ${{ steps.checkTag.outputs.exists == 'false' }}
run: |
git config --global user.name 'GitHub Actions'
git config --global user.email 'github-actions@users.noreply.github.com'
git tag $TAG
git push origin $TAG
- name: Publish to NuGet
if: ${{ steps.checkTag.outputs.exists == 'false' }}
run: |
dotnet pack -c Release
dotnet nuget push src/DemoFile/bin/Release/*.nupkg --source "https://api.nuget.org/v3/index.json" --api-key ${{secrets.NUGET_APIKEY}}