dagger-runtime-benchmark/actions/bench.go
2023-05-18 15:07:24 +02:00

28 lines
443 B
Go

package main
import (
"context"
"log"
"os"
"os/exec"
)
func Bench(ctx context.Context) error {
output, err := exec.Command("cargo", "build").CombinedOutput()
log.Println(string(output))
if err != nil {
return err
}
cmd := exec.Command("dagger", "run", "target/debug/dagger-runtime-benchmark")
cmd.Stdin = os.Stdin
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
if err = cmd.Run(); err != nil {
return err
}
return nil
}