dagger-wasm/actions/ci.go
2023-05-05 23:35:12 +02:00

41 lines
592 B
Go

package main
import (
"context"
"log"
"os"
"os/exec"
)
func Ci(ctx context.Context) error {
err := runRustPipeline(ctx)
if err != nil {
log.Fatal(err)
}
return nil
}
func runRustPipeline(ctx context.Context) error {
cmd := exec.Command("cargo", "build")
cmd.Dir = "ci"
cmd.Stdin = os.Stdin
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
err := cmd.Run()
if err != nil {
log.Fatal(err)
}
cmd = exec.Command("ci/target/debug/ci")
cmd.Stdin = os.Stdin
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
err = cmd.Run()
if err != nil {
log.Fatal(err)
}
return nil
}