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

Run CI on macOS #510

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Run CI on macOS #510

wants to merge 4 commits into from

Conversation

iffy
Copy link

@iffy iffy commented Oct 13, 2022

If you want to, this will run the tests on macOS, too. If you don't want this that's fine, too -- just close it.

@treeform
Copy link
Owner

We had macOS, but the github runners take way to long to run - like hours and hours. So we decided to disable them.
If only github hard macOS runners that were fast we would enable them.

So we will probably not take this commit PR, sorry.

@iffy
Copy link
Author

iffy commented Oct 14, 2022

No worries; I've had to make that same call on other repos for macOS building. FWIW these builds only took 15min, but if there was queue contention, I could see it taking much longer. I'm not offended at all if you close this.

@iffy
Copy link
Author

iffy commented Oct 17, 2022

On the latest push, builds for macOS are actually faster than the other ones now: https://github.com/iffy/pixie/actions/runs/3265723604/usage

Though of course there's still possible queue contention for macOS so the start time might be delayed.

Anyway, I'm done fiddling with this, I promise 😄 I'll stop making changes.

@guzba
Copy link
Collaborator

guzba commented Jan 17, 2023

We turned macos-latest back on for Puppy and unfortunately it's been extremely slow still (10+minutes to even start sometimes). It makes me not eager to turn this back on for more repos without a specific reason. Puppy uses platform code on so macos-latest makes sense, Pixie does not.

@iffy
Copy link
Author

iffy commented Jan 17, 2023

@guzba I see the 10+ minute start time that you're referring to here: https://github.com/treeform/puppy/actions/runs/3935567309/jobs/6734919372

If you look at this PR, rather than using choosenim (via jiro4989/setup-nim-action) to install on macOS which takes 10+ minutes, this PR installs official precompiled binaries (via iffy/install-nim) which takes a few seconds. The reason I even considered adding macOS building to Pixie is because of this macOS-specific issue: #506

@amkrajewski
Copy link

Have you tried installing using Homebrew? I found it to behave as expected and during my testing workflow runs it installs nim (v2.0.0) in just about 5s on macos-14 runners or 11s on macos-12 runners.

In my specific case, is also appreciably faster than other runners. Installing (1) nim, (2) Arraymancer and wimpy (through nimble), (3) compiling my code, and (4) running all tests takes under 60s.

To be a bit more quantitative:

Runner Install Tool Install Time Test Runtime
macos-14 Homebrew 5s 16s
ubuntu-latest jiro4989 7s 30s
macos-12 Homebrew 11s 40s
windows-latest Conda+jiro4989 185s 51s

There is no magic involved. Here is the job from my workflow YAML file:

test-M1:
    runs-on: macos-14
    steps:
      - name: Checkout
        uses: actions/checkout@v3
      - name: Install Nim with Homebrew
        run: brew install nim
      - name: Install dependencies
        run: nimble install -y arraymancer nimpy
      - name: Compile nimplex
        run: nim c -d:release nimplex.nim
      - name: Run grid tests
        run: nim c -r -d:release tests/runAll.nim

I hope it helps :)

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

Successfully merging this pull request may close these issues.

4 participants