ergo-services / ergo

An actor-based Framework with network transparency for creating event-driven architecture in Golang. Inspired by Erlang. Zero dependencies.
https://docs.ergo.services
MIT License
3.67k stars 143 forks source link

Use the same os_dep_getResourceUsage on linux, freebsd, openbsd, netbsd and dragonfly machines, not just Linux #46

Closed qbit closed 3 years ago

qbit commented 3 years ago

With this diff I can build / execute examples/simple/GenServer.go.

CLAassistant commented 3 years ago

CLA assistant check
All committers have signed the CLA.

halturin commented 3 years ago

Thanks for the contribution.

I'm not sure if it's going to be a good idea to make an "everything except windows" build tag. I would rather have like

// +build linux,freebsd,openbsd,netbsd

This way gets you defined behavior.

Is there any chance to update .github/workflows/testLinuxWindowsMacOS.yml in order to have tested OS support?

qbit commented 3 years ago

@halturin makes sense, updated (also included dragonfly)!

halturin commented 3 years ago

Thanks for the update. We definitely have to confirm support of the OS. At least I would add some of them to the GitHub action .github/workflows/testLinuxWindowsMacOS.yml. They (GitHub actions) don't have FreeBSD images so far, but I saw a workaround using MacOS image with FreeBSD OS as a VM. I think there should be a way for the other OSes.

qbit commented 3 years ago

Would building the examples (or ./...) with GOOS=$os_in_question be sufficient (unfortunately tests can't run with GOOS set)?

Alternatively sr.ht has OpenBSD and FreeBSD vms: https://man.sr.ht/builds.sr.ht/compatibility.md

halturin commented 3 years ago

Unfortunately no, it wouldn't. We should make sure if the declared OS in the support list is really supported.

qbit commented 3 years ago

using MacOS image with FreeBSD OS as a VM

Perhaps it was this: https://github.com/vmactions/freebsd-vm ? They don't have an OpenBSD equivalent it seems. I know a few projects (syncthing, nim) offload the BSD CI stuff to sr.ht, would you be open to something like that?

halturin commented 3 years ago

Sure, I don't mind using CI outside, but it has to be integrated with the GitHub Action and triggering tests along with the current Windows, MacOS, and Linux. Let's leave linux.go then and create unix.go using build tag with the list of the platforms that could be tested on the CI outside.

Thank you for your patience.

qbit commented 3 years ago

Looks like freebsd and openbsd can now be tested via: https://github.com/cross-platform-actions/action !

halturin commented 3 years ago

just released 2.0.0 with the BSD family support.