diff --git a/.builders/build.py b/.builders/build.py index 52470253e3613f..564d5e06e4e49e 100644 --- a/.builders/build.py +++ b/.builders/build.py @@ -93,7 +93,7 @@ def build_macos(): env = { **os.environ, - 'DD_PREFIX_CACHE': args.cache_dir, + 'DD_PREFIX_CACHE': args.cache_dir or '', 'DD_MOUNT_DIR': mount_dir, } check_process( diff --git a/.builders/images/macos/build.sh b/.builders/images/macos/build.sh index c1a10359197c36..9df59a28c447db 100644 --- a/.builders/images/macos/build.sh +++ b/.builders/images/macos/build.sh @@ -30,8 +30,15 @@ install-from-source() { bash install-from-source.sh --prefix="${DD_PREFIX_PATH}" "$@" } +# mqi +IBM_MQ_VERSION=9.2.4.0-IBM-MQ-DevToolkit +curl --retry 5 --fail "https://s3.amazonaws.com/dd-agent-omnibus/ibm-mq-backup/${IBM_MQ_VERSION}-MacX64.pkg" -o /tmp/mq_client.pkg +sudo installer -pkg /tmp/mq_client.pkg -target / +rm -rf /tmp/mq_client.pkg + # Restore cache if it exists if [[ -n ${DD_PREFIX_CACHE:-} && -d ${DD_PREFIX_CACHE:-} ]]; then + echo "Using provided cache for built libraries." cp -r "${DD_PREFIX_CACHE}" "${DD_PREFIX_PATH}" else # openssl diff --git a/.github/workflows/build-deps-macos.yml b/.github/workflows/build-deps-macos.yml new file mode 100644 index 00000000000000..7fcb20d40579d7 --- /dev/null +++ b/.github/workflows/build-deps-macos.yml @@ -0,0 +1,40 @@ +# Workflow for dev / testing purposes only, to be migrated to a common workflow alongside +# the rest of the deps build + +name: Build dependencies for mac OS + +on: + pull_request + +jobs: + build-deps-macos: + name: "Build wheels for integration dependencies for mac OS" + runs-on: macos-12 + steps: + - name: "Install Python(s)" + env: + # Despite the name, this is built for the macOS 11 SDK on arm64 and 10.9+ on intel + PYTHON3_DOWNLOAD_URL: "https://www.python.org/ftp/python/3.11.5/python-3.11.5-macos11.pkg" + PYTHON2_DOWNLOAD_URL: "https://www.python.org/ftp/python/2.7.18/python-2.7.18-macosx10.9.pkg" + run: | + curl "$PYTHON3_DOWNLOAD_URL" -o python3.pkg + sudo installer -pkg python3.pkg -target / + + curl "$PYTHON2_DOWNLOAD_URL" -o python2.pkg + sudo installer -pkg python2.pkg -target / + + - name: "Set up environment" + run: | + # We remove everything that comes pre-installed via brew to avoid depending or shipping stuff that + # comes in the runner through brew to better control what might get shipped in the wheels via + # `delocate` + brew remove --force --ignore-dependencies $(brew list --formula) + brew install coreutils + - uses: actions/checkout@v4 + - name: "Run the build" + env: + DD_PYTHON3: "/Library/Frameworks/Python.framework/Versions/3.11/bin/python3" + DD_PYTHON2: "/Library/Frameworks/Python.framework/Versions/2.7/bin/python" + run: | + ${DD_PYTHON3} -m pip install packaging + ${DD_PYTHON3} .builders/build.py --python 3 out_py3