ci: put pip --user conan on PATH for self-hosted Linux runners (fix exit127) - #590
Merged
Conversation
The Install Conan step runs pip install "conan>=2.0,<3.0", which on the self-hosted Linux runners (Ubuntu 24.04, PEP 668) lands the conan entry point in ~/.local/bin. That dir is not on the runner service's non-interactive PATH, so the next step (conan profile detect) fails with conan: command not found / exit 127. GitHub-hosted runners pre-path ~/.local/bin, which is why only the self-hosted Linux legs broke. Append $HOME/.local/bin to $GITHUB_PATH right after install so conan resolves in every later step regardless of runner login PATH. Same idiom already used for Homebrew on the macOS Intel runner. Linux legs only; Windows/macOS conan steps unchanged. codeql installs and detects in one step, so it also exports PATH inline.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the conan: command not found / exit 127 failures on the self-hosted Linux runners (VM905, c2pool-linux-905-*), seen on DGB #589 @3a3a2ab47 and reported by dgb-scrypt-steward.
Root cause: the Install Conan step runs pip install "conan>=2.0,<3.0". On Ubuntu 24.04 (PEP 668) that lands the conan entry point in ~/.local/bin, which is NOT on the self-hosted runner service non-interactive PATH, so the next step (conan profile detect) gets command-not-found. GitHub-hosted runners pre-path ~/.local/bin, which is why only self-hosted Linux legs failed while Windows/macOS (other runners) passed.
Fix: append $HOME/.local/bin to $GITHUB_PATH right after install so conan resolves in every later step regardless of runner login PATH. This is baked into the workflow, so it survives runner restarts/reprovisioning (addresses the harden ask). Same idiom already used for Homebrew on macpro-intel-204.
Scope: Linux legs only across build.yml (linux, linux-asan, coin-bch, coin-bch-asan, coin-dgb-auxdoge), coin-matrix.yml, release.yml, codeql-analysis.yml. Windows (windows-2022) and macOS conan steps deliberately untouched. codeql installs+detects in one step so it also exports PATH inline.
Merge-gated: awaiting push-approval. Note: re-running #589 will need it rebased onto merged master, since a re-run reuses the PR own workflow version.