Skip to content

chore: update build on dotnet to use release artifacts #135

chore: update build on dotnet to use release artifacts

chore: update build on dotnet to use release artifacts #135

Workflow file for this run

---
name: .NET Build
on:
push:
branches:
- main
paths:
- "dotnet-engine/**"
# Build in main if anything changes in yggdrasil or the ffi layer
- "unleash-yggdrasil/src/**.rs"
- "yggdrasilffi/src/**.rs"
pull_request:
branches:
- main
paths:
- "dotnet-engine/**"
jobs:
build-binaries:
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
- os: windows-latest
- os: macos-latest
steps:
- uses: actions/checkout@v4
- name: Install rust
run: |
rustup set auto-self-update disable
rustup toolchain install stable --profile default
rustup show
- name: Rust cache
uses: Swatinem/rust-cache@v2
- name: Build yggdrasilffi
run: |
cargo build -p yggdrasilffi --release
- name: Log yggdrasilffi build output (Linux/macOS)
if: runner.os != 'Windows'
run: |
echo "Listing yggdrasilffi build output:"
ls -la target/release
- name: Log yggdrasilffi build output (Windows)
if: runner.os == 'Windows'
run: |
echo "Listing yggdrasilffi build output:"
dir target\release
- name: Get client spec
uses: actions/checkout@v4
with:
repository: Unleash/client-specification
ref: v5.1.0
path: client-specification
- name: Set up .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: "6.0.x"
- name: Restore dependencies
run: |
cd dotnet-engine
dotnet restore dotnet-engine.sln
- name: Check formatting
run: |
cd dotnet-engine
dotnet format --verify-no-changes
- name: Build
run: |
cd dotnet-engine
dotnet build dotnet-engine.sln --configuration Release --no-restore
- name: Log .NET build output (Linux/macOS)
if: runner.os != 'Windows'
run: |
echo "Listing dotnet-engine build output:"
ls -la dotnet-engine/Yggdrasil.Engine/bin/Release/netstandard2.0
- name: Log .NET build output (Windows)
if: runner.os == 'Windows'
run: |
echo "Listing dotnet-engine build output:"
dir dotnet-engine\Yggdrasil.Engine\bin\Release\netstandard2.0
- name: Test
run: |
cd dotnet-engine/Yggdrasil.Engine.Tests
dotnet test --configuration Release --no-restore