Skip to content

Commit

Permalink
[internal] Enable buildsense for cron jobs (#12015)
Browse files Browse the repository at this point in the history
The new version of the  toolchain plugin works just fine under 3.9 (since the plugin no longer depends on pants)
  • Loading branch information
asherf authored May 6, 2021
1 parent b547a6f commit 51187e9
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test-cron.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@


env:
PANTS_CONFIG_FILES: +['pants.ci.toml', 'pants.no-buildsense.toml']
PANTS_CONFIG_FILES: +['pants.ci.toml']
RUST_BACKTRACE: all
jobs:
bootstrap_pants_linux:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ jobs:
'
- env:
PANTS_CONFIG_FILES: +['pants.ci.toml', 'pants.no-buildsense.toml']
PANTS_CONFIG_FILES: +['pants.ci.toml']
if: github.event_name == 'push' || !contains(env.COMMIT_MESSAGE, '[ci skip-build-wheels]')
name: Build wheels and fs_util
run: '[[ "${GITHUB_EVENT_NAME}" == "pull_request" ]] && export MODE=debug
Expand Down Expand Up @@ -383,7 +383,7 @@ jobs:
'
- env:
ARCHFLAGS: -arch x86_64
PANTS_CONFIG_FILES: +['pants.ci.toml', 'pants.no-buildsense.toml']
PANTS_CONFIG_FILES: +['pants.ci.toml']
if: github.event_name == 'push' || !contains(env.COMMIT_MESSAGE, '[ci skip-build-wheels]')
name: Build wheels and fs_util
run: '[[ "${GITHUB_EVENT_NAME}" == "pull_request" ]] && export MODE=debug
Expand Down
12 changes: 4 additions & 8 deletions build-support/bin/generate_github_workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,13 +127,9 @@ def pants_virtualenv_cache() -> Step:
}


def global_env(*, disable_buildsense: bool = False) -> Env:
def global_env() -> Env:
return {
"PANTS_CONFIG_FILES": (
"+['pants.ci.toml', 'pants.no-buildsense.toml']"
if disable_buildsense
else "+['pants.ci.toml']"
),
"PANTS_CONFIG_FILES": "+['pants.ci.toml']",
"RUST_BACKTRACE": "all",
}

Expand Down Expand Up @@ -395,7 +391,7 @@ def build_wheels_step(*, is_macos: bool) -> Step:
"""
),
"if": DONT_SKIP_WHEELS,
"env": {"PANTS_CONFIG_FILES": "+['pants.ci.toml', 'pants.no-buildsense.toml']"},
"env": {"PANTS_CONFIG_FILES": "+['pants.ci.toml']"},
}
if is_macos:
step["env"].update(MACOS_ENV) # type: ignore[attr-defined]
Expand Down Expand Up @@ -499,7 +495,7 @@ def generate() -> dict[Path, str]:
# 08:45 UTC / 12:45AM PST, 1:45AM PDT: arbitrary time after hours.
"on": {"schedule": [{"cron": "45 8 * * *"}]},
"jobs": test_workflow_jobs([PYTHON38_VERSION, PYTHON39_VERSION], cron=True),
"env": global_env(disable_buildsense=True),
"env": global_env(),
},
Dumper=NoAliasDumper,
)
Expand Down
7 changes: 0 additions & 7 deletions pants.no-buildsense.toml

This file was deleted.

0 comments on commit 51187e9

Please sign in to comment.