#grain Adds a open source tutorial for MapDataset
and IterDataset
#1922
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: tests | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
jobs: | |
build-and-test: | |
name: "Python ${{ matrix.python-version }} on ${{ matrix.os }}" | |
runs-on: "${{ matrix.os }}" | |
strategy: | |
matrix: | |
python-version: ["3.10", "3.11", "3.12"] | |
os: [ubuntu-latest] | |
steps: | |
- uses: "actions/checkout@v2" | |
- name: Create directory | |
run: | | |
mkdir -p /tmp/grain | |
cp -r . /tmp/grain | |
- name: Build package | |
run: | | |
set -xe | |
export PYTHON_VERSION=${{ matrix.python-version }} | |
export PYTHON_MAJOR_VERSION=$(echo $PYTHON_VERSION | cut -d. -f1) | |
export PYTHON_MINOR_VERSION=$(echo $PYTHON_VERSION | cut -d. -f2) | |
export BAZEL_VERSION="5.4.0" | |
export AUDITWHEEL_PLATFORM="manylinux2014_x86_64" | |
cd /tmp/grain | |
DOCKER_BUILDKIT=1 docker build --progress=plain --no-cache \ | |
--build-arg AUDITWHEEL_PLATFORM=${AUDITWHEEL_PLATFORM} \ | |
--build-arg PYTHON_VERSION=${PYTHON_MAJOR_VERSION}${PYTHON_MINOR_VERSION} \ | |
--build-arg BAZEL_VERSION=${BAZEL_VERSION} \ | |
-t grain:${PYTHON_VERSION} grain/oss | |
docker run --rm -a stdin -a stdout -a stderr \ | |
--env PYTHON_VERSION=${PYTHON_VERSION} \ | |
--env PYTHON_MAJOR_VERSION=${PYTHON_MAJOR_VERSION} \ | |
--env PYTHON_MINOR_VERSION=${PYTHON_MINOR_VERSION} \ | |
--env BAZEL_VERSION=${BAZEL_VERSION} \ | |
--env AUDITWHEEL_PLATFORM=${AUDITWHEEL_PLATFORM} \ | |
-v /tmp/grain:/tmp/grain \ | |
--name grain grain:${PYTHON_VERSION} \ | |
bash grain/oss/build_whl.sh |