Skip to content

Commit 0f73690

Browse files
Build and run the samples in CI, and fix the one that was already broken (#849)
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 -- pinned to 1.3.0, they compiled against a version that still accepted integral(f, x, 1). Unpinning them in #846 was only half the fix. Building is not enough either: both compiled cleanly and threw at runtime, so the four console samples are run as well, about two seconds each. Writing this found a third. FSharpPlayground already used a ProjectReference, so nothing was concealing it -- it was broken on master, on the same call, and no job noticed because no job ran it. Fixed here. AngouriMathPlot and GraphicExample are built but not run, being windowed; InteractivePlayground is built but not run because Plotly opens a browser.
1 parent 775dedd commit 0f73690

2 files changed

Lines changed: 24 additions & 1 deletion

File tree

‎.github/workflows/EverythingBuild.yml‎

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,26 @@ jobs:
3737

3838
- name: Build Utils
3939
run: dotnet build Sources/Utils/Utils/Utils.csproj
40+
41+
# The samples are the code most like what a user writes, and nothing built them
42+
# until now. Two of them called integral(f, x, 1), which stopped parsing in 1.4.0,
43+
# and stayed broken for seven months because no job compiled or ran them.
44+
- name: Build samples
45+
run: |
46+
dotnet build Sources/Samples/SampleNet5/SampleNet5.csproj
47+
dotnet build Sources/Samples/FSharpSample/FSharpSample.fsproj
48+
dotnet build Sources/Samples/FSharpPlayground/FSharpPlayground.fsproj
49+
dotnet build Sources/Samples/Samples/Playground.csproj
50+
dotnet build Sources/Samples/InteractivePlayground/InteractivePlayground.fsproj
51+
dotnet build Sources/Samples/AngouriMathPlot/AngouriMathPlot.csproj
52+
dotnet build Sources/Samples/GraphicExample/GraphicExample.csproj
53+
54+
# Building is not enough: both samples that broke compiled cleanly and threw at
55+
# runtime. Only the console ones can run here -- AngouriMathPlot and GraphicExample
56+
# are windowed, and InteractivePlayground opens a browser through Plotly.
57+
- name: Run console samples
58+
run: |
59+
dotnet run --project Sources/Samples/SampleNet5/SampleNet5.csproj --no-build
60+
dotnet run --project Sources/Samples/FSharpSample/FSharpSample.fsproj --no-build
61+
dotnet run --project Sources/Samples/FSharpPlayground/FSharpPlayground.fsproj --no-build
62+
dotnet run --project Sources/Samples/Samples/Playground.csproj --no-build

‎Sources/Samples/FSharpPlayground/Program.fs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ printfn "%O" (integral "x" "x2 + e")
1212

1313
printfn "%O" (``lim x->0`` "sin(a x) / x")
1414

15-
printfn "%O" (latex "x / e + alpha + sqrt(x) + integral(y + 3, y, 1)")
15+
printfn "%O" (latex "x / e + alpha + sqrt(x) + integral(y + 3, y)")

0 commit comments

Comments
 (0)