Skip to content

Make CircleCI checkout merge commit #1344

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 17, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 18 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,18 @@ version: 2.1
orbs:
win: circleci/[email protected]

commands:
checkout_merge:
description: "checkout merge branch"
steps:
- checkout
- run:
name: Checkout merge branch
command: |
set -ex
git fetch --force origin ${CIRCLE_BRANCH}/merge:merged/${CIRCLE_BRANCH}
git checkout "merged/$CIRCLE_BRANCH"

binary_common: &binary_common
parameters:
# Edit these defaults to do a release`
Expand Down Expand Up @@ -60,7 +72,7 @@ jobs:
- image: << parameters.wheel_docker_image >>
resource_class: 2xlarge+
steps:
- checkout
- checkout_merge
- run: packaging/build_wheel.sh
- store_artifacts:
path: dist
Expand All @@ -75,7 +87,7 @@ jobs:
- image: "soumith/conda-cuda"
resource_class: 2xlarge+
steps:
- checkout
- checkout_merge
- run: packaging/build_conda.sh
- store_artifacts:
path: /opt/conda/conda-bld/linux-64
Expand All @@ -90,7 +102,7 @@ jobs:
image: ubuntu-1604:201903-01
resource_class: gpu.medium
steps:
- checkout
- checkout_merge
- run:
name: Setup environment
command: |
Expand Down Expand Up @@ -159,7 +171,7 @@ jobs:
name: win/vs2019
shell: bash.exe
steps:
- checkout
- checkout_merge
- run:
command: |
choco install miniconda3
Expand All @@ -173,7 +185,7 @@ jobs:
macos:
xcode: "9.0"
steps:
- checkout
- checkout_merge
- run:
# Cannot easily deduplicate this as source'ing activate
# will set environment variables which we need to propagate
Expand All @@ -195,7 +207,7 @@ jobs:
macos:
xcode: "9.0"
steps:
- checkout
- checkout_merge
- run:
command: |
curl -o conda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh
Expand Down
24 changes: 18 additions & 6 deletions .circleci/config.yml.in
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,18 @@ version: 2.1
orbs:
win: circleci/[email protected]

commands:
checkout_merge:
description: "checkout merge branch"
steps:
- checkout
- run:
name: Checkout merge branch
command: |
set -ex
git fetch --force origin ${CIRCLE_BRANCH}/merge:merged/${CIRCLE_BRANCH}
git checkout "merged/$CIRCLE_BRANCH"

binary_common: &binary_common
parameters:
# Edit these defaults to do a release`
Expand Down Expand Up @@ -60,7 +72,7 @@ jobs:
- image: << parameters.wheel_docker_image >>
resource_class: 2xlarge+
steps:
- checkout
- checkout_merge
- run: packaging/build_wheel.sh
- store_artifacts:
path: dist
Expand All @@ -75,7 +87,7 @@ jobs:
- image: "soumith/conda-cuda"
resource_class: 2xlarge+
steps:
- checkout
- checkout_merge
- run: packaging/build_conda.sh
- store_artifacts:
path: /opt/conda/conda-bld/linux-64
Expand All @@ -90,7 +102,7 @@ jobs:
image: ubuntu-1604:201903-01
resource_class: gpu.medium
steps:
- checkout
- checkout_merge
- run:
name: Setup environment
command: |
Expand Down Expand Up @@ -159,7 +171,7 @@ jobs:
name: win/vs2019
shell: bash.exe
steps:
- checkout
- checkout_merge
- run:
command: |
choco install miniconda3
Expand All @@ -173,7 +185,7 @@ jobs:
macos:
xcode: "9.0"
steps:
- checkout
- checkout_merge
- run:
# Cannot easily deduplicate this as source'ing activate
# will set environment variables which we need to propagate
Expand All @@ -195,7 +207,7 @@ jobs:
macos:
xcode: "9.0"
steps:
- checkout
- checkout_merge
- run:
command: |
curl -o conda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh
Expand Down
3 changes: 2 additions & 1 deletion .circleci/regenerate.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ def generate_upload_workflow(base_workflow_name, os_type, btype, cu_version):


def indent(indentation, data_list):
return ("\n" + " " * indentation).join(yaml.dump(data_list).splitlines())
return ("\n" + " " * indentation).join(
yaml.dump(data_list, default_flow_style=False).splitlines())


if __name__ == "__main__":
Expand Down