Skip to content

Commit 6a7be49

Browse files
authored
fix(ci): pin baseline x86-64 compiler target to prevent SIGILL on cached venvs (#1785)
1 parent cf3f219 commit 6a7be49

2 files changed

Lines changed: 13 additions & 1 deletion

File tree

.github/workflows/_test.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,12 @@ jobs:
8585
- name: Check Poetry .lock
8686
run: poetry check --lock
8787

88+
- name: Set baseline x86-64 compiler flags
89+
if: runner.os == 'Linux'
90+
run: |
91+
echo "CFLAGS=-march=x86-64" >> $GITHUB_ENV
92+
echo "CXXFLAGS=-march=x86-64" >> $GITHUB_ENV
93+
8894
- name: Install dependencies
8995
run: |
9096
if [ "${{ inputs.upgrade-deps}}" = "true" ]; then

.github/workflows/lint.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ on:
1111
env:
1212
POETRY_VERSION: 1.8.2
1313
PYTHON_VERSION: "3.11"
14+
CFLAGS: "-march=x86-64"
15+
CXXFLAGS: "-march=x86-64"
1416

1517
jobs:
1618
lint:
@@ -28,6 +30,10 @@ jobs:
2830
id: full-python-version
2931
run: echo "version=$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))")" >> $GITHUB_OUTPUT
3032

33+
- name: Get runner architecture
34+
id: runner-arch
35+
run: echo "arch=$(uname -m)" >> $GITHUB_OUTPUT
36+
3137
- name: Bootstrap poetry
3238
run: |
3339
curl -sSL https://install.python-poetry.org | POETRY_VERSION=${{ env.POETRY_VERSION }} python -
@@ -41,7 +47,7 @@ jobs:
4147
id: cache
4248
with:
4349
path: .venv
44-
key: venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('**/poetry.lock') }}
50+
key: venv-${{ runner.os }}-${{ steps.runner-arch.outputs.arch }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('**/poetry.lock') }}
4551

4652
- name: Ensure cache is healthy
4753
if: steps.cache.outputs.cache-hit == 'true'

0 commit comments

Comments
 (0)