Skip to content

Conversation

@Johnosezele
Copy link
Contributor

@Johnosezele Johnosezele commented Jul 18, 2025

This pull request addresses issue #877 by adding macOS to the CI test matrix. This will help catch platform-specific bugs in the future.

@spacebear21
Copy link
Collaborator

We need to consider that this triples the number of Test actions that need to run for each workflow (3 rust toolchains x 3 OSes). I don't know what our Action Runner limits are, or how these OSes vary in performance, but we should keep those in mind.

@coveralls
Copy link
Collaborator

coveralls commented Jul 18, 2025

Pull Request Test Coverage Report for Build 17923076448

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 84.744%

Totals Coverage Status
Change from base Build 17920764384: 0.0%
Covered Lines: 8560
Relevant Lines: 10101

💛 - Coveralls

@Johnosezele
Copy link
Contributor Author

We need to consider that this triples the number of Test actions that need to run for each workflow (3 rust toolchains x 3 OSes). I don't know what our Action Runner limits are, or how these OSes vary in performance, but we should keep those in mind.

I did a bit of research about this, rust projects like ripgrep uses scheduled testing for the full matrix, and reqwest tests stable on all platforms, MSRV only on Linux.

Maybe we could try a tiered approach:

  • Run essential check: tests on stable Rust with ubuntu-latest only.
  • On merges, we run the full tests on stable across ubuntu-latest, macos-latest, and windows-latest.

@Johnosezele
Copy link
Contributor Author

The failing CI checks on the new macOS and Windows runners is due to the linux specific flock command. For Pr #886 where I used mkdir locking will fix this.

@nothingmuch
Copy link
Collaborator

We need to consider that this triples the number of Test actions that need to run for each workflow (3 rust toolchains x 3 OSes).

It more than triples, unfortunately: https://docs.github.com/en/billing/managing-billing-for-your-products/about-billing-for-github-actions#minute-multipliers

I don't know what our Action Runner limits are, or how these OSes vary in performance, but we should keep those in mind.

https://docs.github.com/en/actions/reference/actions-limits#storage-limits-for-all-github-hosted-runners

that last link is very confusing since it talks about storage but seems to implicate minutes per month, and it seems we're over that limit:

https://github.com/payjoin/rust-payjoin/actions/metrics/usage

but we also use way less than say bitcoin core or ldk, so i think it must be the wrong link

@nothingmuch
Copy link
Collaborator

hmm, public repos don't seem to fall under the free tier limits, so if this is true then i don't think there's a problem, but we should verify from some authoritative source so that we don't end up unable to run the basic tests:

https://github.com/orgs/community/discussions/26054

@spacebear21
Copy link
Collaborator

I think we can keep this simple and less wasteful by keeping the toolchain matrix as-is for linux, and only run the test suite on the stable toolchain for macOS/Linux.

@Johnosezele Johnosezele force-pushed the feat/multi-platform-ci branch 3 times, most recently from 132c1dd to 609be8c Compare August 4, 2025 14:36
@Johnosezele Johnosezele closed this Aug 4, 2025
@Johnosezele Johnosezele force-pushed the feat/multi-platform-ci branch from 609be8c to 7040cca Compare August 4, 2025 14:47
@Johnosezele Johnosezele reopened this Aug 4, 2025
@Johnosezele Johnosezele force-pushed the feat/multi-platform-ci branch from ffc7573 to 991db46 Compare August 4, 2025 15:28
@Johnosezele
Copy link
Contributor Author

macOS CI Test Failures Unit Test Error

When running only unit tests on macOS, I encounter:
error[E0432]: unresolved import crate::send::v1
--> payjoin/src/core/send/v2/session.rs:107:22
|
107 | use crate::send::v1::SenderBuilder;
| ^^ could not find v1 in send

Integration Test Failures
When running the full integration test suite on macOS, I encounter:

Test Failures (6 failed tests) failures:

---- integration::multiparty::ns1r stdout ----
thread 'integration::multiparty::ns1r' panicked at /Users/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/testcontainers-0.15.0/src/clients/cli.rs:46:39:
Failed to execute docker command: Os { code: 2, kind: NotFound, message: "No such file or directory" }

---- integration::v2::test_bad_ohttp_keys stdout ----
thread 'integration::v2::test_bad_ohttp_keys' panicked at /Users/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/testcontainers-0.15.0/src/clients/cli.rs:46:39:
Failed to execute docker command: Os { code: 2, kind: NotFound, message: "No such file or directory" }

---- integration::v2::test_err_response stdout ----
thread 'integration::v2::test_err_response' panicked at /Users/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/testcontainers-0.15.0/src/clients/cli.rs:46:39:
Failed to execute docker command: Os { code: 2, kind: NotFound, message: "No such file or directory" }

---- integration::v2::test_session_expiration stdout ----
thread 'integration::v2::test_session_expiration' panicked at /Users/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/testcontainers-0.15.0/src/clients/cli.rs:46:39:
Failed to execute docker command: Os { code: 2, kind: NotFound, message: "No such file or directory" }

---- integration::v2::v1_to_v2 stdout ----
thread 'integration::v2::v1_to_v2' panicked at /Users/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/testcontainers-0.15.0/src/clients/cli.rs:46:39:
Failed to execute docker command: Os { code: 2, kind: NotFound, message: "No such file or directory" }

---- integration::v2::v2_to_v2 stdout ----
thread 'integration::v2::v2_to_v2' panicked at /Users/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/testcontainers-0.15.0/src/clients/cli.rs:46:39:
Failed to execute docker command: Os { code: 2, kind: NotFound, message: "No such file or directory" }

test result: FAILED. 7 passed; 6 failed; 1 ignored; 0 measured; 0 filtered out; finished in 15.67s
error: test failed, to rerun pass -p payjoin --test integration

Unit Test Issue: Missing v1 module in send module
Integration Test Issue: Docker not available on macOS GitHub Actions runners

@benalleng
Copy link
Collaborator

To get docker on MacOS CI you will need to manually include it

- name: Setup Docker on macOS
uses: douglascamata/setup-docker-macos-action@v1.0.0

@Johnosezele Johnosezele force-pushed the feat/multi-platform-ci branch from 991db46 to 05d11ad Compare August 4, 2025 15:43
@Johnosezele
Copy link
Contributor Author

Johnosezele commented Aug 4, 2025

To get docker on MacOS CI you will need to manually include it

- name: Setup Docker on macOS
uses: douglascamata/setup-docker-macos-action@v1.0.0

CI hit this:
Detected M-series processor runner without nested virtualization support, exiting.

Edit:
using macos-12 instead of macos-latest (which is M-series) bypassed this

@Johnosezele Johnosezele force-pushed the feat/multi-platform-ci branch from 05d11ad to df37e8c Compare August 4, 2025 15:52
@Johnosezele Johnosezele changed the title Add macOS and Windows to CI test matrix Add macOS to CI test matrix Aug 4, 2025

Test-Stable-macOS:
name: Stable tests on macOS
runs-on: macos-12
Copy link
Collaborator

@benalleng benalleng Aug 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets use macos-13 as this is still supported in the setup-docker-macos-action, as well its what we are already using in our python CI for consistency
https://github.com/douglascamata/setup-docker-macos-action?tab=readme-ov-file#currently-supported-public-runner-images

@Johnosezele Johnosezele force-pushed the feat/multi-platform-ci branch from df37e8c to 311bba2 Compare August 4, 2025 16:17
@spacebear21
Copy link
Collaborator

Perhaps this PR should wait on #915 which will remove the docker dependency entirely. Currently the macOS docker CI step is very slow and error-prone (Docker setup step took 5min in this recent run https://github.com/payjoin/rust-payjoin/actions/runs/16723381144/job/47332768078, and appears to be hanging in the CI for this PR).

@nothingmuch
Copy link
Collaborator

it should be possible to rebase this on the redis PR to see if that fixes things

@Johnosezele Johnosezele force-pushed the feat/multi-platform-ci branch from 311bba2 to 97821fb Compare September 5, 2025 11:25
@benalleng
Copy link
Collaborator

With the update from #989 and the lessons learned about macos builder I think it is ok for us to use macos-latest after #915 is merged

@benalleng
Copy link
Collaborator

This is no longer blocked as of 92a3154

@spacebear21
Copy link
Collaborator

I'm partial towards closing this as wontfix per #877 (comment) but don't feel strongly about it.

@Johnosezele Johnosezele force-pushed the feat/multi-platform-ci branch 2 times, most recently from a7168ed to 5138bcd Compare September 19, 2025 21:03
@Johnosezele
Copy link
Contributor Author

With the update from #989 and the lessons learned about macos builder I think it is ok for us to use macos-latest after #915 is merged

@benalleng macos-latest causes the Continuous integration / Stable tests on macOS (pull_request) to fail, reason I pushed again without it.

@benalleng
Copy link
Collaborator

I'm partial towards closing this as wontfix per #877 (comment) but don't feel strongly about it.

I'd like to at least see what is actually added to the CI time/flow without any docker stuff before making a decision here

@Johnosezele Johnosezele force-pushed the feat/multi-platform-ci branch from 5138bcd to 38b10dd Compare September 22, 2025 17:17
@benalleng
Copy link
Collaborator

With no caching it sits at 7 minutes, while this is too long right now I would like to see the time reduction with caching

@spacebear21
Copy link
Collaborator

Re-ran that job, it took 3 min with cache hit which is ~1 min (50%) longer than on the ubuntu runner

@benalleng benalleng removed the blocked label Sep 23, 2025
@benalleng
Copy link
Collaborator

benalleng commented Sep 23, 2025

Since this is no longer blocked, the actual differences between the ubuntu and macOs runners on the payjoin crate just don't seem large enough to justify a new runner. Which now is the longest runner in the payjoin crate atm.

Especially with the docker and redis dependency gone these runners are mostly identical, any differences that come about like perhaps a new dependency failure on macOs or ubuntu would quickly become apparent by our devs.

I think macos CI makes some sense in FFI where we actually want to test generated binaries, but for the core library i'm not convinced it's really useful other than testing bash scripts that we run locally all the time anyway

-spacebear

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.

5 participants