Skip to content

Commit

Permalink
Add workflow to test build on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
alopezz committed Jan 17, 2024
1 parent 5abf1c6 commit 7fe461f
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .builders/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
38 changes: 38 additions & 0 deletions .github/workflows/build-deps-macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# 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-13
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: "Remove preinstalled environment"
run: |
# We do this 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)
- 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
cache_dir=$(mktemp -d -t 'cached.prefix')
${DD_PYTHON3} .builders/build.py --python 3 --cache-dir "${cache_dir}" out_py3

0 comments on commit 7fe461f

Please sign in to comment.