# This action generates wheel files for python 2 and 3. name: build wheels on: push: branches: - 'master' jobs: build: # There were errors on Mac that would lead to non-stop printing of # error messages forever instead of the job crashing. To prevent this, # a timeout is placed here (default value is otherwise 360min). timeout-minutes: 30 runs-on: ${{ matrix.os }} strategy: matrix: os: [ubuntu-latest, macos-latest, windows-latest] # see supported versions at # https://raw.githubusercontent.com/actions/python-versions/master/versions-manifest.json python-version: [2.7, 3.5, 3.6, 3.7, 3.8] exclude: - os: windows-latest python-version: 2.7 # causes a Shapely install error env: OS: ${{ matrix.os }} PYTHON: ${{ matrix.python-version }} steps: - uses: actions/checkout@v2 # ---------------- # Install python and base packages # ---------------- - name: Set up python ${{ matrix.python-version }} on ${{ runner.os }} uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} - name: Display python version run: | python -c "import sys; print(sys.version)" - name: Display system information run : | python -c "import sys; print(sys.maxsize);" python -c "import platform; print(platform.uname());" python -c "import platform; print(platform.platform());" python -c "import platform; print(platform.architecture());" python -c "import platform; print(platform.processor());" python -c "import platform; print(platform.python_compiler());" - name: Upgrade basic packages run: | python -m pip install --upgrade pip setuptools wheel # ---------------- # Set up pip cache # ---------------- - name: Get Date id: get-date run: | echo "::set-output name=date::$(/bin/date -u "+%Y%m%d")" shell: bash - uses: actions/cache@v1 if: startsWith(runner.os, 'Linux') with: path: ~/.cache/pip key: ${{ runner.os }}-pip-${{ steps.get-date.outputs.date }}-${{ hashFiles('**/requirements.txt') }} restore-keys: | ${{ runner.os }}-pip- - uses: actions/cache@v1 if: startsWith(runner.os, 'macOS') with: path: ~/Library/Caches/pip key: ${{ runner.os }}-pip-${{ steps.get-date.outputs.date }}-${{ hashFiles('**/requirements.txt') }} restore-keys: | ${{ runner.os }}-pip- - uses: actions/cache@v1 if: startsWith(runner.os, 'Windows') with: path: ~\AppData\Local\pip\Cache key: ${{ runner.os }}-pip-${{ steps.get-date.outputs.date }}-${{ hashFiles('**/requirements.txt') }} restore-keys: | ${{ runner.os }}-pip- # ---------------- # Install dependencies # ---------------- - name: Install dependencies run: | pip install -r requirements.txt # ---------------- # Generate wheels # ---------------- - name: Generate wheels run: | python setup.py sdist python setup.py bdist_wheel # ---------------- # Upload artifacts # ---------------- - uses: actions/upload-artifact@v2 with: name: ${{ runner.os }}-py${{ matrix.python-version }}-dist path: dist/