Skip to content

Add build workflow via docker #259

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Build

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11"]

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Upgrade pip
run: |
python -m pip install --upgrade pip

- name: Build the manylinux2010 image
run: docker compose build manylinux2010

- name: Build the package for Python ${{ matrix.python-version }}
run: |
version="${{ matrix.python-version }}"
docker compose run -e PYTHON_VERSION=$(echo "$version" | sed 's/\.//') manylinux2010

- name: Upload wheel artifact for Python ${{ matrix.python-version }}
uses: actions/upload-artifact@v3
with:
name: data-validation-wheel-py${{ matrix.python-version }}
path: dist/*.whl

- name: Install built wheel
run: pip install dist/*.whl
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ tested at Google.

### 1. Install Docker

Please first install `docker` and `docker-compose` by following the directions:
Please first install `docker` and `docker compose` by following the directions:
[docker](https://docs.docker.com/install/);
[docker-compose](https://docs.docker.com/compose/install/).
[docker compose](https://docs.docker.com/compose/install/).

### 2. Clone the TFDV repository

Expand All @@ -86,8 +86,8 @@ branch), pass `-b <branchname>` to the `git clone` command.
Then, run the following at the project root:

```bash
sudo docker-compose build manylinux2010
sudo docker-compose run -e PYTHON_VERSION=${PYTHON_VERSION} manylinux2010
sudo docker compose build manylinux2010
sudo docker compose run -e PYTHON_VERSION=${PYTHON_VERSION} manylinux2010
```
where `PYTHON_VERSION` is one of `{39, 310, 311}`.

Expand Down
Loading