diff --git a/.github/workflows/library_check.yml b/.github/workflows/library_check.yml index 91e5fe4..d58fba8 100644 --- a/.github/workflows/library_check.yml +++ b/.github/workflows/library_check.yml @@ -45,6 +45,10 @@ on: dir: type: string default: "." + # Cancel the macOS test job if it runs longer than this + macos_timeout_minutes: + type: number + default: 15 jobs: tests: @@ -58,6 +62,7 @@ jobs: coverage_threshold: ${{ inputs.coverage_threshold }} conan_version: ${{ inputs.conan_version }} dir: ${{ inputs.dir }} + macos_timeout_minutes: ${{ inputs.macos_timeout_minutes }} secrets: inherit lint: diff --git a/.github/workflows/package_and_upload_all.yml b/.github/workflows/package_and_upload_all.yml index 8be8b5d..db2e1c8 100644 --- a/.github/workflows/package_and_upload_all.yml +++ b/.github/workflows/package_and_upload_all.yml @@ -60,6 +60,10 @@ on: type: string default: hal/tc/llvm description: "Compiler profile for the LLVM builds, e.g. hal/tc/llvm-23" + macos_timeout_minutes: + type: number + default: 15 + description: "Cancel the macOS job if it runs longer than this. Hosted macOS minutes cost several times a Linux minute, so a hung job is expensive" secrets: conan_remote_password: @@ -186,6 +190,7 @@ jobs: remote_url: ${{ inputs.remote_url }} extra_conan_arguments: ${{ inputs.extra_conan_arguments }} build_types: ${{ needs.plan.outputs.build_types }} + timeout_minutes: ${{ inputs.macos_timeout_minutes }} secrets: conan_remote_user: ${{ secrets.conan_remote_user }} conan_remote_password: ${{ secrets.conan_remote_password }} diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 16c146b..b31379a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -37,6 +37,10 @@ on: type: string default: main description: "Set the version to pull the libhal conan-config2 info. This must be a tagged version of the config-conan2 repo" + macos_timeout_minutes: + type: number + default: 15 + description: "Cancel the macOS job if it runs longer than this. Hosted macOS minutes cost several times a Linux minute, so a hung job is expensive" # ======================================================================== # Deprecated inputs @@ -82,7 +86,7 @@ jobs: # os: Windows runs-on: ${{ matrix.runner_os }} - timeout-minutes: 30 + timeout-minutes: ${{ startsWith(matrix.runner_os, 'macos') && inputs.macos_timeout_minutes || 30 }} env: VERBOSE: 1 steps: diff --git a/README.md b/README.md index c32df77..f1e8e15 100644 --- a/README.md +++ b/README.md @@ -289,6 +289,8 @@ Comprehensive CI workflow that runs tests, linting, and documentation checks. - `repo` (string): GitHub repository. Default: current repository - `conan_version` (string): Conan version. Default: "2.22.2" - `dir` (string): Conan package directory. Default: "." +- `macos_timeout_minutes` (number): Cancel the macOS test job if it runs longer + than this. Default: 15 **Usage:** @@ -393,6 +395,8 @@ Creates Conan packages for the platforms and architectures libhal supports. ARMv6-M (Cortex-M0, M0+, M1) is skipped. Default: `false` - `llvm_profile` (string): Compiler profile for the LLVM builds, e.g. "hal/tc/llvm-23". Default: "hal/tc/llvm" +- `macos_timeout_minutes` (number): Cancel the macOS job if it runs longer than + this. Default: 15 - `extra_conan_arguments` (string): Extra arguments for `conan create`. Default: "" - `ci_ref` (string): Git ref of libhal/ci to take scripts from. Default: @@ -528,6 +532,8 @@ Runs unit tests on multiple platforms. - `dir` (string): Directory containing the Conan package. Default: "." - `conan_version` (string): Conan version. Default: "2.22.2" - `config2_version` (string): conan-config2 branch/tag. Default: "main" +- `macos_timeout_minutes` (number): Cancel the macOS job if it runs longer than + this. Default: 15 **Deprecated Inputs (no longer used):** @@ -542,7 +548,8 @@ Runs tests on: - Ubuntu 24.04 (x86_64, Linux) - macOS 15 (armv8, macOS) -Each job times out after 30 minutes. +The Ubuntu job times out after 30 minutes and the macOS job after +`macos_timeout_minutes`. **Usage:**