Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 34 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ jobs:
uses: peacefulstudio/github-actions/.github/workflows/csharp-ci.yaml@v2
with:
dotnet-version: '10.0.x'
artifact-prefix: csharp
build-matrix: >-
[{"name":"ubuntu-amd64","runner":"ubuntu-latest","coverage":true},
{"name":"ubuntu-arm64","runner":"ubuntu-24.04-arm","coverage":false},
Expand All @@ -23,15 +24,47 @@ jobs:
{"name":"macos-arm64","runner":"macos-latest","coverage":false},
{"name":"macos-amd64","runner":"macos-15-intel","coverage":false}]

badges:
needs: [csharp-ci, jvm-helper-ci, assemble-badge-data]
if: ${{ github.ref == 'refs/heads/main' && !cancelled() }}
permissions:
contents: write
uses: peacefulstudio/github-actions/.github/workflows/update-badges.yaml@v2
with:
coverage-data: >-
[{"slug":"csharp","label":"coverage (C#)","percent":"${{ needs.csharp-ci.outputs.coverage }}"},
{"slug":"scala","label":"coverage (Scala)","percent":"${{ needs.jvm-helper-ci.outputs.coverage }}"}]
matrix-data: ${{ needs.assemble-badge-data.outputs.matrix-data }}

jvm-helper-ci:
uses: peacefulstudio/github-actions/.github/workflows/scala-ci.yaml@v2
with:
working-directory: jvm-helper
artifact-prefix: scala
# No windows-arm64 shard: Maven Central publishes no windows-aarch_64 protoc
# binary at any version, so sbt-protoc cannot resolve a compiler there.
build-matrix: >-
[{"name":"ubuntu-amd64","runner":"ubuntu-latest","coverage":false},
[{"name":"ubuntu-amd64","runner":"ubuntu-latest","coverage":true},
{"name":"ubuntu-arm64","runner":"ubuntu-24.04-arm","coverage":false},
{"name":"windows-amd64","runner":"windows-latest","coverage":false},
{"name":"macos-arm64","runner":"macos-latest","coverage":false},
{"name":"macos-amd64","runner":"macos-15-intel","coverage":false}]

assemble-badge-data:
needs: [csharp-ci, jvm-helper-ci]
if: ${{ github.ref == 'refs/heads/main' && !cancelled() }}
runs-on: ubuntu-latest
outputs:
matrix-data: ${{ steps.merge.outputs.matrix-data }}
steps:
- name: Merge matrix-status by language
id: merge
env:
CSHARP_STATUS: ${{ needs.csharp-ci.outputs.matrix-status }}
SCALA_STATUS: ${{ needs.jvm-helper-ci.outputs.matrix-status }}
run: |
set -euo pipefail
csharp="$(jq -c '[.[] + {lang:"csharp"}]' <<<"${CSHARP_STATUS:-[]}")"
scala="$(jq -c '[.[] + {lang:"scala"}]' <<<"${SCALA_STATUS:-[]}")"
merged="$(jq -cn --argjson a "$csharp" --argjson b "$scala" '$a + $b')"
echo "matrix-data=$merged" >> "$GITHUB_OUTPUT"
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,37 @@
# Daml C# Code Generator

[![CI](https://github.com/peacefulstudio/daml-codegen-csharp/actions/workflows/ci.yaml/badge.svg)](https://github.com/peacefulstudio/daml-codegen-csharp/actions/workflows/ci.yaml)
[![Release](https://img.shields.io/github/v/release/peacefulstudio/daml-codegen-csharp?label=latest%20stable)](https://github.com/peacefulstudio/daml-codegen-csharp/releases/latest)
[![latest preview](https://img.shields.io/github/v/release/peacefulstudio/daml-codegen-csharp?include_prereleases&label=latest%20preview)](https://github.com/peacefulstudio/daml-codegen-csharp/releases)
[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![.NET](https://img.shields.io/badge/.NET-10.0-white.svg)](https://dotnet.microsoft.com/)

Generates strongly-typed C# from Daml `.dar` archives so .NET applications can
talk to a Canton/Daml ledger with full type safety.

## Platform Support

CI builds and tests on every supported OS × architecture. Each badge reflects the latest `main` run.

**C# (`Daml.Codegen.CSharp`)**

| Ubuntu | Windows | macOS |
|---|---|---|
| [![ubuntu amd64](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/peacefulstudio/daml-codegen-csharp/badges/ci-csharp-ubuntu-amd64.json)](https://github.com/peacefulstudio/daml-codegen-csharp/actions/workflows/ci.yaml) | [![windows amd64](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/peacefulstudio/daml-codegen-csharp/badges/ci-csharp-windows-amd64.json)](https://github.com/peacefulstudio/daml-codegen-csharp/actions/workflows/ci.yaml) | [![macos amd64](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/peacefulstudio/daml-codegen-csharp/badges/ci-csharp-macos-amd64.json)](https://github.com/peacefulstudio/daml-codegen-csharp/actions/workflows/ci.yaml) |
| [![ubuntu arm64](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/peacefulstudio/daml-codegen-csharp/badges/ci-csharp-ubuntu-arm64.json)](https://github.com/peacefulstudio/daml-codegen-csharp/actions/workflows/ci.yaml) | [![windows arm64](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/peacefulstudio/daml-codegen-csharp/badges/ci-csharp-windows-arm64.json)](https://github.com/peacefulstudio/daml-codegen-csharp/actions/workflows/ci.yaml) | [![macos arm64](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/peacefulstudio/daml-codegen-csharp/badges/ci-csharp-macos-arm64.json)](https://github.com/peacefulstudio/daml-codegen-csharp/actions/workflows/ci.yaml) |

**Scala/JVM helper**

| Ubuntu | Windows | macOS |
|---|---|---|
| [![ubuntu amd64](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/peacefulstudio/daml-codegen-csharp/badges/ci-scala-ubuntu-amd64.json)](https://github.com/peacefulstudio/daml-codegen-csharp/actions/workflows/ci.yaml) | [![windows amd64](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/peacefulstudio/daml-codegen-csharp/badges/ci-scala-windows-amd64.json)](https://github.com/peacefulstudio/daml-codegen-csharp/actions/workflows/ci.yaml) | [![macos amd64](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/peacefulstudio/daml-codegen-csharp/badges/ci-scala-macos-amd64.json)](https://github.com/peacefulstudio/daml-codegen-csharp/actions/workflows/ci.yaml) |
| [![ubuntu arm64](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/peacefulstudio/daml-codegen-csharp/badges/ci-scala-ubuntu-arm64.json)](https://github.com/peacefulstudio/daml-codegen-csharp/actions/workflows/ci.yaml) | ![windows arm64 not supported](https://img.shields.io/badge/arm64-not%20supported-lightgrey?logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZmlsbD0id2hpdGUiIGQ9Ik0wIDMuNDQ5TDkuNzUgMi4xdjkuNDUxSDBtMTAuOTQ5LTkuNjAyTDI0IDB2MTEuNEgxMC45NDlNMCAxMi42aDkuNzV2OS40NTFMMCAyMC42OTlNMTAuOTQ5IDEyLjZIMjRWMjRsLTEyLjktMS44MDEiLz48L3N2Zz4=&logoColor=white) | [![macos arm64](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/peacefulstudio/daml-codegen-csharp/badges/ci-scala-macos-arm64.json)](https://github.com/peacefulstudio/daml-codegen-csharp/actions/workflows/ci.yaml) |

## Coverage

[![coverage (C#)](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/peacefulstudio/daml-codegen-csharp/badges/coverage-csharp.json)](https://github.com/peacefulstudio/daml-codegen-csharp/actions/workflows/ci.yaml)
[![coverage (Scala)](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/peacefulstudio/daml-codegen-csharp/badges/coverage-scala.json)](https://github.com/peacefulstudio/daml-codegen-csharp/actions/workflows/ci.yaml)

## Status

Active. Curated public releases land here; ongoing development happens
Expand Down Expand Up @@ -98,6 +123,9 @@ var submission = CommandsSubmission.Single(createCmd)

## NuGet Packages

[![latest stable](https://img.shields.io/github/v/release/peacefulstudio/daml-codegen-csharp?label=latest%20stable)](https://github.com/peacefulstudio/daml-codegen-csharp/releases/latest)
[![latest](https://img.shields.io/github/v/release/peacefulstudio/daml-codegen-csharp?include_prereleases&label=latest)](https://github.com/peacefulstudio/daml-codegen-csharp/releases)

The following packages are published to NuGet.org, starting with
`0.1.8-preview.1` (earlier versions in the CHANGELOG were internal
milestones and never reached a public feed):
Expand Down
Loading