img-wasmer/actions/ci.go

41 lines
592 B
Go
Raw Permalink Normal View History

2023-05-05 23:02:53 +02:00
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
}