From 93811b801d6e1a35ead8a70efd5bc40463eddd8c Mon Sep 17 00:00:00 2001 From: Marek Roszko Date: Wed, 22 Nov 2023 20:07:01 -0500 Subject: [PATCH] Add macOS CI build --- .gitlab-ci.yml | 1 + .gitlab/macOS-CI.yml | 47 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 .gitlab/macOS-CI.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 833fbdd28f..aa53afaa23 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -13,6 +13,7 @@ include: - local: '/.gitlab/Fedora-Linux-CI.yml' - local: '/.gitlab/Ubuntu-20.04-CI.yml' - local: '/.gitlab/Windows-CI.yml' + - local: '/.gitlab/macOS-CI.yml' - local: '/.gitlab/coverity.yml' - local: '/.gitlab/linux-metadata-validate.yml' - local: '/.gitlab/doxygen.yml' diff --git a/.gitlab/macOS-CI.yml b/.gitlab/macOS-CI.yml new file mode 100644 index 0000000000..b423630e91 --- /dev/null +++ b/.gitlab/macOS-CI.yml @@ -0,0 +1,47 @@ +########################################################################## +# Build KiCad on Windows and save the results +########################################################################## +macos_build: + stage: build + tags: + - kicad-macos + interruptible: false + rules: + - if: $CI_PIPELINE_SOURCE == "schedule" + when: never + - if: $CI_PROJECT_ROOT_NAMESPACE == "kicad" && $CI_COMMIT_REF_PROTECTED == "true" + script: + - mkdir -p build/macos + - cd build/macos + - cmake + -G Ninja + -DCMAKE_BUILD_TYPE=RelWithDebInfo + -DDEFAULT_INSTALL_PATH=/Library/Application\ Support /kicad + -DOCC_INCLUDE_DIR=/opt/homebrew/Cellar/opencascade/7.7.2_2/include/opencascade + -DOCC_LIBRARY_DIR=/opt/homebrew/Cellar/opencascade/7.7.2_2/Lib + -DCMAKE_INSTALL_PREFIX=/Users/ci/kicad-mac-builder/build/kicad-dest + -DCMAKE_C_COMPILER=/usr/bin/clang + -DCMAKE_CXX_COMPILER=/usr/bin/clang++ + -DwxWidgets_CONFIG_EXECUTABLE=/Users/ci/kicad-mac-builder/build/wxwidgets-dest/bin/wx-config + -DKICAD_BUILD_I18N=ON + -DKICAD_SCRIPTING_WXPYTHON=ON + -DKICAD_BUILD_PNS_DEBUG_TOOL=ON + -DPYTHON_EXECUTABLE=/Users/ci/kicad-mac-builder/build/python-dest/Library/Frameworks/Python.framework/Versions/Current/bin/python3 + -DPYTHON_INCLUDE_DIR=/Users/ci/kicad-mac-builder/build/python-dest/Library/Frameworks/Python.framework/Versions/Current/include/python3.9/ + -DPYTHON_LIBRARY=/Users/ci/kicad-mac-builder/build/python-dest/Library/Frameworks/Python.framework/Versions/Current/lib/libpython3.9.dylib + -DPYTHON_SITE_PACKAGE_PATH=/Users/ci/kicad-mac-builder/build/python-dest/Library/Frameworks/Python.framework/Versions/Current/lib/python3.9/site-packages + -DPYTHON_FRAMEWORK=/Users/ci/kicad-mac-builder/build/python-dest/Library/Frameworks/Python.framework + -DNGSPICE_INCLUDE_DIR=/Users/ci/kicad-mac-builder/build/ngspice-dest/include + -DNGSPICE_LIBRARY=/Users/ci/kicad-mac-builder/build/ngspice-dest/lib/libngspice.dylib + -DKICAD_USE_3DCONNEXION=ON + ../../ + - cmake --build . 2>&1 | tee compilation_log.txt + - cd ../../ + artifacts: + # Only save the artifacts that are needed for running the tests in the next stage + # and the compilation log. The entire build directory is too large to save as an + # artifact. + expire_in: 2 hrs + when: always + paths: + - build/macos/compilation_log.txt