Skip to content

Fix: Add --no-deps option #1160

Fix: Add --no-deps option

Fix: Add --no-deps option #1160

Workflow file for this run

name: CI
on:
push:
pull_request:
jobs:
readme:
container: iquiw/alpine-emacs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- run: emacs --batch README.org --eval '(org-md-export-to-markdown)'
- uses: actions/upload-artifact@v3
with:
name: README
path: README.md
build:
needs: readme
strategy:
matrix:
runs-on: [ubuntu-latest, macos-11, windows-latest]
python: ['3.8', '3.9', '3.10', '3.11', '3.12']
gym: ['gym', 'gymnasium']
exclude:
- python: "3.11"
gym: "gym"
- python: "3.12"
gym: "gym"
fail-fast: false
runs-on: ${{ matrix.runs-on }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- name: Get pip cache dir
id: pip-cache
run: echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
shell: bash
- name: pip cache
uses: actions/cache@v3
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip${{ matrix.python }}
restore-keys: ${{ runner.os }}-pip${{ matrix.python }}
- name: Install cpprb
run: pip install '.[all]'
- name: Install Gym(nasium)
run: pip install ${{ matrix.gym }}
- run: python -m unittest discover . '*.py'
working-directory: './test'
- uses: actions/download-artifact@v3
with:
name: README
path: README
- run: mv README/README.md README.md
- run: pip wheel . -w dist --no-deps
if: startsWith(runner.os, 'Linux') != true
- uses: actions/upload-artifact@v3
with:
name: dist
path: dist
if: startsWith(runner.os, 'Linux') != true
- name: Upload to PyPI
run: python -m twine upload -u __token__ -p ${{ secrets.pypi_password }} --skip-existing dist/cpprb-*
if: github.event_name == 'push' && startsWith(github.event.ref,'refs/tags/v') && startsWith(runner.os, 'Linux') != true
continue-on-error: true
build_targz:
needs: readme
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.8'
- uses: actions/download-artifact@v3
with:
name: README
path: README
- run: mv README/README.md README.md
- run: python setup.py build_ext sdist
- uses: actions/upload-artifact@v3
with:
name: dist
path: dist
- run: pip install twine
- name: Upload to PyPI
run: python -m twine upload -u __token__ -p ${{ secrets.pypi_password }} --skip-existing dist/cpprb-*tar.gz
if: github.event_name == 'push' && startsWith(github.event.ref,'refs/tags/v')
build_manylinux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3'
- uses: docker/setup-buildx-action@v2
- uses: docker/build-push-action@v4
with:
push: false
build-args: |
ON_CI=1
file: Dockerfile
cache-to: type=gha,mode=max,scope=${{github.ref_name}}
cache-from: type=gha,scope=${{github.ref_name}}
load: true
tags: cpprb/wheel:latest
- run: |
docker create --name wheel cpprb/wheel:latest
docker cp wheel:/dist/. dist/
- uses: actions/upload-artifact@v3
with:
name: dist
path: dist
- run: pip install twine
- name: Upload to PyPI
run: python -m twine upload -u __token__ -p ${{ secrets.pypi_password }} --skip-existing dist/cpprb-*
if: github.event_name == 'push' && startsWith(github.event.ref,'refs/tags/v')
build_aarch:
needs: readme
strategy:
matrix:
py: ['cp37-cp37m', 'cp38-cp38', 'cp39-cp39', 'cp310-cp310', 'cp311-cp311', 'cp312-cp312']
runs-on: ubuntu-latest
env:
img: quay.io/pypa/manylinux2014_aarch64
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.8'
- uses: docker/setup-qemu-action@v2
with:
platforms: arm64
- uses: actions/download-artifact@v3
with:
name: README
path: README
- run: mv README/README.md README.md
- run: |
docker run -v $(pwd):/cpprb ${img} bash -c 'for PIP in /opt/python/'${{ matrix.py }}'/bin/pip; do ${PIP} wheel /cpprb -w /cpprb/wheelhouse/ --no-deps; done'
- run: |
docker run -v $(pwd):/cpprb ${img} bash -c 'for WHL in /cpprb/wheelhouse/cpprb-*.whl; do auditwheel repair ${WHL} -w /cpprb/dist; done'
- uses: actions/upload-artifact@v3
with:
name: dist
path: dist
- run: pip install twine
- name: Upload to PyPI
run: python -m twine upload -u __token__ -p ${{ secrets.pypi_password }} --skip-existing dist/cpprb-*
if: github.event_name == 'push' && startsWith(github.event.ref,'refs/tags/v')