diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 2112d3fb..988fd98b 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -4,7 +4,8 @@ "context": "..", "dockerFile": "Dockerfile", "extensions": [ - "ms-python.python" + "ms-python.python", + "esbenp.prettier-vscode" ], "settings": { "python.pythonPath": "/usr/local/bin/python", diff --git a/azure-pipelines-ci.yml b/azure-pipelines-ci.yml index 6e28a61b..e551b15d 100644 --- a/azure-pipelines-ci.yml +++ b/azure-pipelines-ci.yml @@ -4,38 +4,36 @@ trigger: batch: true branches: include: - - master - - dev + - master + - dev pr: -- dev + - dev variables: -- name: versionHadolint - value: 'v1.16.3' + - name: versionHadolint + value: "v1.16.3" jobs: + - job: "Tox" + pool: + vmImage: "ubuntu-latest" + steps: + - task: UsePythonVersion@0 + displayName: "Use Python $(python.version)" + inputs: + versionSpec: "3.7" + - script: pip install tox + displayName: "Install Tox" + - script: tox + displayName: "Run Tox" -- job: 'Tox' - pool: - vmImage: 'ubuntu-latest' - steps: - - task: UsePythonVersion@0 - displayName: 'Use Python $(python.version)' - inputs: - versionSpec: '3.7' - - script: pip install tox - displayName: 'Install Tox' - - script: tox - displayName: 'Run Tox' - - -- job: 'Hadolint' - pool: - vmImage: 'ubuntu-latest' - steps: - - script: sudo docker pull hadolint/hadolint:$(versionHadolint) - displayName: 'Install Hadolint' - - script: | - sudo docker run --rm -i \ - -v $(pwd)/.hadolint.yaml:/.hadolint.yaml:ro \ - hadolint/hadolint:$(versionHadolint) < Dockerfile - displayName: 'Run Hadolint' + - job: "Hadolint" + pool: + vmImage: "ubuntu-latest" + steps: + - script: sudo docker pull hadolint/hadolint:$(versionHadolint) + displayName: "Install Hadolint" + - script: | + sudo docker run --rm -i \ + -v $(pwd)/.hadolint.yaml:/.hadolint.yaml:ro \ + hadolint/hadolint:$(versionHadolint) < Dockerfile + displayName: "Run Hadolint" diff --git a/azure-pipelines-release.yml b/azure-pipelines-release.yml index dc59e4c6..b626bfa7 100644 --- a/azure-pipelines-release.yml +++ b/azure-pipelines-release.yml @@ -3,76 +3,125 @@ trigger: tags: include: - - '*' + - "*" pr: none variables: -- name: versionBuilder - value: '4.4' -- group: docker + - name: versionBuilder + value: "4.4" + - group: docker resources: repositories: - - repository: azure - type: github - name: 'home-assistant/ci-azure' - endpoint: 'home-assistant' - + - repository: azure + type: github + name: "home-assistant/ci-azure" + endpoint: "home-assistant" stages: + - stage: "Validate" + jobs: + - template: templates/azp-job-version.yaml@azure + parameters: + ignoreDev: true -- stage: 'Validate' - jobs: - - template: templates/azp-job-version.yaml@azure - parameters: - ignoreDev: true - -- stage: 'Wheels' - jobs: - - template: templates/azp-job-wheels.yaml@azure - parameters: - jobName: 'Wheels_Alpine39' - builderVersion: 'dev-3.7-alpine3.9' - builderApk: 'build-base;libffi-dev;openssl-dev' - wheelsRequirement: 'requirements_all.txt' - preBuild: - - script: | - cat requirements.txt requirements_build.txt > requirements_all.txt - displayName: 'Prepare requirements' - - template: templates/azp-job-wheels.yaml@azure - parameters: - jobName: 'Wheels_Alpine310' - builderVersion: 'dev-3.7-alpine3.10' - builderApk: 'build-base;libffi-dev;openssl-dev' - wheelsRequirement: 'requirements_all.txt' - preBuild: - - script: | - cat requirements.txt requirements_build.txt > requirements_all.txt - displayName: 'Prepare requirements' + - stage: "Wheels" + jobs: + - template: templates/azp-job-wheels.yaml@azure + parameters: + jobName: "Wheels_37_Alpine39" + builderVersion: "dev-3.7-alpine3.9" + builderApk: "build-base;libffi-dev;openssl-dev" + wheelsRequirement: "requirements_all.txt" + preBuild: + - script: | + cat requirements.txt requirements_build.txt > requirements_all.txt + displayName: "Prepare requirements" + - template: templates/azp-job-wheels.yaml@azure + parameters: + jobName: "Wheels_37_Alpine310" + builderVersion: "dev-3.7-alpine3.10" + builderApk: "build-base;libffi-dev;openssl-dev" + wheelsRequirement: "requirements_all.txt" + preBuild: + - script: | + cat requirements.txt requirements_build.txt > requirements_all.txt + displayName: "Prepare requirements" + - template: templates/azp-job-wheels.yaml@azure + parameters: + jobName: "Wheels_37_Alpine311" + builderVersion: "dev-3.7-alpine3.11" + builderApk: "build-base;libffi-dev;openssl-dev" + wheelsRequirement: "requirements_all.txt" + preBuild: + - script: | + cat requirements.txt requirements_build.txt > requirements_all.txt + displayName: "Prepare requirements" + - template: templates/azp-job-wheels.yaml@azure + parameters: + jobName: "Wheels_38_Alpine39" + builderVersion: "dev-3.8-alpine3.9" + builderApk: "build-base;libffi-dev;openssl-dev" + wheelsRequirement: "requirements_all.txt" + preBuild: + - script: | + cat requirements.txt requirements_build.txt > requirements_all.txt + displayName: "Prepare requirements" + - template: templates/azp-job-wheels.yaml@azure + parameters: + jobName: "Wheels_38_Alpine310" + builderVersion: "dev-3.8-alpine3.10" + builderApk: "build-base;libffi-dev;openssl-dev" + wheelsRequirement: "requirements_all.txt" + preBuild: + - script: | + cat requirements.txt requirements_build.txt > requirements_all.txt + displayName: "Prepare requirements" + - template: templates/azp-job-wheels.yaml@azure + parameters: + jobName: "Wheels_38_Alpine311" + builderVersion: "dev-3.8-alpine3.11" + builderApk: "build-base;libffi-dev;openssl-dev" + wheelsRequirement: "requirements_all.txt" + preBuild: + - script: | + cat requirements.txt requirements_build.txt > requirements_all.txt + displayName: "Prepare requirements" -- stage: 'Release' - jobs: - - job: 'Release' - pool: - vmImage: 'ubuntu-latest' - strategy: - maxParallel: 2 - matrix: - 37-Alpine39: - buildPython: '3.7-alpine3.9' - buildArgs: '' - 37-Alpine310: - buildPython: '3.7-alpine3.10' - buildArgs: '--release-tag' - steps: - - script: sudo docker login -u $(dockerUser) -p $(dockerPassword) - displayName: 'Docker hub login' - - script: sudo docker pull homeassistant/amd64-builder:$(versionBuilder) - displayName: 'Install Builder' - - script: | - sudo docker run --rm --privileged \ - -v ~/.docker:/root/.docker \ - -v /run/docker.sock:/run/docker.sock:rw -v $(pwd):/data:ro \ - homeassistant/amd64-builder:$(versionBuilder) \ - --builder-wheels $(buildPython) --all \ - $(buildArgs) --version $(Build.SourceBranchName) \ - -t /data --docker-hub homeassistant - displayName: 'Build Release' + - stage: "Release" + jobs: + - job: "Release" + pool: + vmImage: "ubuntu-latest" + strategy: + matrix: + 37-Alpine39: + buildPython: "3.7-alpine3.9" + buildArgs: "" + 37-Alpine310: + buildPython: "3.7-alpine3.10" + buildArgs: "" + 37-Alpine311: + buildPython: "3.7-alpine3.11" + buildArgs: "" + 38-Alpine39: + buildPython: "3.8-alpine3.9" + buildArgs: "" + 38-Alpine310: + buildPython: "3.8-alpine3.10" + buildArgs: "" + 38-Alpine311: + buildPython: "3.8-alpine3.11" + buildArgs: "--release-tag" + steps: + - script: sudo docker login -u $(dockerUser) -p $(dockerPassword) + displayName: "Docker hub login" + - script: sudo docker pull homeassistant/amd64-builder:$(versionBuilder) + displayName: "Install Builder" + - script: | + sudo docker run --rm --privileged \ + -v ~/.docker:/root/.docker \ + -v /run/docker.sock:/run/docker.sock:rw -v $(pwd):/data:ro \ + homeassistant/amd64-builder:$(versionBuilder) \ + --builder-wheels $(buildPython) --all \ + $(buildArgs) --version $(Build.SourceBranchName) \ + -t /data --docker-hub homeassistant + displayName: "Build Release" diff --git a/requirements.txt b/requirements.txt index 0eadd2a7..155edb6d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,5 @@ click==7.0 -click-pathlib==2019.6.13.1 +click-pathlib==2019.12.28.7 requests==2.22.0 wheel==0.33.6 +setuptools==44.0.0 diff --git a/requirements_build.txt b/requirements_build.txt index cb4061b9..0d8447b7 100644 --- a/requirements_build.txt +++ b/requirements_build.txt @@ -1,2 +1,2 @@ -Cython==0.29.13 -numpy==1.17.2 +Cython==0.29.14 +numpy==1.18.1 diff --git a/requirements_tests.txt b/requirements_tests.txt index e9669d5d..74c1d2ff 100644 --- a/requirements_tests.txt +++ b/requirements_tests.txt @@ -1,3 +1,3 @@ -flake8==3.7.8 -pylint==2.4.2 -black==19.3b0 +flake8==3.7.9 +pylint==2.4.4 +black==19.10b0 diff --git a/setup.py b/setup.py index 89423267..d7cff02d 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,6 @@ from setuptools import setup -VERSION = "1.4" +VERSION = "1.5" setup( name="builder",