resolve error when running with python -OO #6
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
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: Test | |
on: [push, pull_request] | |
jobs: | |
ubuntu: | |
name: ubuntu-latest | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
docker_image: [quay.io/pypa/manylinux2010_x86_64] | |
platform: [manylinux2010_x86_64] | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Pull Docker image | |
run: | | |
docker pull ${{ matrix.docker_image }} | |
- name: Run Docker image | |
run: | | |
docker run --rm -e PLAT=${{ matrix.platform }} -v `pwd`:/io ${{ matrix.docker_image }} $PRE_CMD /io/.github/workflows/build-wheels.sh | |
- name: Deploy package | |
if: ${{ success() && github.event_name == 'push' && github.ref == 'refs/heads/master' }} | |
env: | |
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} | |
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | |
run: | | |
pip install twine | |
twine upload --skip-existing wheelhouse/cosmolopy* | |
macosx: | |
name: ${{ matrix.os }} ${{ matrix.architecture }}, Python ${{ matrix.python-version }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
architecture: [x64] | |
os: [macos-latest] | |
python-version: [3.6, 3.7, 3.8] | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} ${{ matrix.architecture }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
architecture: ${{ matrix.architecture }} | |
- name: Install dependencies | |
run: | | |
brew install swig@3 | |
brew link swig@3 | |
python -m pip install --upgrade pip setuptools wheel | |
pip install -r requirements.txt | |
- name: Create wheels | |
run: | | |
python setup.py sdist -d wheelhouse | |
pip wheel . -w wheelhouse | |
cd wheelhouse | |
pip install cosmolopy --no-index -f . | |
python -c "import cosmolopy; import cosmolopy.EH.power" | |
cd .. | |
- name: Deploy package | |
if: ${{ success() && github.event_name == 'push' && github.ref == 'refs/heads/master' }} | |
env: | |
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} | |
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | |
run: | | |
pip install twine | |
twine upload --skip-existing wheelhouse/cosmolopy* | |