Skip to content

Commit

Permalink
fix build chain for linux
Browse files Browse the repository at this point in the history
  • Loading branch information
HLWeil committed Mar 18, 2024
1 parent 9c32a3d commit 2c74476
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions build/PerformanceTasks.fs
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,31 @@ open Fake.Core

module PerformanceReport =

let cpu =
Microsoft.Win32.Registry.GetValue("HKEY_LOCAL_MACHINE\\HARDWARE\\DESCRIPTION\\SYSTEM\\CentralProcessor\\0", "ProcessorNameString", null) :?> string
let mutable cpu = ""

let promptCpu() =
if cpu = "" then
printfn "Please enter your cpu name"
cpu <- System.Console.ReadLine()

let testPerformancePy = BuildTask.create "testPerformancePy" [clean; build] {
promptCpu()
let path = "tests/Speedtest"
//transpile py files from fsharp code
run dotnet $"fable {path} -o {path}/py --lang python" ""
// run pyxpecto in target path to execute tests in python
run python $"{path}/py/program.py \"{cpu}\"" ""
}
let testPerformanceJs = BuildTask.create "testPerformanceJS" [clean; build] {
promptCpu()
let path = "tests/Speedtest"
// transpile js files from fsharp code
run dotnet $"fable {path} -o {path}/js" ""
// run mocha in target path to execute tests
run node $"{path}/js/program.js \"{cpu}\"" ""
}
let testPerformanceDotnet = BuildTask.create "testPerformanceDotnet" [clean; build] {
promptCpu()
let path = "tests/Speedtest"
run dotnet $"run --project {path} \"{cpu}\"" ""
}
Expand Down

0 comments on commit 2c74476

Please sign in to comment.