From a25f8ecc6294c3df333fd85aa2ae4ced393ecc46 Mon Sep 17 00:00:00 2001 From: "James R. Barlow" Date: Tue, 6 Apr 2021 00:17:29 -0700 Subject: [PATCH] Remove Azure Pipelines --- .github/workflows/build.yml | 2 +- README.md | 2 +- azure-pipelines.yml | 253 ------------------------------------ docs/installation.rst | 2 +- 4 files changed, 3 insertions(+), 256 deletions(-) delete mode 100644 azure-pipelines.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e45fc839..9329c503 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,4 @@ -name: Build and upload to PyPI +name: Test and deploy on: push: diff --git a/README.md b/README.md index 0c3b20cc..a0bf0a35 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ OCRmyPDF -[![Build Status][azure]](https://dev.azure.com/jim0585/ocrmypdf/_build/latest?definitionId=2&branchName=master) [![PyPI version][pypi]](https://pypi.org/project/ocrmypdf/) ![Homebrew version][homebrew] ![ReadTheDocs][docs] ![Python versions][pyversions] +[![Build Status](https://github.com/jbarlow83/OCRmyPDF/actions/workflows/build.yml/badge.svg)](https://github.com/jbarlow83/OCRmyPDF/actions/workflows/build.yml) [![PyPI version][pypi]](https://pypi.org/project/ocrmypdf/) ![Homebrew version][homebrew] ![ReadTheDocs][docs] ![Python versions][pyversions] [azure]: https://dev.azure.com/jim0585/ocrmypdf/_apis/build/status/jbarlow83.OCRmyPDF?branchName=master [travis]: https://travis-ci.org/jbarlow83/OCRmyPDF.svg?branch=master "Travis build status" diff --git a/azure-pipelines.yml b/azure-pipelines.yml deleted file mode 100644 index 2f50df24..00000000 --- a/azure-pipelines.yml +++ /dev/null @@ -1,253 +0,0 @@ -trigger: - tags: - include: - - v* - branches: - include: - - "*" - exclude: - - "travis" - - "ci" - -stages: - - stage: "Test" - jobs: - - job: Windows - pool: - vmImage: "vs2017-win2016" - strategy: - matrix: - Python36: - python.version: "3.6" - Python37: - python.version: "3.7" - Python38: - python.version: "3.8" - Python39: - python.version: "3.9" - steps: - - task: UsePythonVersion@0 - inputs: - versionSpec: "$(python.version)" - - pwsh: | - choco install --yes --no-progress --pre tesseract - choco install --yes --no-progress python3 - choco install --yes --no-progress ghostscript - choco install --yes --no-progress pngquant - displayName: "Install system packages" - - pwsh: | - refreshenv - python -m pip install --upgrade pip wheel - python -m pip install -r requirements/main.txt -r requirements/test.txt . - displayName: "Install Python packages" - - pwsh: | - refreshenv - $env:pathext += ';.py' - # -n auto helps Windows - python -m pytest -n auto --junitxml=test.xml --cov=ocrmypdf --cov-report=xml - displayName: "Test" - - task: PublishTestResults@2 - inputs: - testResultsFiles: "test.xml" - testRunTitle: "$(Agent.OS) - $(Build.DefinitionName) - Python $(python.version)" - condition: succeededOrFailed() - - job: "Ubuntu_1804" - pool: - vmImage: "ubuntu-18.04" - strategy: - matrix: - Python36: - python.version: "3.6" - Python37: - python.version: "3.7" - Python38: - python.version: "3.8" - Python39: - python.version: "3.9" - steps: - - task: UsePythonVersion@0 - inputs: - versionSpec: "$(python.version)" - - bash: | - sudo apt-get update - sudo apt-get install -y --no-install-recommends \ - python3-software-properties \ - curl \ - ghostscript \ - img2pdf \ - libexempi3 \ - libffi-dev \ - liblept5 \ - libsm6 libxext6 libxrender-dev \ - pngquant \ - poppler-utils \ - tesseract-ocr \ - tesseract-ocr-deu \ - tesseract-ocr-eng \ - unpaper \ - zlib1g - displayName: "Install system packages" - - bash: | - curl https://bootstrap.pypa.io/get-pip.py | python3 - pip3 install -r requirements/main.txt -r requirements/test.txt . - displayName: "Install Python packages" - - bash: | - tesseract --version - displayName: "Record versions" - - bash: | - # -n auto is slower on Linux and breaks on Python 3.8 - pytest -n0 --junitxml=test.xml --cov=ocrmypdf --cov-report=xml - displayName: "Test" - - task: PublishTestResults@2 - inputs: - testResultsFiles: "test.xml" - testRunTitle: "$(Agent.OS) - $(Build.DefinitionName) - Python $(python.version)" - condition: succeededOrFailed() - - job: "Ubuntu_1604" - pool: - vmImage: "ubuntu-16.04" - strategy: - matrix: - Python36: - python.version: "3.6" - steps: - - task: UsePythonVersion@0 - inputs: - versionSpec: "$(python.version)" - - bash: | - sudo apt-get update - sudo apt-get install -y --no-install-recommends \ - software-properties-common - sudo add-apt-repository -y ppa:alex-p/tesseract-ocr - sudo apt-get update - sudo apt-get install -y --no-install-recommends \ - ghostscript \ - img2pdf \ - libexempi3 \ - libffi-dev \ - liblept5 \ - libsm6 libxext6 libxrender-dev \ - pngquant \ - poppler-utils \ - tesseract-ocr \ - tesseract-ocr-deu \ - tesseract-ocr-eng \ - unpaper \ - zlib1g - displayName: "Install system packages" - - bash: | - curl https://bootstrap.pypa.io/get-pip.py | python3 - pip3 install -r requirements/main.txt -r requirements/test.txt . - displayName: "Install Python packages" - - bash: | - tesseract --version - displayName: "Record versions" - - bash: | - # -n auto is slower on Linux and breaks on Python 3.8 - pytest -n0 --junitxml=test.xml --cov=ocrmypdf --cov-report=xml - displayName: "Test" - - task: PublishTestResults@2 - inputs: - testResultsFiles: "test.xml" - testRunTitle: "$(Agent.OS) - $(Build.DefinitionName) - Python $(python.version)" - condition: succeededOrFailed() - - job: "macOS_Mojave" - pool: - vmImage: "macos-10.14" - steps: - # https://github.com/actions/virtual-environments/issues/664 - # - task: UsePythonVersion@0 - # inputs: - # versionSpec: "$(python.version)" - - bash: | - brew update - brew upgrade python - echo "Using `python3 --version`" - displayName: "Update brew and Python" - - bash: | - brew install \ - exempi \ - ghostscript \ - jbig2enc \ - leptonica \ - openjpeg \ - pngquant \ - tesseract - displayName: "Install system packages" - - bash: | - pip3 install --upgrade pip - pip3 install -r requirements/main.txt -r requirements/test.txt . - displayName: "Install Python packages" - - bash: | - tesseract --version - displayName: "Record versions" - - bash: pytest -nauto --junitxml=test.xml --cov=ocrmypdf --cov-report=xml - displayName: "Test" - - task: PublishTestResults@2 - inputs: - testResultsFiles: "test.xml" - testRunTitle: "$(Agent.OS) - $(Build.DefinitionName) - Python $(python.version)" - condition: succeededOrFailed() - - task: PublishCodeCoverageResults@1 - inputs: - codeCoverageTool: Cobertura - summaryFileLocation: "$(System.DefaultWorkingDirectory)/**/coverage.xml" - - - stage: "Artifacts" - jobs: - - job: "sdist_wheel" - pool: - vmImage: "ubuntu-18.04" - steps: - - task: UsePythonVersion@0 - inputs: - versionSpec: "3.7" - - bash: | - python -m pip install --upgrade pip wheel - python setup.py sdist bdist_wheel - - publish: dist - artifact: sdist_wheel - - - stage: "Deploy" - jobs: - - deployment: "PyPI" - pool: - vmImage: "ubuntu-18.04" - environment: "deploy" - strategy: - runOnce: - deploy: - steps: - - download: current - artifact: sdist_wheel - - script: | - mkdir -p dist - mv $(Pipeline.Workspace)/sdist_wheel/* dist - displayName: "Move dist files" - - task: UsePythonVersion@0 - inputs: - versionSpec: "3.8" - architecture: x64 - - script: | - pip install --upgrade twine - displayName: "Generate artifacts" - - script: | - cat <.pypirc - [distutils] - index-servers = - pypi - - [pypi] - username: __token__ - password: $(TOKEN_PYPI) - - FILE - displayName: "Generate PyPI auth file" - - script: | - python -m twine upload --config-file .pypirc dist/* - displayName: "Upload to PyPI" - condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/')) - - script: | - curl -X POST -d "token=$(TOKEN_RTD)" https://readthedocs.org/api/v2/webhook/pikepdf/39557/ - displayName: "Trigger ReadTheDocs" - condition: and(succeeded(), or(startsWith(variables['Build.SourceBranch'], 'refs/tags/'), startsWith(variables['Build.SourceBranch'], 'refs/heads/master'))) diff --git a/docs/installation.rst b/docs/installation.rst index f3c952fc..6d096996 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -464,7 +464,7 @@ Update Homebrew: Install or upgrade the required Homebrew packages, if any are missing. To do this, use ``brew edit ocrmypdf`` to obtain a recent list of Homebrew -dependencies. You could also check the ``azure-pipelines.yml``. +dependencies. You could also check the ``.workflows/build.yml``. This will include the English, French, German and Spanish language packs. If you need other languages you can optionally install them all: