-
Notifications
You must be signed in to change notification settings - Fork 24.5k
Fix windows ci squid env #62353
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
Fix windows ci squid env #62353
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,8 @@ | ||
{%- set exclude_test = exclude_test|default(false) -%} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. exclude_test is already set as |
||
{# squid_proxy is an private ELB that only available for GHA custom runners #} | ||
{%- set squid_proxy = "http://internal-tf-lb-20210727220640487900000002-835786077.us-east-1.elb.amazonaws.com:3128" -%} | ||
{# squid_no_proxy is a list of common set of fixed domains or IPs that we don't need to proxy. See https://docs.aws.amazon.com/AmazonECS/latest/developerguide/http_proxy_config.html#windows-proxy #} | ||
{%- set squid_no_proxy = "localhost,127.0.0.1,amazonaws.com,s3.amazonaws.com,169.254.169.254,169.254.170.2,/var/run/docker.sock" -%} | ||
|
||
{%- block name -%} | ||
# Template is at: .github/templates/linux_ci_workflow.yml.j2 | ||
# Generation script: .github/scripts/generate_ci_workflows.py | ||
|
@@ -168,6 +172,7 @@ jobs: | |
-e CUSTOM_TEST_ARTIFACT_BUILD_DIR \ | ||
-e SKIP_SCCACHE_INITIALIZATION=1 \ | ||
-e TORCH_CUDA_ARCH_LIST \ | ||
-e http_proxy="!{{squid_proxy}}" -e https_proxy="!{{squid_proxy}}" -e no_proxy="!{{squid_no_proxy}}" \ | ||
--env-file="/tmp/github_env_${GITHUB_RUN_ID}" \ | ||
--security-opt seccomp=unconfined \ | ||
--cap-add=SYS_PTRACE \ | ||
|
@@ -349,6 +354,7 @@ jobs: | |
-e NUM_TEST_SHARDS \ | ||
-e MAX_JOBS="$(nproc --ignore=2)" \ | ||
-e SCCACHE_BUCKET \ | ||
-e http_proxy="!{{squid_proxy}}" -e https_proxy="!{{squid_proxy}}" -e no_proxy="!{{squid_no_proxy}}" \ | ||
--env-file="/tmp/github_env_${GITHUB_RUN_ID}" \ | ||
--security-opt seccomp=unconfined \ | ||
--cap-add=SYS_PTRACE \ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
{# squid_proxy is an private ELB that only available for GHA custom runners #} | ||
{%- set squid_proxy = "http://internal-tf-lb-20210727220640487900000002-835786077.us-east-1.elb.amazonaws.com:3128" -%} | ||
{# squid_no_proxy is a list of common set of fixed domains or IPs that we don't need to proxy. See https://docs.aws.amazon.com/AmazonECS/latest/developerguide/http_proxy_config.html#windows-proxy #} | ||
{%- set squid_no_proxy = "localhost,127.0.0.1,amazonaws.com,s3.amazonaws.com,169.254.169.254,169.254.170.2,/var/run/docker.sock" -%} | ||
|
||
# Template is at: .github/templates/windows_ci_workflow.yml.j2 | ||
# Generation script: .github/scripts/generate_ci_workflows.py | ||
name: Windows CI (!{{ build_environment }}) | ||
|
@@ -37,12 +42,12 @@ env: | |
VS_VERSION: "16.8.6" | ||
VC_YEAR: "2019" | ||
ALPINE_IMAGE: "308535385114.dkr.ecr.us-east-1.amazonaws.com/tool/alpine" | ||
no_proxy: !{{ squid_no_proxy }} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Any reason we don't set There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm trying to simulate what linux CI is doing is to limit the proxy to only |
||
{%- if cuda_version != "cpu" %} | ||
TORCH_CUDA_ARCH_LIST: "7.0" | ||
USE_CUDA: 1 | ||
{%- endif %} | ||
|
||
|
||
concurrency: | ||
group: !{{ build_environment }}-${{ github.event.pull_request.number || github.sha }} | ||
cancel-in-progress: true | ||
|
@@ -67,6 +72,8 @@ jobs: | |
{%- endif %} | ||
env: | ||
JOB_BASE_NAME: !{{ build_environment }}-build | ||
http_proxy: "!{{ squid_proxy }}" | ||
https_proxy: "!{{ squid_proxy }}" | ||
steps: | ||
- name: Checkout PyTorch | ||
uses: actions/checkout@v2 | ||
|
@@ -158,6 +165,8 @@ jobs: | |
SHARD_NUMBER: ${{ matrix.shard }} | ||
NUM_TEST_SHARDS: ${{ matrix.num_shards }} | ||
TEST_CONFIG: ${{ matrix.config }} | ||
http_proxy: "!{{ squid_proxy }}" | ||
https_proxy: "!{{ squid_proxy }}" | ||
needs: [build, generate-test-matrix, !{{ ciflow_config.root_job_name }}] | ||
strategy: | ||
matrix: ${{ fromJson(needs.generate-test-matrix.outputs.matrix) }} | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These (
squid_proxy
, etc.) look like they're not defined for this workflow? Since they're duplicated across templates anyways it makes sense to pull them out intogenerate_ci_workflows.py
so they're more consolidatedThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this bazel workflow is an extension of linux workflow, but with combined
build + test
jobs into one, so many environment setup are defined in linux jinja2.