Skip to content

Commit 87b510f

Browse files
committed
Create relenv toolchain symlink in GitHub Actions
Python's sysconfig has hardcoded paths expecting toolchains at ~/.local/relenv/toolchain/, but relenv extracts them to ~/.cache/relenv/toolchains/. When pip builds packages with C extensions like timelib, the build fails with 'gcc command failed: No such file or directory' because it can't find the compiler at the sysconfig path. This adds a workflow step to create the symlink after decompressing dependencies, matching what we do in local container setups. Fixes functional/integration test failures on Python 3.11+ when tests create virtualenvs and install requirements that need compilation.
1 parent 4354e88 commit 87b510f

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

.github/workflows/test-action.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,13 @@ jobs:
221221
run: |
222222
docker exec ${{ github.run_id}}_salt-test python3 -m nox --force-color -e decompress-dependencies -- linux ${{ matrix.arch }}
223223
224+
- name: Create relenv toolchain symlink
225+
run: |
226+
# Python's sysconfig expects toolchain at ~/.local/relenv/toolchain but
227+
# relenv extracts to ~/.cache/relenv/toolchains - create symlink
228+
docker exec ${{ github.run_id}}_salt-test bash -c \
229+
'mkdir -p ~/.local/relenv && ln -sf ~/.cache/relenv/toolchains ~/.local/relenv/toolchain'
230+
224231
- name: Download testrun-changed-files.txt
225232
if: ${{ fromJSON(inputs.testrun)['type'] != 'full' }}
226233
uses: actions/download-artifact@v4
@@ -555,6 +562,13 @@ jobs:
555562
run: |
556563
docker exec ${{ github.run_id}}_salt-test python3 -m nox --force-color -e decompress-dependencies -- linux ${{ matrix.arch }}
557564
565+
- name: Create relenv toolchain symlink
566+
run: |
567+
# Python's sysconfig expects toolchain at ~/.local/relenv/toolchain but
568+
# relenv extracts to ~/.cache/relenv/toolchains - create symlink
569+
docker exec ${{ github.run_id}}_salt-test bash -c \
570+
'mkdir -p ~/.local/relenv && ln -sf ~/.cache/relenv/toolchains ~/.local/relenv/toolchain'
571+
558572
- name: Download testrun-changed-files.txt
559573
if: ${{ fromJSON(inputs.testrun)['type'] != 'full' }}
560574
uses: actions/download-artifact@v4

0 commit comments

Comments
 (0)