build-openvisus #717
Workflow file for this run
This file contains hidden or 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: build-openvisus | |
| on: [push] | |
| env: | |
| PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }} | |
| PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} | |
| ANACONDA_TOKEN: ${{ secrets.ANACONDA_TOKEN }} | |
| DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | |
| DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }} | |
| jobs: | |
| build-windows-cpython: | |
| runs-on: windows-2022 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: [ '3.9' , '3.10', '3.11', '3.12', '3.13'] | |
| steps: | |
| - name: git clone OpenVisus | |
| uses: actions/checkout@v2 | |
| - name: install cpython | |
| uses: actions/setup-python@v2 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Compile (cpython) | |
| shell: bash | |
| run: | | |
| set -ex | |
| export PYTHON_VERSION=${{ matrix.python-version }} | |
| source ./scripts/cpython.windows.sh | |
| build-windows-conda: | |
| runs-on: windows-2022 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: [ '3.9', '3.10' ] # TODO: getting conflicts '3.11', '3.12' | |
| steps: | |
| - name: git clone OpenVisus | |
| uses: actions/checkout@v2 | |
| - name: Compile (cpython) | |
| shell: bash | |
| run: | | |
| set -ex | |
| export PYTHON_VERSION=${{ matrix.python-version }} | |
| source ./scripts/conda.windows.sh | |
| build-macos-cpython: | |
| runs-on: macos-11 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: [ '3.9' , '3.10', '3.11', '3.12', '3.13' ] | |
| steps: | |
| - name: git clone OpenVisus | |
| uses: actions/checkout@v2 | |
| - name: install cpython | |
| uses: actions/setup-python@v2 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Compile (cpython) | |
| shell: bash | |
| run: | | |
| set -ex | |
| export PYTHON_VERSION=${{ matrix.python-version }} | |
| source ./scripts/cpython.macos.sh | |
| build-macos-conda: | |
| runs-on: macos-11 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: [ '3.9', '3.10' ] # todo '3.11', '3.12' getting conflicts | |
| steps: | |
| - name: git clone OpenVisus | |
| uses: actions/checkout@v2 | |
| - name: Compile (cpython) | |
| shell: bash | |
| run: | | |
| set -ex | |
| export PYTHON_VERSION=${{ matrix.python-version }} | |
| source ./scripts/conda.macos.sh | |
| build-ubuntu: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - python-version: "3.9" | |
| python-executable: "/opt/python39/bin/python3.9" | |
| python-tag: "cp39" | |
| - python-version: "3.10" | |
| python-executable: "/opt/python310/bin/python3.10" | |
| python-tag: "cp310" | |
| - python-version: "3.11" | |
| python-executable: "/opt/python311/bin/python3.11" | |
| python-tag: "cp311" | |
| - python-version: "3.12" | |
| python-executable: "/opt/python312/bin/python3.12" | |
| python-tag: "cp312" | |
| - python-version: "3.13" | |
| python-executable: "/opt/python313/bin/python3.13" | |
| python-tag: "cp313" | |
| steps: | |
| - name: git clone OpenVisus | |
| uses: actions/checkout@v2 | |
| - name: Compile cpython | |
| shell: bash | |
| run: | | |
| set -ex | |
| IMAGE_BUILD_WHEELS=visus/portable-linux-binaries_x86_64:5.1 | |
| export GIT_TAG=`git describe --tags --exact-match 2>/dev/null || true` | |
| # run docker to compile portable OpenVisus | |
| docker run --rm \ | |
| -v ${PWD}:/home/OpenVisus \ | |
| -w /home/OpenVisus \ | |
| -e BUILD_DIR=build_docker \ | |
| -e GIT_TAG=${GIT_TAG} \ | |
| -e Python_EXECUTABLE=${{ matrix.python-executable }} \ | |
| -e PYTHON_TAG=${{ matrix.python-tag }} \ | |
| -e PLAT_NAME=manylinux2014_x86_64 \ | |
| -e PYPI_USERNAME=${PYPI_USERNAME} \ | |
| -e PYPI_TOKEN=${PYPI_TOKEN} \ | |
| -e ANACONDA_TOKEN=${ANACONDA_TOKEN} \ | |
| ${IMAGE_BUILD_WHEELS} \ | |
| bash scripts/ubuntu.sh | |
| # mod_visus | |
| if [[ "${GIT_TAG}" != "" && "${{ matrix.python-version }}" == "3.9" ]] ; then | |
| sleep 90 # give time to 'receive' the wheel | |
| pushd Docker/mod_visus | |
| MODVISUS_IMAGE=visus/mod_visus_x86_64 | |
| docker build \ | |
| --tag ${MODVISUS_IMAGE}:${GIT_TAG} \ | |
| --tag ${MODVISUS_IMAGE}:latest \ | |
| --build-arg TAG=${GIT_TAG} \ | |
| --progress=plain \ | |
| ./ | |
| echo ${DOCKER_TOKEN} | docker login -u=${DOCKER_USERNAME} --password-stdin | |
| docker push ${MODVISUS_IMAGE}:${GIT_TAG} | |
| docker push ${MODVISUS_IMAGE}:latest | |
| popd | |
| fi |