From 42910ea23a9a971541f0454faf8e69efa2e716d1 Mon Sep 17 00:00:00 2001 From: Rafael Vuijk Date: Sun, 9 Aug 2026 16:24:13 +0000 Subject: [PATCH] Build and run the samples in CI, and fix the one that was already broken Nothing built anything under Sources/Samples. That is what let SampleNet5 and FSharpSample stay broken against the current release for seven months while looking healthy -- they were pinned to 1.3.0, so they compiled against a version that still accepted integral(f, x, 1). Unpinning them in #846 was only half the fix. The other half is a job that compiles them, because a sample nothing builds will break again. Building is not enough either: both of those samples compiled cleanly and threw at runtime. The console samples are therefore run as well, which takes about two seconds each. Writing this found a third one. FSharpPlayground already used a ProjectReference, so nothing was concealing it -- it is broken on master today, on the same integral(y + 3, y, 1) call, and no job noticed because no job ran it. Fixed here to the two-argument form. AngouriMathPlot and GraphicExample are built but not run, being windowed applications; InteractivePlayground is built but not run because Plotly opens a browser. The job already runs on windows-latest, so the windowed two compile there. Co-Authored-By: Claude Opus 5 (1M context) --- .github/workflows/EverythingBuild.yml | 23 +++++++++++++++++++++ Sources/Samples/FSharpPlayground/Program.fs | 2 +- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/.github/workflows/EverythingBuild.yml b/.github/workflows/EverythingBuild.yml index 4fa0012da..074232068 100644 --- a/.github/workflows/EverythingBuild.yml +++ b/.github/workflows/EverythingBuild.yml @@ -37,3 +37,26 @@ jobs: - name: Build Utils run: dotnet build Sources/Utils/Utils/Utils.csproj + + # The samples are the code most like what a user writes, and nothing built them + # until now. Two of them called integral(f, x, 1), which stopped parsing in 1.4.0, + # and stayed broken for seven months because no job compiled or ran them. + - name: Build samples + run: | + dotnet build Sources/Samples/SampleNet5/SampleNet5.csproj + dotnet build Sources/Samples/FSharpSample/FSharpSample.fsproj + dotnet build Sources/Samples/FSharpPlayground/FSharpPlayground.fsproj + dotnet build Sources/Samples/Samples/Playground.csproj + dotnet build Sources/Samples/InteractivePlayground/InteractivePlayground.fsproj + dotnet build Sources/Samples/AngouriMathPlot/AngouriMathPlot.csproj + dotnet build Sources/Samples/GraphicExample/GraphicExample.csproj + + # Building is not enough: both samples that broke compiled cleanly and threw at + # runtime. Only the console ones can run here -- AngouriMathPlot and GraphicExample + # are windowed, and InteractivePlayground opens a browser through Plotly. + - name: Run console samples + run: | + dotnet run --project Sources/Samples/SampleNet5/SampleNet5.csproj --no-build + dotnet run --project Sources/Samples/FSharpSample/FSharpSample.fsproj --no-build + dotnet run --project Sources/Samples/FSharpPlayground/FSharpPlayground.fsproj --no-build + dotnet run --project Sources/Samples/Samples/Playground.csproj --no-build diff --git a/Sources/Samples/FSharpPlayground/Program.fs b/Sources/Samples/FSharpPlayground/Program.fs index c2ca30f4d..334a23abb 100644 --- a/Sources/Samples/FSharpPlayground/Program.fs +++ b/Sources/Samples/FSharpPlayground/Program.fs @@ -12,4 +12,4 @@ printfn "%O" (integral "x" "x2 + e") printfn "%O" (``lim x->0`` "sin(a x) / x") -printfn "%O" (latex "x / e + alpha + sqrt(x) + integral(y + 3, y, 1)") +printfn "%O" (latex "x / e + alpha + sqrt(x) + integral(y + 3, y)")