Skip to content

Commit

Permalink
Merge pull request #1296 from pypa/example-configs
Browse files Browse the repository at this point in the history
CI updates, fix up example configs
  • Loading branch information
joerick authored Oct 13, 2022
2 parents bea8df9 + 6086673 commit 563b1c1
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 13 deletions.
2 changes: 1 addition & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
jobs:
- job: linux_38
timeoutInMinutes: 120
pool: {vmImage: 'Ubuntu-18.04'}
pool: {vmImage: 'Ubuntu-20.04'}
steps:
- task: UsePythonVersion@0
inputs:
Expand Down
21 changes: 10 additions & 11 deletions bin/run_example_ci_configs.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ def generate_basic_project(path):
CIService(
name="appveyor",
dst_config_path="appveyor.yml",
badge_md="[![Build status](https://ci.appveyor.com/api/projects/status/wbsgxshp05tt1tif/branch/{branch}?svg=true)](https://ci.appveyor.com/project/pypa/cibuildwheel/branch/{branch})",
badge_md="[![Build status](https://ci.appveyor.com/api/projects/status/gt3vwl88yt0y3hur/branch/{branch}?svg=true)](https://ci.appveyor.com/project/joerick/cibuildwheel/branch/{branch})",
),
CIService(
name="azure-pipelines",
dst_config_path="azure-pipelines.yml",
badge_md="[![Build Status](https://dev.azure.com/joerick0429/cibuildwheel/_apis/build/status/joerick.cibuildwheel?branchName={branch})](https://dev.azure.com/joerick0429/cibuildwheel/_build/latest?definitionId=2&branchName={branch})",
badge_md="[![Build Status](https://dev.azure.com/joerick0429/cibuildwheel/_apis/build/status/pypa.cibuildwheel?branchName={branch})](https://dev.azure.com/joerick0429/cibuildwheel/_build/latest?definitionId=2&branchName={branch})",
),
CIService(
name="circleci",
Expand All @@ -59,12 +59,12 @@ def generate_basic_project(path):
CIService(
name="travis-ci",
dst_config_path=".travis.yml",
badge_md="[![Build Status](https://travis-ci.org/pypa/cibuildwheel.svg?branch={branch})](https://travis-ci.org/pypa/cibuildwheel)",
badge_md="[![Build Status](https://app.travis-ci.com/pypa/cibuildwheel.svg?branch={branch})](https://app.travis-ci.com/pypa/cibuildwheel)",
),
CIService(
name="gitlab",
dst_config_path=".gitlab-ci.yml",
badge_md="[![Gitlab](https://gitlab.com/pypa/cibuildwheel/badges/{branch}/pipeline.svg)](https://gitlab.com/pypa/cibuildwheel/-/commits/{branch})",
badge_md="[![Gitlab](https://gitlab.com/joerick/cibuildwheel/badges/{branch}/pipeline.svg)](https://gitlab.com/joerick/cibuildwheel/-/commits/{branch})",
),
CIService(
name="cirrus-ci",
Expand All @@ -75,14 +75,13 @@ def generate_basic_project(path):


def ci_service_for_config_file(config_file):
service_name = Path(config_file).name.rsplit("-", 1)[0]
filename = Path(config_file).name

for service in services:
if service.name == service_name:
return service

msg = f"unknown ci service for config file {config_file}"
raise ValueError(msg)
try:
return next(s for s in services if filename.startswith(s.name))
except StopIteration:
msg = f"unknown ci service for config file {config_file}"
raise ValueError(msg) from None


@click.command()
Expand Down
2 changes: 1 addition & 1 deletion examples/azure-pipelines-minimal.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
jobs:
- job: linux
pool: {vmImage: 'Ubuntu-16.04'}
pool: {vmImage: 'Ubuntu-20.04'}
steps:
- task: UsePythonVersion@0
- bash: |
Expand Down
1 change: 1 addition & 0 deletions examples/travis-ci-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
os: linux
dist: focal
language: python
python: "3.9"

jobs:
include:
Expand Down
1 change: 1 addition & 0 deletions examples/travis-ci-minimal.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
os: linux
dist: focal
language: python
python: "3.9"

jobs:
include:
Expand Down

0 comments on commit 563b1c1

Please sign in to comment.