Skip to content

Commit 10ca808

Browse files
author
Mark Hildebrand
authored
Fix CI issues (#16)
- Upgrade the GitHub actions "checkout" from v2/v3 to v4. - Increase the version of clang used in CI to version 15. - Add a generic `x86_64_v3` backend for cibuildwheel builds.
1 parent ab8a684 commit 10ca808

File tree

7 files changed

+30
-13
lines changed

7 files changed

+30
-13
lines changed

.github/workflows/build-docs.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
runs-on: ubuntu-latest
2525
steps:
2626
- name: Checkout
27-
uses: actions/checkout@v3
27+
uses: actions/checkout@v4
2828

2929
- name: Install Dependencies
3030
run: |
@@ -39,8 +39,8 @@ jobs:
3939
4040
- name: Build Wheel
4141
env:
42-
CC: clang-13
43-
CXX: clang++-13
42+
CC: clang-15
43+
CXX: clang++-15
4444
run: |
4545
cd ${GITHUB_WORKSPACE}/bindings/python
4646
python setup.py bdist_wheel --cmake-executable="cmake" --build-type=Debug -- -- -j2

.github/workflows/build-linux.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,17 @@ jobs:
2121
strategy:
2222
matrix:
2323
build_type: [Release]
24-
cxx: [g++-11, g++-12, clang++-13]
24+
cxx: [g++-11, g++-12, clang++-15]
2525
include:
2626
- cxx: g++-11
2727
cc: gcc-11
2828
- cxx: g++-12
2929
cc: gcc-12
30-
- cxx: clang++-13
31-
cc: clang-13
30+
- cxx: clang++-15
31+
cc: clang-15
3232

3333
steps:
34-
- uses: actions/checkout@v2
34+
- uses: actions/checkout@v4
3535
- name: Configure build
3636
working-directory: ${{ runner.temp }}
3737
env:

.github/workflows/cibuildwheel.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313

1414
steps:
15-
- uses: actions/checkout@v2
15+
- uses: actions/checkout@v4
1616

1717
- name: Install cibuildwheel
1818
run: python -m pip install cibuildwheel

.github/workflows/deploy-docs.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
runs-on: ubuntu-latest
3131
steps:
3232
- name: Checkout
33-
uses: actions/checkout@v3
33+
uses: actions/checkout@v4
3434

3535
- name: Install Dependencies
3636
run: |
@@ -45,8 +45,8 @@ jobs:
4545
4646
- name: Build Wheel
4747
env:
48-
CC: clang-13
49-
CXX: clang++-13
48+
CC: clang-15
49+
CXX: clang++-15
5050
run: |
5151
cd ${GITHUB_WORKSPACE}/bindings/python
5252
python setup.py bdist_wheel --cmake-executable="cmake" --build-type=Debug -- -- -j2

bindings/python/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ config-settings = {}
2222
dependency-versions = "pinned"
2323
environment.CC = "/opt/rh/devtoolset-11/root/usr/bin/cc"
2424
environment.CXX = "/opt/rh/devtoolset-11/root/usr/bin/c++"
25-
# Compile multiple versions for difference microarchitectures
25+
# Compile multiple versions for differenct microarchitectures
2626
environment.PYSVS_MULTIARCH = "YES"
2727
environment-pass = []
2828
build-verbosity = "3"

bindings/python/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def target(arch):
2020
if os.environ.get("PYSVS_MULTIARCH", None) is not None:
2121
pysvs_microarchs = [
2222
"cascadelake",
23-
# "skylake_avx512",
23+
"x86_64_v3", # conservative base CPU for x86 CPUs.
2424
]
2525

2626
# Add the current host to the list of micro-architecture if it doesn't already exist.

bindings/python/src/pysvs/loader.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,16 @@ def _override_backend():
3333
"""
3434
return os.environ.get("PYSVS_OVERRIDE_BACKEND", None)
3535

36+
def _debug_override_cpu():
37+
"""
38+
Set the current CPU microarchitecture.
39+
Unlike `_override_backend()`, the loader will still perform backend-selection based
40+
on this architecture.
41+
42+
If no override is set, return `None`.
43+
"""
44+
return os.environ.get("PYSVS_DEBUG_OVERRIDE_CPU", None)
45+
3646

3747
# The name of the manifest file.
3848
FLAGS_MANIFEST = "flags_manifest.json" # Keep in-sync with CMakeLists.txt
@@ -122,7 +132,14 @@ def _find_library():
122132

123133
# Get the current CPU and the manifest of compiled libraries that ship with this
124134
# library.
135+
#
136+
# For debug purposes, allow the CPU to be set externally rather than using archspec's
137+
# CPU detection.
125138
host = cpu.host()
139+
debug_override = _debug_override_cpu()
140+
if debug_override is not None:
141+
host = debug_override
142+
126143
manifest = _load_manifest()
127144

128145
# Respect override requests.

0 commit comments

Comments
 (0)