Reputation: 389
I have a project in which we have Windows and Mac builds, so I'm trying to set up a GitLab CI pipeline where we build both versions. This is what my structure looks like right now:
.
|--src
+--jobs
| +--macos
| | +--build_macos.yml
| | +--cmake_macos.yml
| | +--.cmake_macos.yml
| +--windows
| | +--build_windows.yml
| | +--cmake_mingw-w64-x86-64.yml
| | +--.cmake_mingw-w64-x86-64.yml
| +--stages.yml
+--.gitlab-ci.yml
And here's my .gitlab-ci.yml:
include:
- {local: '/jobs/stages.yml'}
- {local: '/jobs/windows/build_windows.yml'}
- {local: '/jobs/macos/build_macos.yml'}
My first job (build windows), instead of executing .cmake_mingw-w64-x86-64.yml
, is executing .cmake_macos
and I don't know why.
I'll add some of the other .yml files for more context.
build_macos
:
before_script:
- if [ -n "${CI}" ]; then
- conan user -p $ARTIFACTORY_TOKEN -r my_repo $ARTIFACTORY_USERNAME
- fi
include:
- {local: "/jobs/macos/cmake_macos.yml"}
build_windows
:
before_script:
- if [ -n "${CI}" ]; then
- conan user -p $ARTIFACTORY_TOKEN -r my_repo $ARTIFACTORY_USERNAME
- fi
include:
- {local: "/jobs/windows/cmake_mingw-w64-x86_64.yml"}
cmake_mingw-w64-x86-64.yml
:
include:
- {local: "/jobs/windows/.cmake_mingw-w64-x86_64.yml"}
cmake:cmake-mingw-w64-x86_64:Release:
stage: build-windows
extends: .cmake
variables:
TOOLCHAIN: foo1/tools-builder/toolchain-mingw-foo:1.0
BUILD_TYPE: Release
tags:
- docker
cmake_macos
:
include:
- {local: "/jobs/macos/.cmake_macos.yml"}
cmake:cmake-macos:Release:
stage: build-macos
extends: .cmake
variables:
BUILD_TYPE: Release
tags:
- macos
I have tried changing the order of the includes
, adding different tags, changing the file structure and nothing has worked. I don't understand why my build windows
stage is using the script from .cmake_macos
. Any help is appreciated, if needed I can provide other stuff
Upvotes: 0
Views: 173
Reputation: 389
I found my mistake. The extends:
section in both cmake_mingw-w64-x86-64.yml
and cmake_macos.yml
only had .cmake
instead of their full names. Changing it to their full/unique names fixed it.
Upvotes: 0