Skip to content

Commit

Permalink
Merge pull request #77 from aktech/build-in-docker-action
Browse files Browse the repository at this point in the history
Add workflow to build inside docker
  • Loading branch information
aktech authored Sep 19, 2024
2 parents 2005d9b + 0ff52f2 commit b430343
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 2 deletions.
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 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
2 changes: 0 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit b430343

Please sign in to comment.