Build macOS app

I am trying to build an MacOS application using GitLab CI, but the build is failing everytime.

Here’s the configuration for mac job.

image: node:11.14.0
mac:
stage: test
  cache:
    paths:
      - .electron-vue/
      - ~/.yarn
    policy: pull
  artifacts:
    paths:
     - dist/
  script: 
    - yarn
    - yarn build:mac

and here’s the link to electron-builder for mac https://www.electron.build/multi-platform-build#macos

How is it failing? And, what runner are you using?

If I am not wrong, I think to build MacOS application it requires MacOS environment only and by default GitLab CI uses Ubuntu.

image

I am using shared-runners-manager-6.gitlab.com (#380987)

You will need to install a GitLab Runner on a mac (instructions at https://docs.gitlab.com/runner/install/osx.html) and register it to your project (https://docs.gitlab.com/runner/register/index.html). You can register a private runner to a project on gitlab.com or wherever the GitLab server is running. The runner needs to have access to the build tools like XCode and an apple piece of hardware to be able to do it’s work. I have one running on my Mac:
Steves-MBP-3:~ steevo$ gitlab-runner status
Runtime platform arch=amd64 os=darwin pid=16087 revision=8bb608ff version=11.7.0
gitlab-runner: Service is running!
Steves-MBP-3:~ steevo$

But I don’t have mac, is there any other way we can configure the GitLab CI.

Mac is a proprietary system so you have to have paid licenses to use it. The linux runners we have are enabled because the linux container is free. There is discussion about us having Mac and Windows runners for gitlab.com but they would be have a cost associated with them, and it’s not something that’s currently on the roadmap.

I love Gitlab and there is so much potential but this is very sad and disheartening to hear that it is not even on the roadmap. We are forced to use any of your competitors like CircleCI, TravisCI, and SemaphoreCI whom all have this capability for years already.

Checkmate guys… https://github.com/features/actions