-
Notifications
You must be signed in to change notification settings - Fork 416
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
77ae2da
commit b1b1d41
Showing
4 changed files
with
93 additions
and
138 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
name: 'Install Using PyPI' | ||
description: 'Setup environment and install using the PyPI-based toolchain' | ||
inputs: | ||
need-cartopy: | ||
description: 'Whether Cartopy is needed' | ||
required: true | ||
default: 'true' | ||
type: | ||
description: 'Whether test or doc build' | ||
required: true | ||
version-file: | ||
description: 'Name of the version file to use for installation' | ||
required: true | ||
default: 'requirements.txt' | ||
python-version: | ||
description: 'What version of Python to use' | ||
required: true | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/[email protected] | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
# Use pip to find the right cache dir and then sets up caching for it | ||
- name: Get pip cache dir | ||
shell: bash | ||
id: pip-cache | ||
run: echo "::set-output name=dir::$(pip cache dir)" | ||
|
||
- name: Setup pip caching | ||
uses: actions/[email protected] | ||
with: | ||
path: ${{ steps.pip-cache.outputs.dir }} | ||
key: pip-${{ inputs.type }}-${{ runner.os }}-${{ inputs.python-version }}-${{ hashFiles('ci/*') }} | ||
restore-keys: | | ||
pip-${{ inputs.type }}-${{ runner.os }}-${{ inputs.python-version }}-${{ hashFiles('ci/*') }} | ||
pip-${{ inputs.type }}-${{ runner.os }}-${{ inputs.python-version }}- | ||
pip-${{ inputs.type }}-${{ runner.os }}- | ||
pip-${{ inputs.type }}- | ||
# This installs the stuff needed to build and install Shapely and CartoPy from source. | ||
- name: Install CartoPy build dependencies | ||
if: ${{ inputs.need-cartopy == 'true' }} | ||
shell: bash | ||
run: | | ||
sudo apt-get install libgeos-dev | ||
python -m pip install --upgrade pip setuptools | ||
python -m pip install --no-binary :all: shapely | ||
- name: Install dependencies | ||
shell: bash | ||
run: python -m pip install -r ci/${{ inputs.type }}_requirements.txt -c ci/${{ inputs.version-file }} | ||
|
||
- name: Download Cartopy Maps | ||
if: ${{ inputs.need-cartopy == 'true' }} | ||
shell: bash | ||
run: ci/download_cartopy_maps.py | ||
|
||
- name: Install | ||
shell: bash | ||
run: python -m pip install -c ci/${{ inputs.version-file }} . |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,43 +47,18 @@ jobs: | |
- name: Get tags | ||
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/[email protected] | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
# This uses pip to find the right cache dir and then sets up caching for it | ||
- name: Get pip cache dir | ||
id: pip-cache | ||
run: echo "::set-output name=dir::$(pip cache dir)" | ||
|
||
- name: Setup pip cache | ||
uses: actions/[email protected] | ||
with: | ||
path: ${{ steps.pip-cache.outputs.dir }} | ||
key: pip-docs-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('ci/*') }} | ||
restore-keys: | | ||
pip-docs-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('ci/*') }} | ||
pip-docs-${{ runner.os }}-${{ matrix.python-version }}- | ||
pip-docs-${{ runner.os }}- | ||
pip-docs- | ||
- name: Add extras to requirements | ||
run: cat ci/extra_requirements.txt >> ci/doc_requirements.txt | ||
|
||
- name: Setup PROJ | ||
uses: ./.github/actions/setup-proj | ||
|
||
# This installs the stuff needed to build and install Shapely and CartoPy from source. | ||
- name: Install dependencies (PyPI) | ||
run: | | ||
sudo apt-get install libgeos-dev | ||
python -m pip install --upgrade pip setuptools | ||
python -m pip install --no-binary :all: shapely | ||
python -m pip install -r ci/doc_requirements.txt -r ci/extra_requirements.txt -c ci/${{ matrix.dep-versions }} | ||
- name: Download Cartopy Maps | ||
run: ci/download_cartopy_maps.py | ||
|
||
- name: Install self | ||
run: python -m pip install -c ci/${{ matrix.dep-versions }} . | ||
- name: Install using PyPI | ||
uses: ./.github/actions/install-pypi | ||
with: | ||
need-cartopy: true | ||
type: 'doc' | ||
python-version: ${{ matrix.dep-versions }} | ||
|
||
- name: Build docs | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,27 +28,6 @@ jobs: | |
- name: Get tags | ||
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/[email protected] | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
# This uses pip to find the right cache dir and then sets up caching for it | ||
- name: Get pip cache dir | ||
id: pip-cache | ||
run: echo "::set-output name=dir::$(pip cache dir)" | ||
|
||
- name: Setup caching | ||
uses: actions/[email protected] | ||
with: | ||
path: ${{ steps.pip-cache.outputs.dir }} | ||
key: pip-tests-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('ci/*') }} | ||
restore-keys: | | ||
pip-tests-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('ci/*') }} | ||
pip-tests-${{ runner.os }}-${{ matrix.python-version }}- | ||
pip-tests-${{ runner.os }}- | ||
pip-tests- | ||
- name: Assemble test requirements | ||
run: | | ||
cat ci/extra_requirements.txt >> ci/test_requirements.txt | ||
|
@@ -58,19 +37,13 @@ jobs: | |
- name: Setup PROJ | ||
uses: ./.github/actions/setup-proj | ||
|
||
# This installs the stuff needed to build and install Shapely and CartoPy from source. | ||
- name: Install dependencies | ||
run: | | ||
sudo apt-get install libgeos-dev | ||
python -m pip install --upgrade pip setuptools | ||
python -m pip install --no-binary :all: shapely | ||
python -m pip install -r ci/test_requirements.txt -c ci/Prerelease | ||
- name: Download Cartopy Maps | ||
run: ci/download_cartopy_maps.py | ||
|
||
- name: Install | ||
run: python -m pip install -c ci/Prerelease . | ||
- name: Install using PyPI | ||
uses: ./.github/actions/install-pypi | ||
with: | ||
need-cartopy: true | ||
type: test | ||
version-file: Prerelease | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Run tests | ||
id: tests | ||
|
@@ -107,27 +80,6 @@ jobs: | |
- name: Get tags | ||
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/[email protected] | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
# This uses pip to find the right cache dir and then sets up caching for it | ||
- name: Get pip cache dir | ||
id: pip-cache | ||
run: echo "::set-output name=dir::$(pip cache dir)" | ||
|
||
- name: Setup pip cache | ||
uses: actions/[email protected] | ||
with: | ||
path: ${{ steps.pip-cache.outputs.dir }} | ||
key: pip-docs-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('ci/*') }} | ||
restore-keys: | | ||
pip-docs-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('ci/*') }} | ||
pip-docs-${{ runner.os }}-${{ matrix.python-version }}- | ||
pip-docs-${{ runner.os }}- | ||
pip-docs- | ||
- name: Assemble doc requirements | ||
run: | | ||
cat ci/extra_requirements.txt >> ci/doc_requirements.txt | ||
|
@@ -137,19 +89,13 @@ jobs: | |
- name: Setup PROJ | ||
uses: ./.github/actions/setup-proj | ||
|
||
# This installs the stuff needed to build and install Shapely and CartoPy from source. | ||
- name: Install dependencies (PyPI) | ||
run: | | ||
sudo apt-get install libgeos-dev | ||
python -m pip install --upgrade pip setuptools | ||
python -m pip install --no-binary :all: shapely | ||
python -m pip install -r ci/doc_requirements.txt -c ci/Prerelease | ||
- name: Download Cartopy Maps | ||
run: ci/download_cartopy_maps.py | ||
|
||
- name: Install self | ||
run: python -m pip install -c ci/Prerelease . | ||
- name: Install using PyPI | ||
uses: ./.github/actions/install-pypi | ||
with: | ||
need-cartopy: true | ||
type: doc | ||
version-file: Prerelease | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Build docs | ||
id: build | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,27 +38,6 @@ jobs: | |
- name: Get tags | ||
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/[email protected] | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
# This uses pip to find the right cache dir and then sets up caching for it | ||
- name: Get pip cache dir | ||
id: pip-cache | ||
run: echo "::set-output name=dir::$(pip cache dir)" | ||
|
||
- name: Setup caching | ||
uses: actions/[email protected] | ||
with: | ||
path: ${{ steps.pip-cache.outputs.dir }} | ||
key: pip-tests-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('ci/*') }} | ||
restore-keys: | | ||
pip-tests-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('ci/*') }} | ||
pip-tests-${{ runner.os }}-${{ matrix.python-version }}- | ||
pip-tests-${{ runner.os }}- | ||
pip-tests- | ||
- name: Add extras to requirements | ||
if: ${{ matrix.no-extras != 'No Extras' }} | ||
run: cat ci/extra_requirements.txt >> ci/test_requirements.txt | ||
|
@@ -85,22 +64,13 @@ jobs: | |
- name: Setup PROJ | ||
uses: ./.github/actions/setup-proj | ||
|
||
# This installs the stuff needed to build and install Shapely and CartoPy from source. | ||
- name: Install CartoPy build dependencies | ||
if: ${{ matrix.no-extras != 'No Extras' }} | ||
run: | | ||
sudo apt-get install libgeos-dev | ||
python -m pip install --no-binary :all: shapely | ||
- name: Install test dependencies | ||
run: python -m pip install -r ci/test_requirements.txt -c ci/${{ matrix.dep-versions }} | ||
|
||
- name: Download Cartopy Maps | ||
if: ${{ matrix.no-extras != 'No Extras' }} | ||
run: ci/download_cartopy_maps.py | ||
|
||
- name: Install | ||
run: python -m pip install -c ci/${{ matrix.dep-versions }} . | ||
- name: Install from PyPI | ||
uses: ./.github/actions/install-pypi | ||
with: | ||
need-cartopy: ${{ matrix.no-extras != 'No Extras' }} | ||
type: 'test' | ||
version-file: ${{ matrix.dep-versions }} | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Run tests | ||
uses: ./.github/actions/run-tests | ||
|