Skip to content

Commit

Permalink
Run optional tests on nightly build (#51)
Browse files Browse the repository at this point in the history
* Update test-template-aws.j2

* Update test-template-aws.j2

* Send nightly args

* print nightly

* add nightly args

* Update test-template-aws.j2

* Update ci_aws_bootstrap.sh

* Update test-template-aws.j2

* Update test-template-aws.j2

* just run a100

* remove test steps

* Update ci_aws_bootstrap.sh
  • Loading branch information
khluu authored Nov 20, 2024
1 parent 86e0962 commit 544f0be
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
9 changes: 7 additions & 2 deletions scripts/ci_aws_bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ if [[ -z "${RUN_ALL:-}" ]]; then
RUN_ALL=0
fi

if [[ -z "${NIGHTLY:-}" ]]; then
NIGHTLY=0
fi

upload_pipeline() {
echo "Uploading pipeline..."
ls .buildkite || buildkite-agent annotate --style error 'Please merge upstream main branch for buildkite CI'
Expand All @@ -25,14 +29,15 @@ upload_pipeline() {
fi
if [ -e ".buildkite/pipeline_generator/pipeline_generator.py" ]; then
python -m pip install click pydantic
python .buildkite/pipeline_generator/pipeline_generator.py --run_all=$RUN_ALL --list_file_diff="$LIST_FILE_DIFF"
python .buildkite/pipeline_generator/pipeline_generator.py --run_all=$RUN_ALL --list_file_diff="$LIST_FILE_DIFF" --nightly="$NIGHTLY"
buildkite-agent pipeline upload .buildkite/pipeline.yaml
exit 0
fi
cd .buildkite
echo "List file diff: $LIST_FILE_DIFF"
echo "Run all: $RUN_ALL"
minijinja-cli test-template.j2 test-pipeline.yaml -D list_file_diff="$LIST_FILE_DIFF" -D run_all="$RUN_ALL" > pipeline.yml
echo "Nightly: $NIGHTLY"
minijinja-cli test-template.j2 test-pipeline.yaml -D list_file_diff="$LIST_FILE_DIFF" -D run_all="$RUN_ALL" -D nightly="$NIGHTLY" > pipeline.yml
buildkite-agent pipeline upload pipeline.yml
exit 0
}
Expand Down
15 changes: 6 additions & 9 deletions scripts/test-template-aws.j2
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ steps:
{% set ns.blocked = 0 %}
{% endif %}

{% if nightly == "1" %}
{% set ns.blocked = 0 %}
{% endif %}

{% if step.source_file_dependencies %}
{% for source_file in step.source_file_dependencies %}
{% for file in list_file_diff %}
Expand All @@ -51,25 +55,18 @@ steps:
{% set ns.blocked = 0 %}
{% endif %}

{% if step.gpu == "a100" %}
{% set ns.blocked = 1 %}
{% endif %}

{% if ns.blocked == 1 or step.optional %}
{% if ns.blocked == 1 or (step.optional and nightly != "1") %}
- block: "Run {{ step.label }}"
depends_on: image-build
key: block-{{ step.label | replace(" ", "-") | lower | replace("(", "") | replace(")", "") | replace("%", "") | replace(",", "-") }}
{% endif %}

- label: "{{ step.label }}"
{% if ns.blocked == 1 or step.optional %}
{% if ns.blocked == 1 or (step.optional and nightly != "1") %}
depends_on: block-{{ step.label | replace(" ", "-") | lower | replace("(", "") | replace(")", "") | replace("%", "") | replace(",", "-") }}
{% else %}
depends_on: image-build
{% endif %}
{% if step.nightly %}
if: build.env("NIGHTLY") == "1"
{% endif %}
agents:
{% if step.label == "Documentation Build" %}
queue: small_cpu_queue
Expand Down

0 comments on commit 544f0be

Please sign in to comment.