Skip to content

Commit

Permalink
directly use go build
Browse files Browse the repository at this point in the history
  • Loading branch information
aditsachde committed Jul 29, 2024
1 parent 46f08b5 commit 0817108
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 17 deletions.
22 changes: 8 additions & 14 deletions .github/workflows/integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,22 +34,16 @@ jobs:
with:
go-version-file: "go.mod"

- name: Build monitor
uses: thatisuday/go-cross-build@v1
with:
platforms: "linux/amd64, linux/arm64"
dest: "dist"
package: "cmd/itko-monitor"

- name: Build submit
uses: thatisuday/go-cross-build@v1
with:
platforms: "linux/amd64, linux/arm64"
dest: "dist"
package: "cmd/itko-submit"
- name: Build
working-directory: "bin"
run:
GOOS=linux GOARCH=arm64 go build -o itko-monitor-linux-arm64 ../cmd/itko-monitor
GOOS=linux GOARCH=amd64 go build -o itko-monitor-linux-amd64 ../cmd/itko-monitor
GOOS=linux GOARCH=arm64 go build -o itko-submit-linux-arm64 ../cmd/itko-submit
GOOS=linux GOARCH=amd64 go build -o itko-submit-linux-amd64 ../cmd/itko-submit

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: "bin"
path: "dist/"
path: "bin/"
7 changes: 4 additions & 3 deletions cmd/itko-monitor/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@ import (

func main() {
// Parse the command-line flags
storeDirectory := flag.String("store-directory", "", "Tile storage directory. Must not have a trailing slash.")
storeAddress := flag.String("store-address", "", "Tile storage url. Must end with a trailing slash.")
listenAddress := flag.String("listen-address", "", "IP and port to listen on for incoming connections.")
maskSize := flag.Int("mask-size", 0, "Mask size for the quadtree.")
flag.Parse()

if *storeAddress == "" {
fmt.Println("Error: -store-address flag must be set")
if *storeDirectory == "" || *storeAddress == "" {
fmt.Println("Error: -store-address or -store-address flag must be set")
flag.Usage() // Print the usage message
os.Exit(1) // Exit with a non-zero status
}
Expand All @@ -40,5 +41,5 @@ func main() {
log.Fatalf("failed to bind to address: %v", err)
}

ctmonitor.MainMain(listener, *storeAddress, *maskSize, nil)
ctmonitor.MainMain(listener, *storeDirectory, *storeAddress, *maskSize, nil)
}

0 comments on commit 0817108

Please sign in to comment.