Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testing on GibHub action #17

Open
Alexander-Barth opened this issue Dec 19, 2024 · 4 comments
Open

Testing on GibHub action #17

Alexander-Barth opened this issue Dec 19, 2024 · 4 comments

Comments

@Alexander-Barth
Copy link
Contributor

It would be great if we could improve the testing of PiGPIO.jl as currently there are no tests at all. Maybe somebody is aware of a mock-up environment to simulate a Pi. Or may there are other possibly approaches for testing?

@aviks
Copy link
Member

aviks commented Dec 19, 2024

Maybe this might help? https://github.com/ptrsr/pi-ci

@TheCedarPrince
Copy link

Hey @Alexander-Barth , as mentioned over on our Discourse Discussion, if you can help me with getting my project going and we think of what tests to develop, I am happy to also use my Raspberry Pi Julia rig as a testing harness to check the state of Julia Raspberry Pi packages here and there. 😄

I intend to run the Pi as a server anyhow, so it could be a Julia Pi server or something too. :)

@Alexander-Barth
Copy link
Contributor Author

@aviks thanks for sharing the info about pi-ci. Unfortunately, I was not able to trick pigpiod into believing that the VM is a raspberry Pi :-)

For reference, this is what I tried:

docker run --rm -it -v $PWD/dist:/dist  resize 8G  # more space to install julia
docker run --rm -it -v $PWD/dist:/dist ptrsr/pi-ci start

As root inside the RPi VM:

curl -fsSL https://install.julialang.org | sh -s -- --yes
systemctl start pigpiod.service 
systemctl status pigpiod.service 

Error message from pigpiod:

Started pigpiod.service - Daemon required to control GPIO pins via pigpio.
: 2024-12-20 08:09:43 gpioHardwareRevision: unknown revision=0
: 2024-12-20 08:09:43 initCheckPermitted:
: +---------------------------------------------------------+
: |Sorry, this system does not appear to be a raspberry pi. |
: |aborting.                                                |
: +---------------------------------------------------------+
: Can't initialise pigpio library
pigpiod.service: Main process exited, code=exited, status=1/FAILURE

@TheCedarPrince Thank you very much for your nice offer. Your feedback on spi is very valuable! I think it is quite likely that you are the very first person who does use this propocol using PiGPIO.jl. But once it will work for you, it will help many others. :-) I am quite confident that the original python code is correct. So it is rather a matter to correctly translate the python code to julia.


In the future, maybe a self hosted runner GubHub Action would be an approach to test a physical RPI possibly with some devices (switching a led on, test if led is on with a photodiode).

@TheCedarPrince
Copy link

@TheCedarPrince Thank you very much for your nice offer. Your feedback on spi is very valuable! I think it is quite likely that you are the very first person who does use this propocol using PiGPIO.jl. But once it will work for you, it will help many others. :-) I am quite confident that the original python code is correct. So it is rather a matter to correctly translate the python code to julia.

In the future, maybe a self hosted runner GubHub Action would be an approach to test a physical RPI possibly with some devices (switching a led on, test if led is on with a photodiode).

Happy to assist with that! Just let me know how I can try setting stuff up later.

I agree -- I think it is a matter of translating the Python code to Julia code properly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants