Skip to content
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

Switch master to main in CI tools and dev tools #6363

Merged
merged 8 commits into from
Nov 30, 2023
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci-daily.yml
Expand Up @@ -2,7 +2,7 @@ name: Continuous Integration - Daily

on:
schedule:
# Checks out master by default.
# Checks out main by default.
- cron: '0 0 * * *'

concurrency:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-weekly.yml
Expand Up @@ -2,7 +2,7 @@ name: Continuous Integration - Weekly

on:
schedule:
# Checks out master by default.
# Checks out main by default.
- cron: '0 0 * * 0'

concurrency:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Expand Up @@ -2,11 +2,11 @@ name: Continuous Integration

on:
schedule:
# Checks out master by default.
# Checks out main by default.
- cron: '0 0 * * *'
pull_request:
branches:
- master
- main

concurrency:
group: ${{ github.head_ref || github.run_id }}
Expand Down
Expand Up @@ -3,7 +3,7 @@ name: Pre-release cirq to PyPi
on:
push:
branches:
- master
- main
jobs:
push_to_pypi:
if: github.repository == 'quantumlib/Cirq'
Expand Down
2 changes: 1 addition & 1 deletion asv.conf.json
Expand Up @@ -4,7 +4,7 @@
"project_url": "https://quantumai.google/cirq",
"repo": ".",
"repo_subdir": "cirq-core/",
"branches": ["master"],
"branches": ["main"],
"dvcs": "git",
"environment_type": "virtualenv",
"show_commit_url": "https://github.com/quantumlib/Cirq/commit/",
Expand Down
22 changes: 11 additions & 11 deletions check/build-changed-protos
Expand Up @@ -11,14 +11,14 @@
#
# You can specify a base git revision to compare against (i.e. to use when
# determining whether or not a line is considered to have "changed"). For
# example, you can compare against 'origin/master' or 'HEAD~1'.
# example, you can compare against 'origin/main' or 'HEAD~1'.
#
# If you don't specify a base revision, the following defaults will be tried, in
# order, until one exists:
#
# 1. upstream/master
# 2. origin/master
# 3. master
# 1. upstream/main
# 2. origin/main
# 3. main
#
# If none exists, the script fails.
#
Expand All @@ -37,14 +37,14 @@ if [ -n "$1" ] && [[ $1 != -* ]]; then
exit 1
fi
rev=$1
elif [ "$(git cat-file -t upstream/master 2> /dev/null)" == "commit" ]; then
rev=upstream/master
elif [ "$(git cat-file -t origin/master 2> /dev/null)" == "commit" ]; then
rev=origin/master
elif [ "$(git cat-file -t master 2> /dev/null)" == "commit" ]; then
rev=master
elif [ "$(git cat-file -t upstream/main 2> /dev/null)" == "commit" ]; then
rev=upstream/main
elif [ "$(git cat-file -t origin/main 2> /dev/null)" == "commit" ]; then
rev=origin/main
elif [ "$(git cat-file -t main 2> /dev/null)" == "commit" ]; then
rev=main
else
echo -e "\033[31mNo default revision found to compare against. Argument #1 must be what to diff against (e.g. 'origin/master' or 'HEAD~1').\033[0m" >&2
echo -e "\033[31mNo default revision found to compare against. Argument #1 must be what to diff against (e.g. 'origin/main' or 'HEAD~1').\033[0m" >&2
exit 1
fi
base="$(git merge-base "${rev}" HEAD)"
Expand Down
22 changes: 11 additions & 11 deletions check/format-incremental
Expand Up @@ -18,14 +18,14 @@
#
# You can specify a base git revision to compare against (i.e. to use when
# determining whether or not a file is considered to have "changed"). For
# example, you can compare against 'origin/master' or 'HEAD~1'.
# example, you can compare against 'origin/main' or 'HEAD~1'.
#
# If you don't specify a base revision, the following defaults will be tried, in
# order, until one exists:
#
# 1. upstream/master
# 2. origin/master
# 3. master
# 1. upstream/main
# 2. origin/main
# 3. main
#
# If none exists, the script fails.
################################################################################
Expand Down Expand Up @@ -61,14 +61,14 @@ typeset -a format_files
if (( only_changed == 1 )); then
# Figure out which branch to compare against.
if [ -z "${rev}" ]; then
if [ "$(git cat-file -t upstream/master 2> /dev/null)" == "commit" ]; then
rev=upstream/master
elif [ "$(git cat-file -t origin/master 2> /dev/null)" == "commit" ]; then
rev=origin/master
elif [ "$(git cat-file -t master 2> /dev/null)" == "commit" ]; then
rev=master
if [ "$(git cat-file -t upstream/main 2> /dev/null)" == "commit" ]; then
rev=upstream/main
elif [ "$(git cat-file -t origin/main 2> /dev/null)" == "commit" ]; then
rev=origin/main
elif [ "$(git cat-file -t main 2> /dev/null)" == "commit" ]; then
rev=main
else
echo -e "\033[31mNo default revision found to compare against. Argument #1 must be what to diff against (e.g. 'origin/master' or 'HEAD~1').\033[0m" >&2
echo -e "\033[31mNo default revision found to compare against. Argument #1 must be what to diff against (e.g. 'origin/main' or 'HEAD~1').\033[0m" >&2
exit 1
fi
fi
Expand Down
24 changes: 12 additions & 12 deletions check/pylint-changed-files
Expand Up @@ -9,15 +9,15 @@
# You can specify a base git revision to compare against (i.e. to use when
# determining whether or not a line is considered to have "changed"). To make
# the tool more consistent, it actually diffs against the most recent common
# ancestor of the specified id and HEAD. So if you choose 'origin/master' you're
# actually diffing against the output of 'git merge-base origin/master HEAD'.
# ancestor of the specified id and HEAD. So if you choose 'origin/main' you're
# actually diffing against the output of 'git merge-base origin/main HEAD'.
#
# If you don't specify a base revision, the following defaults will be tried,
# in order, until one exists:
#
# 1. upstream/master
# 2. origin/master
# 3. master
# 1. upstream/main
# 2. origin/main
# 3. main
#
# If none exists, the script fails.
#
Expand All @@ -36,14 +36,14 @@ if [ -n "$1" ] && [[ $1 != -* ]]; then
exit 1
fi
rev=$1
elif [ "$(git cat-file -t upstream/master 2> /dev/null)" == "commit" ]; then
rev=upstream/master
elif [ "$(git cat-file -t origin/master 2> /dev/null)" == "commit" ]; then
rev=origin/master
elif [ "$(git cat-file -t master 2> /dev/null)" == "commit" ]; then
rev=master
elif [ "$(git cat-file -t upstream/main 2> /dev/null)" == "commit" ]; then
rev=upstream/main
elif [ "$(git cat-file -t origin/main 2> /dev/null)" == "commit" ]; then
rev=origin/main
elif [ "$(git cat-file -t main 2> /dev/null)" == "commit" ]; then
rev=main
else
echo -e "\033[31mNo default revision found to compare against. Argument #1 must be what to diff against (e.g. 'origin/master' or 'HEAD~1').\033[0m" >&2
echo -e "\033[31mNo default revision found to compare against. Argument #1 must be what to diff against (e.g. 'origin/main' or 'HEAD~1').\033[0m" >&2
exit 1
fi
base="$(git merge-base "${rev}" HEAD)"
Expand Down
24 changes: 12 additions & 12 deletions check/pytest-and-incremental-coverage
Expand Up @@ -9,15 +9,15 @@
# You can specify a base git revision to compare against (i.e. to use when
# determining whether or not a line is considered to have "changed"). To make
# the tool more consistent, it actually diffs against the most recent common
# ancestor of the specified id and HEAD. So if you choose 'origin/master' you're
# actually diffing against the output of 'git merge-base origin/master HEAD'.
# ancestor of the specified id and HEAD. So if you choose 'origin/main' you're
# actually diffing against the output of 'git merge-base origin/main HEAD'.
#
# If you don't specify a base revision, the following defaults will be tried,
# in order, until one exists:
#
# 1. upstream/master
# 2. origin/master
# 3. master
# 1. upstream/main
# 2. origin/main
# 3. main
#
# If none exists, the script fails.
################################################################################
Expand Down Expand Up @@ -50,14 +50,14 @@ if [ -n "${BASEREV}" ]; then
exit 1
fi
rev="${BASEREV}"
elif [ "$(git cat-file -t upstream/master 2> /dev/null)" == "commit" ]; then
rev=upstream/master
elif [ "$(git cat-file -t origin/master 2> /dev/null)" == "commit" ]; then
rev=origin/master
elif [ "$(git cat-file -t master 2> /dev/null)" == "commit" ]; then
rev=master
elif [ "$(git cat-file -t upstream/main 2> /dev/null)" == "commit" ]; then
rev=upstream/main
elif [ "$(git cat-file -t origin/main 2> /dev/null)" == "commit" ]; then
rev=origin/main
elif [ "$(git cat-file -t main 2> /dev/null)" == "commit" ]; then
rev=main
else
echo -e "\033[31mNo default revision found to compare against. Argument #1 must be what to diff against (e.g. 'origin/master' or 'HEAD~1').\033[0m" >&2
echo -e "\033[31mNo default revision found to compare against. Argument #1 must be what to diff against (e.g. 'origin/main' or 'HEAD~1').\033[0m" >&2
exit 1
fi
base="$(git merge-base "${rev}" HEAD)"
Expand Down
22 changes: 11 additions & 11 deletions check/pytest-changed-files
Expand Up @@ -12,14 +12,14 @@
#
# You can specify a base git revision to compare against (i.e. to use when
# determining whether or not a file is considered to have "changed"). For
# example, you can compare against 'origin/master' or 'HEAD~1'.
# example, you can compare against 'origin/main' or 'HEAD~1'.
#
# If you don't specify a base revision, the following defaults will be tried, in
# order, until one exists:
#
# 1. upstream/master
# 2. origin/master
# 3. master
# 1. upstream/main
# 2. origin/main
# 3. main
#
# If none exists, the script fails.
#
Expand All @@ -41,14 +41,14 @@ if [ -n "$1" ] && [[ $1 != -* ]]; then
fi
rev=$1
rest=( "${@:2}" )
elif [ "$(git cat-file -t upstream/master 2> /dev/null)" == "commit" ]; then
rev=upstream/master
elif [ "$(git cat-file -t origin/master 2> /dev/null)" == "commit" ]; then
rev=origin/master
elif [ "$(git cat-file -t master 2> /dev/null)" == "commit" ]; then
rev=master
elif [ "$(git cat-file -t upstream/main 2> /dev/null)" == "commit" ]; then
rev=upstream/main
elif [ "$(git cat-file -t origin/main 2> /dev/null)" == "commit" ]; then
rev=origin/main
elif [ "$(git cat-file -t main 2> /dev/null)" == "commit" ]; then
rev=main
else
echo -e "\033[31mNo default revision found to compare against. Argument #1 must be what to diff against (e.g. 'origin/master' or 'HEAD~1').\033[0m" >&2
echo -e "\033[31mNo default revision found to compare against. Argument #1 must be what to diff against (e.g. 'origin/main' or 'HEAD~1').\033[0m" >&2
exit 1
fi
echo "Comparing against revision '${rev}'." >&2
Expand Down
24 changes: 12 additions & 12 deletions check/pytest-changed-files-and-incremental-coverage
Expand Up @@ -15,15 +15,15 @@
# You can specify a base git revision to compare against (i.e. to use when
# determining whether or not a line is considered to have "changed"). To make
# the tool more consistent, it actually diffs against the most recent common
# ancestor of the specified id and HEAD. So if you choose 'origin/master' you're
# actually diffing against the output of 'git merge-base origin/master HEAD'.
# ancestor of the specified id and HEAD. So if you choose 'origin/main' you're
# actually diffing against the output of 'git merge-base origin/main HEAD'.
#
# If you don't specify a base revision, the following defaults will be tried,
# in order, until one exists:
#
# 1. upstream/master
# 2. origin/master
# 3. master
# 1. upstream/main
# 2. origin/main
# 3. main
#
# If none exists, the script fails.
################################################################################
Expand All @@ -39,14 +39,14 @@ if [ -n "$1" ] && [[ $1 != -* ]]; then
exit 1
fi
rev=$1
elif [ "$(git cat-file -t upstream/master 2> /dev/null)" == "commit" ]; then
rev=upstream/master
elif [ "$(git cat-file -t origin/master 2> /dev/null)" == "commit" ]; then
rev=origin/master
elif [ "$(git cat-file -t master 2> /dev/null)" == "commit" ]; then
rev=master
elif [ "$(git cat-file -t upstream/main 2> /dev/null)" == "commit" ]; then
rev=upstream/main
elif [ "$(git cat-file -t origin/main 2> /dev/null)" == "commit" ]; then
rev=origin/main
elif [ "$(git cat-file -t main 2> /dev/null)" == "commit" ]; then
rev=main
else
echo -e "\033[31mNo default revision found to compare against. Argument #1 must be what to diff against (e.g. 'origin/master' or 'HEAD~1').\033[0m" >&2
echo -e "\033[31mNo default revision found to compare against. Argument #1 must be what to diff against (e.g. 'origin/main' or 'HEAD~1').\033[0m" >&2
exit 1
fi
base="$(git merge-base "${rev}" HEAD)"
Expand Down