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

MacOS tests on GitHub CI/CD #635

Draft
wants to merge 24 commits into
base: main
Choose a base branch
from
Draft

MacOS tests on GitHub CI/CD #635

wants to merge 24 commits into from

Conversation

ribalba
Copy link
Member

@ribalba ribalba commented Dec 27, 2023

We have tried to get our tests running on the GitHub Mac CI/CD runners. Unfortunately it turns out that this is not that easy to do in a reliable matter. While it is possible to actually get the tests to run there is loads of boiler plate code you need to wrap around the original tests to get things to work sort of defeating the purpose of the tests. A few things that needed fixing are:

  • As docker on uses a VM you can't use localhost as database path. You need to set the IP of the Qemu VM
  • You can't use the official docker image as there is no Windowing system
  • Kanico can't write to /tmp for some reason so you need to write all the temp data to ~
  • Docker does not run on the M1 series of chips so we need to pin the VM to Intel Macs ]

We are pausing this for now as we don't really officially support Mac for runs. We would love some help though. Feel free if this is something you would want to help us doing.

@ArneTR
Copy link
Member

ArneTR commented Dec 28, 2023

As a note : In the dev mode branch I implemented a time reduction for the tests. Maybe this helps for this PR?

If you review that we can merge that in, or you rebase this PR ontop of the dev-mode branch. This contains also the macos test fixes: #637

Alternatively you can try our private repository that contains the SSH access to Github runners to start tests and runners interactively with a shell and see how the tests behave

@ribalba
Copy link
Member Author

ribalba commented Dec 31, 2023

This is me just playing around. Thank you for the feedback. Next step would be to ssh into the Mac runner and see why things are failing. Will discuss with @dan-mm when he is back.

@dan-mm
Copy link
Contributor

dan-mm commented Jan 8, 2024

I'm back, and I agree with @ribalba. ATM it seems to fail just trying to run the install_mac.sh script, so next step is to just ssh into the runner try it manually.

Would have been quite nice if it just worked out of the box, worth the try! :-D

@dan-mm dan-mm mentioned this pull request Jan 8, 2024
@ArneTR
Copy link
Member

ArneTR commented Jan 13, 2024

Note to you both also in the PR: Adding SSH to the PR while it being public in our organization is not secure. Everyone can connect to that session while it is open.

Either do this in a forked private repository or lock it down with your public key. Please do not run this in our organizations with also potentially secrets exposed.

@dan-mm
Copy link
Contributor

dan-mm commented Jan 15, 2024

That makes sense. As a side note though, the ssh upterm action fails specifically in the case for macos + limited users (https://github.com/fawazahmed0/action-debug).

And github doesn't allow you to make private forks of public repos (for security reasons)

its not a blocker, there's other ways around this (I'll just start with a blank private repo and clone gmt after ssh), but I found it funny that the upterm action fails for this specific use case

@dan-mm dan-mm marked this pull request as draft February 23, 2024 15:04
Copy link

Eco-CI Output:

Label 🖥 avg. CPU utilization [%] 🔋 Total Energy [Joules] 🔌 avg. Power [Watts] Duration [Seconds]
Total Run 22.7533 1135.72 3.52707 330
Measurement #1 23.048 1135.72 3.52707 324

📈 Energy graph:

 
 7.78 ┤                                                                                ╭╮               ╭╮
 7.18 ┤                                                                                ││               ││
 6.58 ┤                                                                                ││               ││
 5.98 ┤                                                                               ╭╯│          ╭╮   ││╭╮
 5.38 ┤                                                                               │ │        ╭─╯╰╮  │╰╯│
 4.77 ┤     ╭╮               ╭╮                                                       │ ╰─╮╭───╮ │   ╰╮ │  │
 4.17 ┤     ││         ╭──╮╭─╯│   ╭╮        ╭╮  ╭─╮                     ╭─╮           │   ╰╯   │ │    ╰─╯  ╰╮          ╭╮  ╭╮╭──╮ ╭╮                            ╭─────╮                             ╭╮ ╭╮                      ╭╮       ╭╮           ╭╮  ╭╮   ╭╮                      ╭╮╭╮    ╭╮   ╭╮   ╭╮╭─╮                          ╭
 3.57 ┤    ╭╯╰───╮     │  ╰╯  ╰───╯╰────────╯╰──╯ ╰─────────────────────╯ ╰───────────╯        ╰─╯          │       ╭╮╭╯╰──╯╰╯  ╰─╯╰────────────────────────────╯     ╰─────╮                    ╭──╯╰─╯╰──╮╭──────────────────╯╰───────╯╰───────────╯╰──╯╰───╯╰──────╮  ╭────────────╯╰╯╰────╯╰───╯╰───╯╰╯ ╰─╮        ╭─╮         ╭╮ ╭╯
 2.97 ┤    │     ╰╮    │                                                                                    │       │╰╯                                                     │                    │         ││                                                         ╰╮ │                                    │        │ ╰╮        ││ │
 2.37 ┤    │      │   ╭╯                                                                                    │       │                                                       ╰╮                  ╭╯         ╰╯                                                          │╭╯                                    │        │  │        ││ │
 1.77 ┼────╯      ╰───╯                                                                                     ╰───────╯                                                        ╰──────────────────╯                                                                      ╰╯                                     ╰────────╯  ╰────────╯╰─╯
                                                                                                                                                                Watts over time

@ribalba ribalba added help wanted Extra attention is needed wontfix This will not be worked on labels Feb 27, 2024
@ribalba ribalba changed the title Will this work? MacOS tests on GitHub CI/CD Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed wontfix This will not be worked on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants