Build queue on self-hosted runners

Hi,

We recently switch to self-hosted runners for our iOS pipeline. We have 2 MacMinis in house and are running the machine runner.
We are facing an issue where we can run only one build/Workflow at a time (on the same mac mini). If a new workflow kicks in, it cancels the already running one, regardless of the branch name. We’ve tried making the workdir unique but we can’t really make it unique for each workflow, unless we rewrite the pipeline, since we can’t use variables for the working_directory.

We’ve looked at queuing strategies but most of them are per job queues and not per workflow.

Do you guys have any suggestions for the self-hosted runners to make the builds queue/wait for workflow to finish?

It’s been a little, but in my memory (though using a runner in Kubernetes vs. a machine runner), when the self-hosted runner is configured, it would queue vs. preempt if a job was running and there weren’t other available replicas.

Does the project have “Auto-cancel redundant workflows” enabled?

The project has the “Auto-cancel reduntant workflows” enabled, but that I thought worked on a branch, and not any workflow that runs at the same time on the same machine.

I can’t see any configuration on the machine runner which could be enabled to make it queue. So far it seems to cancel any running job to start the new one.

That’s true – as best I know, that setting should only affect jobs on the same branch.

I believe there may also be some runner level parameters that may influence this
Other than checking the concurrency limit config option, might be a good idea to ask Circle’s support about your use case.