Merge pull request #345 from betwixt-labs/cs-union-interface #275
Workflow file for this run
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: Bebop .NET Runtime | |
on: | |
workflow_dispatch: | |
push: | |
paths: | |
- "Runtime/C#/**" | |
pull_request: | |
paths: | |
- "Runtime/C#/**" | |
jobs: | |
build-runtime: | |
env: | |
TEST_ROOT: ${{github.workspace}}/Laboratory/C#/Test | |
RUNTIME_ROOT: ${{github.workspace}}/Runtime/C# | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Get Enviorment Variables | |
id: dotenv | |
uses: falti/[email protected] | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: | | |
8.0.x | |
9.0.x | |
dotnet-quality: 'preview' | |
- name: Generate Output.g.cs | |
working-directory: "./Laboratory/C#" | |
run: dotnet run --project ../../Compiler/ --include $(ls -p ../Schemas/Valid/*.bop | tr '\n' ' ') build --generator "cs:./GeneratedTestCode/Output.g.cs,namespace=Bebop.Codegen" | |
- name: Run Test .NET 8 | |
run: dotnet test -c Release -f net8.0 | |
working-directory: ${{env.TEST_ROOT}} | |
- name: Run Test .NET 9 | |
run: dotnet test -c Release -f net9.0 | |
working-directory: ${{env.TEST_ROOT}} | |
- name: Restore Project | |
run: dotnet restore | |
working-directory: ${{env.RUNTIME_ROOT}} | |
- name: Build Runtime | |
run: dotnet build -c Release -p:ReleaseVersion=${{ steps.dotenv.outputs.version }} | |
working-directory: ${{env.RUNTIME_ROOT}} | |
- name: Upload Package | |
uses: actions/upload-artifact@v4 | |
with: | |
name: bebop-runtime-cs-latest | |
path: ${{env.RUNTIME_ROOT}}/bin/Release/*.nupkg |