From 5503a36acb299ff37cae6219f020f13e96f95beb Mon Sep 17 00:00:00 2001 From: Amit Kumar Date: Fri, 4 Oct 2024 16:59:17 +0530 Subject: [PATCH] Add back workflow to build inside docker --- .github/workflows/build.yml | 46 +++++++++++++++++++++++++++++++++++++ docker-compose.yml | 2 -- 2 files changed, 46 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..684de852 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,46 @@ +name: Build tfx-bsl + +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: tfx-bsl-wheel-py${{ matrix.python-version }} + path: dist/*.whl + + - name: Install built wheel + run: pip install dist/*.whl diff --git a/docker-compose.yml b/docker-compose.yml index 81752cd7..cf88e605 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -12,8 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -version: '3.1' - # We mount the TFX BSL project root at /build (which is the WORKDIR of the # image) in the container. services: