Skip to content

Commit ab4ae6c

Browse files
committed
ci(conda): add micromamba-based wheel build workflow for Linux and macOS
- test Python 3.9/3.10/3.11 build matrix - install Bazelisk and build wheels via python -m build - upload wheel artifacts per OS and Python version - document optional Apple toolchain patch step for LC_UUID failures
1 parent 92c77cb commit ab4ae6c

1 file changed

Lines changed: 79 additions & 0 deletions

File tree

.github/workflows/conda-build.yml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: Build data-validation with Conda
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
release:
11+
types: [published]
12+
workflow_dispatch:
13+
14+
jobs:
15+
build:
16+
runs-on: ${{ matrix.os }}
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
os: [ubuntu-latest, macos-latest]
21+
python-version: ["3.9", "3.10", "3.11"]
22+
23+
steps:
24+
- name: Checkout
25+
uses: actions/checkout@v4
26+
27+
- name: Setup Micromamba
28+
uses: mamba-org/setup-micromamba@v1
29+
with:
30+
environment-name: tfdv-build
31+
cache-environment: true
32+
create-args: >-
33+
python=${{ matrix.python-version }}
34+
35+
- name: Display environment info
36+
shell: bash -l {0}
37+
run: |
38+
micromamba info
39+
micromamba list
40+
41+
- name: Install Bazel
42+
shell: bash -l {0}
43+
run: |
44+
# Install Bazelisk (manages Bazel versions)
45+
if [ "$RUNNER_OS" == "Linux" ]; then
46+
curl -Lo /tmp/bazelisk https://github.com/bazelbuild/bazelisk/releases/download/v1.20.0/bazelisk-linux-amd64
47+
elif [ "$RUNNER_OS" == "macOS" ]; then
48+
curl -Lo /tmp/bazelisk https://github.com/bazelbuild/bazelisk/releases/download/v1.20.0/bazelisk-darwin-amd64
49+
fi
50+
chmod +x /tmp/bazelisk
51+
sudo mv /tmp/bazelisk /usr/local/bin/bazel
52+
echo "USE_BAZEL_VERSION=6.5.0" >> $GITHUB_ENV
53+
bazel --version
54+
55+
# Needed for Xcode 26.x in some CI environments; without this patch,
56+
# Bazel Apple toolchain may fail with an "LC_UUID missing" linker error.
57+
# Currently CI is passing, so keep this disabled. Uncomment if CI starts
58+
# failing with an "LC_UUID missing" error.
59+
# - name: Patch Apple CC toolchain (macOS only)
60+
# if: runner.os == 'macOS'
61+
# shell: bash -l {0}
62+
# run: bazel build //:patch_local_config_apple_cc
63+
64+
- name: Install build tooling
65+
shell: bash -l {0}
66+
run: |
67+
python -m pip install numpy~=1.22.0
68+
python -m pip install --upgrade pip build wheel "setuptools<69.3"
69+
70+
- name: Build the package
71+
shell: bash -l {0}
72+
run: |
73+
python -m build --wheel --no-isolation
74+
75+
- name: Upload wheel artifact
76+
uses: actions/upload-artifact@v4.4.0
77+
with:
78+
name: data-validation-wheel-${{ matrix.os }}-py${{ matrix.python-version }}
79+
path: dist/*.whl

0 commit comments

Comments
 (0)