Clarify Licensing #8
This file contains hidden or 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: CI (Generate, Build, Verify) | |
| on: | |
| push: | |
| pull_request: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: "8.0.x" | |
| - name: Install xscgen | |
| run: dotnet tool install --global dotnet-xscgen | |
| - name: Fetch latest Kleer XSD | |
| run: curl -sSL https://api.kleer.se/v1/xsd -o Kleer/doc.xsd | |
| - name: Regenerate models | |
| run: | | |
| rm -rf Kleer/Models | |
| mkdir -p Kleer/Models | |
| xscgen Kleer/doc.xsd --namespace=Kleer.Models --output Kleer/Models | |
| - name: Restore | |
| run: dotnet restore Kleer/Kleer.csproj | |
| - name: Build | |
| run: dotnet build Kleer/Kleer.csproj -c Release --no-restore | |
| - name: Verify no drift (schema/models) | |
| run: | | |
| # Fail if regeneration changed tracked files (doc.xsd or Models/*) | |
| if ! git diff --exit-code; then | |
| echo "Generated models (or doc.xsd) differ from committed versions." | |
| echo "Run the regenerate snippet locally and commit the changes." | |
| exit 1 | |
| fi |