Skip to content

Commit 62a1ecc

Browse files
authored
Update release.yml (#167)
1 parent 550c664 commit 62a1ecc

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

.github/workflows/release.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ on:
55
inputs:
66
USE_LOCAL_VERSION:
77
description: 'use local version for wheel'
8-
type: number
8+
type: string
99
default: 1
1010
BUNDLE_MLIR_PYTHON_BINDINGS:
1111
description: 'bundle mlir python bindings'
12-
type: number
12+
type: string
1313
default: 1
1414
release:
1515
types:
@@ -94,13 +94,15 @@ jobs:
9494
- name: Build wheel
9595
shell: bash
9696
run: |
97-
98-
pip install mlir-python-bindings==$BINDINGS_VERSION -t tmp
99-
cp -R tmp/mlir $PWD
97+
98+
if [ "$BUNDLE_MLIR_PYTHON_BINDINGS" == "1" ]; then
99+
pip install mlir-python-bindings==$BINDINGS_VERSION -t tmp
100+
cp -R tmp/mlir $PWD
101+
fi
100102
pip wheel . -v -w wheelhouse
101103
102104
- name: auditwheel
103-
if: startsWith(matrix.os, 'ubuntu')
105+
if: (startsWith(matrix.os, 'ubuntu') && env.BUNDLE_MLIR_PYTHON_BINDINGS == '1')
104106
shell: bash
105107
run: |
106108

mlir/extras/util.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def enable_debug():
8484
def shlib_ext():
8585
if platform.system() == "Darwin":
8686
shlib_ext = "dylib"
87-
elif platform.system() == "Linux":
87+
elif platform.system() in {"Linux", "Emscripten"}:
8888
shlib_ext = "so"
8989
elif platform.system() == "Windows":
9090
shlib_ext = "lib"
@@ -95,7 +95,7 @@ def shlib_ext():
9595

9696

9797
def shlib_prefix():
98-
if platform.system() in {"Darwin", "Linux"}:
98+
if platform.system() in {"Darwin", "Linux", "Emscripten"}:
9999
shlib_pref = "lib"
100100
elif platform.system() == "Windows":
101101
shlib_pref = ""

0 commit comments

Comments
 (0)