Skip to content

Commit

Permalink
update test skip, clean up, clean tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
ClementTsang committed Aug 2, 2024
1 parent 8840db2 commit 3043d80
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ test_task:
auto_cancellation: "false" # We set this to false to prevent nightly builds from affecting this
only_if: $CIRRUS_BUILD_SOURCE != "api" && ($CIRRUS_BRANCH == "main" || $CIRRUS_PR != "")
timeout_in: "15m"
skip: "!changesInclude('.cargo/**', '.cirrus.yml', 'sample_configs/**', 'src/**', 'tests/**', 'build.rs', 'Cargo.lock', 'Cargo.toml', 'clippy.toml', 'rustfmt.toml')"
skip: "!changesInclude('.cargo/**', 'sample_configs/**', 'scripts/cirrus/**', 'src/**', 'tests/**', '.cirrus.yml', 'build.rs', 'Cargo.lock', 'Cargo.toml', 'clippy.toml', 'rustfmt.toml')"
matrix:
- name: "FreeBSD 14 Test"
freebsd_instance:
Expand Down
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,7 @@ supply-chain/
# samply profiling
profile.json

**/venv/
**/venv/

# Sometimes used for scripts
.ruff_cache
12 changes: 6 additions & 6 deletions scripts/cirrus/release.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,13 +222,15 @@ def main():

if tasks and mutation_id:
print("Killing previous tasks first...")

if stop_build_tasks(key, tasks, mutation_id):
print("Previous tasks successfully stopped.")
print("All previous tasks successfully stopped.")
else:
print(
"Not all previous tasks stopped. This isn't a problem, but it does mean wasted resources."
"Not all previous tasks stopped. This isn't a problem but it is a waste."
)

tasks = []
mutation_id = "Cirrus CI Build {}-{}-{}".format(
build_type, branch, int(time())
)
Expand All @@ -248,7 +250,7 @@ def main():
print("There was an issue with creating a build job.")
continue

# First, sleep 4 minutes total, as it's unlikely it'll finish before then.
# First, sleep X minutes total, as it's unlikely it'll finish before then.
SLEEP_MINUTES = 4
print(f"Sleeping for {SLEEP_MINUTES} minutes.")

Expand All @@ -262,9 +264,7 @@ def main():
SLEEP_SEC = 30
TRIES = int(MINUTES * (60 / SLEEP_SEC)) # Works out to 20 tries.

print(
f"Mandatory nap over. Starting to check for completion. Will check for {MINUTES} minutes."
)
print(f"Mandatory nap over. Checking for completion for {MINUTES} min.")

for attempt in range(TRIES):
print("Checking...")
Expand Down

0 comments on commit 3043d80

Please sign in to comment.