diff --git a/.github/workflows/CI2.yml b/.github/workflows/CI2.yml deleted file mode 100644 index 3ca56ba..0000000 --- a/.github/workflows/CI2.yml +++ /dev/null @@ -1,117 +0,0 @@ -# This file was autogenerated by maturin v0.14.17 - -name: CI2 - -on: - #cmk push: - # schedule: - # - cron: '0 0 1 * *' - # pull_request: - workflow_dispatch: - -env: - CARGO_TERM_COLOR: always - -permissions: - contents: read - -jobs: - linux: - runs-on: ubuntu-latest - strategy: - matrix: - target: [x86_64, x86, aarch64, armv7, s390x, ppc64le] - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 - with: - python-version: '3.10' - - name: Build wheels - uses: PyO3/maturin-action@v1 - with: - target: ${{ matrix.target }} - args: --release --out dist --find-interpreter - sccache: 'true' - manylinux: auto - - name: Upload wheels - uses: actions/upload-artifact@v3 - with: - name: wheels - path: dist - - windows: - runs-on: windows-latest - strategy: - matrix: - target: [x64, x86] - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 - with: - python-version: '3.10' - architecture: ${{ matrix.target }} - - name: Build wheels - uses: PyO3/maturin-action@v1 - with: - target: ${{ matrix.target }} - args: --release --out dist --find-interpreter - sccache: 'true' - - name: Upload wheels - uses: actions/upload-artifact@v3 - with: - name: wheels - path: dist - - macos: - runs-on: macos-latest - strategy: - matrix: - target: [x86_64, aarch64] - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 - with: - python-version: '3.10' - - name: Build wheels - uses: PyO3/maturin-action@v1 - with: - target: ${{ matrix.target }} - args: --release --out dist --find-interpreter - sccache: 'true' - - name: Upload wheels - uses: actions/upload-artifact@v3 - with: - name: wheels - path: dist - - sdist: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Build sdist - uses: PyO3/maturin-action@v1 - with: - command: sdist - args: --out dist - - name: Upload sdist - uses: actions/upload-artifact@v3 - with: - name: wheels - path: dist - - # release: - # name: Release - # runs-on: ubuntu-latest - # if: "startsWith(github.ref, 'refs/tags/')" - # needs: [linux, windows, macos, sdist] - # steps: - # - uses: actions/download-artifact@v3 - # with: - # name: wheels - # - name: Publish to PyPI - # uses: PyO3/maturin-action@v1 - # env: - # MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }} - # with: - # command: upload - # args: --skip-existing * diff --git a/.github/workflows/CI3.yml b/.github/workflows/CI3.yml deleted file mode 100644 index 7d3e4e7..0000000 --- a/.github/workflows/CI3.yml +++ /dev/null @@ -1,193 +0,0 @@ -# This file was originally generated by maturin v0.14.17 - -name: CI3 - -on: - push: - schedule: - - cron: '0 0 1 * *' - pull_request: - workflow_dispatch: - -env: - CARGO_TERM_COLOR: always - -permissions: - contents: read - -jobs: - - test_rust: - name: Test Rust - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest, macos-latest, windows-latest] - runs-on: ${{ matrix.os }} - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Set up Rust - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - override: true - - name: Test Rust - run: cargo test --verbose --no-default-features - - - macos: - runs-on: macos-latest - strategy: - matrix: - target: [x86_64, aarch64] - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 - with: - python-version: | - 3.7 - 3.8 - 3.9 - 3.10 - 3.11 - - name: Build wheels - uses: PyO3/maturin-action@v1 - with: - target: ${{ matrix.target }} - args: --release --out dist --find-interpreter - sccache: 'true' - - name: Upload wheels - uses: actions/upload-artifact@v3 - with: - name: wheels - path: dist - - linux: - runs-on: ubuntu-latest - strategy: - matrix: - target: [x86_64] - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 - with: - python-version: | - 3.7 - 3.8 - 3.9 - 3.10 - 3.11 - - name: Build wheels - uses: PyO3/maturin-action@v1 - with: - target: ${{ matrix.target }} - args: --release --out dist --find-interpreter - sccache: 'true' - manylinux: auto - - name: Upload wheels - uses: actions/upload-artifact@v3 - with: - name: wheels - path: dist - - windows: - runs-on: windows-latest - strategy: - matrix: - target: [x64] - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 - with: - python-version: | - 3.7 - 3.8 - 3.9 - 3.10 - 3.11 - architecture: ${{ matrix.target }} - - name: Build wheels - uses: PyO3/maturin-action@v1 - with: - target: ${{ matrix.target }} - args: --release --out dist --find-interpreter - sccache: 'true' - - name: Upload wheels - uses: actions/upload-artifact@v3 - with: - name: wheels - path: dist - - sdist: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Build sdist - uses: PyO3/maturin-action@v1 - with: - command: sdist - args: --out dist - - name: Upload sdist - uses: actions/upload-artifact@v3 - with: - name: wheels - path: dist - - test: - name: Test - strategy: - fail-fast: false - matrix: - python-version: [3.7, 3.8, 3.9, "3.10", "3.11"] - os: [ubuntu-latest, macos-latest, windows-latest] - runs-on: ${{ matrix.os }} - steps: - - name: Checkout - uses: actions/checkout@v2 - - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - - name: Install flake8, etc - run: | - cd bed_reader - pwd - python -m pip install --upgrade pip - pip install flake8 pytest black isort --upgrade - - name: Lint with flake8, etc - run: | - echo "flake8" - flake8 . - echo "black" - black --version - black --verbose --check . - echo "isort" - isort --check-only . - - name: Test Python - Non-Windows - if: runner.os != 'Windows' - run: | - pip install virtualenv - virtualenv vEnv; source vEnv/bin/activate - python -m pip install --upgrade pip maturin - maturin develop - echo "requirements" - pip install -r requirements.txt - echo "requirements-dev" - pip install -r requirements-dev.txt - pytest bed_reader - - name: Test Python - Windows - if: runner.os == 'Windows' - run: | - pip install virtualenv - virtualenv vEnv; vEnv\Scripts\activate.ps1 - echo "pwd" - pwd - python -m pip install --upgrade pip maturin - echo "requirements" - pip install -r requirements.txt - echo "requirements-dev" - pip install -r requirements-dev.txt - echo "maturin" - maturin develop - echo "pytest" - pytest bed_reader \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7455ef0..7d3e4e7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,45 +1,153 @@ -name: CI +# This file was originally generated by maturin v0.14.17 + +name: CI3 + on: - # cmk push: + push: schedule: - cron: '0 0 1 * *' - + pull_request: + workflow_dispatch: + env: CARGO_TERM_COLOR: always -# Good docs: -# https://docs.github.com/en/actions/guides/building-and-testing-python (including how to run flake8) -# https://github.community/t/how-to-run-steps-involving-environment-variables-on-both-linux-and-windows/17355 -# Good examples: -# https://github.com/Intsights/fastzy/blob/152aecbb05302b0f8db7f23b0242b448ec5e6435/.github/workflows/deploy.yml -# https://github.com/polkascan/py-ed25519-bindings/blob/96638152c1902d917b8ec29adabe9cc8c3519086/.github/workflows/test.yml -# https://github.com/OpenMined/syft_experimental/blob/6630fec206d153fb5a94ad8c5365636ee462ecd9/.github/workflows/python.yml +permissions: + contents: read jobs: - ci: + + test_rust: + name: Test Rust + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + runs-on: ${{ matrix.os }} + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Set up Rust + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + - name: Test Rust + run: cargo test --verbose --no-default-features + + + macos: + runs-on: macos-latest + strategy: + matrix: + target: [x86_64, aarch64] + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + with: + python-version: | + 3.7 + 3.8 + 3.9 + 3.10 + 3.11 + - name: Build wheels + uses: PyO3/maturin-action@v1 + with: + target: ${{ matrix.target }} + args: --release --out dist --find-interpreter + sccache: 'true' + - name: Upload wheels + uses: actions/upload-artifact@v3 + with: + name: wheels + path: dist + + linux: + runs-on: ubuntu-latest + strategy: + matrix: + target: [x86_64] + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + with: + python-version: | + 3.7 + 3.8 + 3.9 + 3.10 + 3.11 + - name: Build wheels + uses: PyO3/maturin-action@v1 + with: + target: ${{ matrix.target }} + args: --release --out dist --find-interpreter + sccache: 'true' + manylinux: auto + - name: Upload wheels + uses: actions/upload-artifact@v3 + with: + name: wheels + path: dist + + windows: + runs-on: windows-latest + strategy: + matrix: + target: [x64] + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + with: + python-version: | + 3.7 + 3.8 + 3.9 + 3.10 + 3.11 + architecture: ${{ matrix.target }} + - name: Build wheels + uses: PyO3/maturin-action@v1 + with: + target: ${{ matrix.target }} + args: --release --out dist --find-interpreter + sccache: 'true' + - name: Upload wheels + uses: actions/upload-artifact@v3 + with: + name: wheels + path: dist + + sdist: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Build sdist + uses: PyO3/maturin-action@v1 + with: + command: sdist + args: --out dist + - name: Upload sdist + uses: actions/upload-artifact@v3 + with: + name: wheels + path: dist + + test: + name: Test strategy: fail-fast: false matrix: - include: - - config: {"name": "Linux", "os": "ubuntu-latest", "target": "x86_64"} - - config: {"name": "macOS", "os": "macOS-latest", "target": "x86_64"} - - config: {"name": "macOS", "os": "macOS-latest", "target": "aarch64"} - - config: {"name": "Windows", "os": "windows-latest", "target": "x64"} - python-version: [3.8, 3.9, "3.10", "3.11"] - name: Do work for for ${{ matrix.config.os }} ${{ matrix.config.arch }} ${{ python-version }} + python-version: [3.7, 3.8, 3.9, "3.10", "3.11"] + os: [ubuntu-latest, macos-latest, windows-latest] runs-on: ${{ matrix.os }} steps: - name: Checkout uses: actions/checkout@v2 - - name: Checkout testdir - uses: actions/checkout@v2 + - uses: actions/setup-python@v4 with: - path: testdir - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 - with: - python-version: ${{matrix.python-version}} - + python-version: ${{ matrix.python-version }} - name: Install flake8, etc run: | cd bed_reader @@ -55,53 +163,12 @@ jobs: black --verbose --check . echo "isort" isort --check-only . - - - name: Set up Rust - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - override: true - - name: Install Maturin - run: python -m pip install --upgrade pip maturin - - - name: Test Rust - run: cargo test --verbose --no-default-features - - - name: Build wheel with Maturin - Linux - if: startsWith(matrix.os, 'ubuntu') - run: | - maturin list-python - docker run --rm -v $(pwd):/io ghcr.io/pyo3/maturin build --release --out target/wheels -i python${{matrix.python-version}} - ls -las target/wheels - cp target/wheels/*manylinux_*.whl . - shell: bash - - - name: Build sdist with Maturin - Linux - if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.9' - run: | - maturin list-python - docker run --rm -v $(pwd):/io ghcr.io/pyo3/maturin sdist --out target/wheels - ls -las target/wheels - shell: bash - - - name: Build wheel with Maturin - Non-Linux - if: "!startsWith(matrix.os, 'ubuntu')" - run: | - maturin list-python - maturin build --release -i $(which python) - ls -las target/wheels - cp target/wheels/*.whl . - shell: bash - - name: Test Python - Non-Windows if: runner.os != 'Windows' run: | - cd testdir pip install virtualenv virtualenv vEnv; source vEnv/bin/activate python -m pip install --upgrade pip maturin - pip install ../*.whl - pip uninstall bed-reader --yes maturin develop echo "requirements" pip install -r requirements.txt @@ -116,27 +183,11 @@ jobs: echo "pwd" pwd python -m pip install --upgrade pip maturin - # pip install *.whl - # pip uninstall bed-reader --yes echo "requirements" pip install -r requirements.txt echo "requirements-dev" pip install -r requirements-dev.txt echo "maturin" maturin develop - echo "numpy" - pip install numpy echo "pytest" - pytest bed_reader - - name: Save Wheels - uses: actions/upload-artifact@v2 - with: - name: wheels - path: ./*.whl - - - name: Save SDist - if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.9' - uses: actions/upload-artifact@v2 - with: - name: wheels - path: target/wheels/*.tar.gz + pytest bed_reader \ No newline at end of file diff --git a/.github/workflows/justtest.yml b/.github/workflows/justtest.yml deleted file mode 100644 index 00304ef..0000000 --- a/.github/workflows/justtest.yml +++ /dev/null @@ -1,70 +0,0 @@ -name: just_test - -on: - # push: - workflow_dispatch: - -env: - CARGO_TERM_COLOR: always - -permissions: - contents: read - -jobs: - test: - name: Test - strategy: - fail-fast: false - matrix: - python-version: [3.7, 3.8, 3.9, "3.10", "3.11"] - os: [ubuntu-latest, macos-latest, windows-latest] - runs-on: ${{ matrix.os }} - steps: - - name: Checkout - uses: actions/checkout@v2 - - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - - name: Install flake8, etc - run: | - cd bed_reader - pwd - python -m pip install --upgrade pip - pip install flake8 pytest black isort --upgrade - - name: Lint with flake8, etc - run: | - echo "flake8" - flake8 . - echo "black" - black --version - black --verbose --check . - echo "isort" - isort --check-only . - - name: Test Python - Non-Windows - if: runner.os != 'Windows' - run: | - pip install virtualenv - virtualenv vEnv; source vEnv/bin/activate - python -m pip install --upgrade pip maturin - maturin develop - echo "requirements" - pip install -r requirements.txt - echo "requirements-dev" - pip install -r requirements-dev.txt - pytest bed_reader - - name: Test Python - Windows - if: runner.os == 'Windows' - run: | - pip install virtualenv - virtualenv vEnv; vEnv\Scripts\activate.ps1 - echo "pwd" - pwd - python -m pip install --upgrade pip maturin - echo "requirements" - pip install -r requirements.txt - echo "requirements-dev" - pip install -r requirements-dev.txt - echo "maturin" - maturin develop - echo "pytest" - pytest bed_reader \ No newline at end of file diff --git a/.github/workflows/updown.yml b/.github/workflows/updown.yml deleted file mode 100644 index 29942b4..0000000 --- a/.github/workflows/updown.yml +++ /dev/null @@ -1,49 +0,0 @@ -name: updown - -on: - # push: - workflow_dispatch: - -env: - CARGO_TERM_COLOR: always - -permissions: - contents: read - -jobs: - - linux: - runs-on: ubuntu-latest - strategy: - matrix: - target: [x86_64] - steps: - - name: create file - run: | - mkdir -p dist - cd dist - echo "test" > test.txt - ls -las - - name: Upload test.txt - uses: actions/upload-artifact@v3 - with: - name: wheels - path: dist - - test: - name: Test - needs: [linux] - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest] - runs-on: ${{ matrix.os }} - steps: - - uses: actions/download-artifact@v3 - with: - name: wheels - path: dist - - name: Install wheels - run: | - ls -las - ls -las dist