Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cython
Commits
c83fd441
Commit
c83fd441
authored
Oct 22, 2021
by
0dminnimda
Committed by
GitHub
Oct 22, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Introduce new shell syntax for ci-run.sh to improve Windows support (GH-4400)
parent
c8c9a12e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
28 deletions
+31
-28
Tools/ci-run.sh
Tools/ci-run.sh
+31
-28
No files found.
Tools/ci-run.sh
View file @
c83fd441
...
...
@@ -3,9 +3,9 @@
GCC_VERSION
=
${
GCC_VERSION
:
=8
}
# Set up compilers
if
[
"
$TEST_CODE_STYLE
"
==
"1"
]
;
then
if
[
[
$TEST_CODE_STYLE
==
"1"
]
]
;
then
echo
"Skipping compiler setup"
elif
[
"
${
OSTYPE
##linux-gnu*
}
"
==
""
]
;
then
elif
[
[
$OSTYPE
==
"linux-gnu"
*
]
]
;
then
echo
"Setting up linux compiler"
echo
"Installing requirements [apt]"
sudo
apt-add-repository
-y
"ppa:ubuntu-toolchain-r/test"
...
...
@@ -13,7 +13,7 @@ elif [ "${OSTYPE##linux-gnu*}" == "" ]; then
sudo
apt
install
-y
-q
ccache gdb python-dbg python3-dbg gcc-
$GCC_VERSION
||
exit
1
ALTERNATIVE_ARGS
=
""
if
[
-z
"
${
BACKEND
##*cpp*
}
"
]
;
then
if
[
[
$BACKEND
==
*
"cpp"
*
]
]
;
then
sudo
apt
install
-y
-q
g++-
$GCC_VERSION
||
exit
1
ALTERNATIVE_ARGS
=
"--slave /usr/bin/g++ g++ /usr/bin/g++-
$GCC_VERSION
"
fi
...
...
@@ -23,11 +23,11 @@ elif [ "${OSTYPE##linux-gnu*}" == "" ]; then
sudo
update-alternatives
--install
/usr/bin/gcc gcc /usr/bin/gcc-
$GCC_VERSION
60
$ALTERNATIVE_ARGS
export
CC
=
"gcc"
if
[
-z
"
${
BACKEND
##*cpp*
}
"
]
;
then
if
[
[
$BACKEND
==
*
"cpp"
*
]
]
;
then
sudo
update-alternatives
--set
g++ /usr/bin/g++-
$GCC_VERSION
export
CXX
=
"g++"
fi
elif
[
"
${
OSTYPE
##darwin*
}
"
==
""
]
;
then
elif
[
[
$OSTYPE
==
"darwin"
*
]
]
;
then
echo
"Setting up macos compiler"
export
CC
=
"clang -Wno-deprecated-declarations"
export
CXX
=
"clang++ -stdlib=libc++ -Wno-deprecated-declarations"
...
...
@@ -36,7 +36,7 @@ else
fi
# Set up miniconda
if
[
"
$STACKLESS
"
==
"true"
]
;
then
if
[
[
$STACKLESS
==
"true"
]
]
;
then
echo
"Installing stackless python"
#conda install --quiet --yes nomkl --file=test-requirements.txt --file=test-requirements-cpython.txt
conda config
--add
channels stackless
...
...
@@ -50,11 +50,11 @@ echo "===================="
echo
"|VERSIONS INSTALLED|"
echo
"===================="
echo
"Python
$PYTHON_SYS_VERSION
"
if
[
"
$CC
"
]
;
then
if
[
[
$CC
]
]
;
then
which
${
CC
%% *
}
${
CC
%% *
}
--version
fi
if
[
"
$CXX
"
]
;
then
if
[
[
$CXX
]
]
;
then
which
${
CXX
%% *
}
${
CXX
%% *
}
--version
fi
...
...
@@ -62,39 +62,39 @@ echo "===================="
# Install python requirements
echo
"Installing requirements [python]"
if
[
-z
"
${
PYTHON_VERSION
##2.7
}
"
]
;
then
if
[
[
$PYTHON_VERSION
==
"2.7"
*
]
]
;
then
pip
install
wheel
||
exit
1
pip
install
-r
test-requirements-27.txt
||
exit
1
elif
[
-z
"
${
PYTHON_VERSION
##3.[45]*
}
"
]
;
then
elif
[
[
$PYTHON_VERSION
==
"3."
[
45]
*
]
]
;
then
python
-m
pip
install
wheel
||
exit
1
python
-m
pip
install
-r
test-requirements-34.txt
||
exit
1
else
python
-m
pip
install
-U
pip setuptools wheel
||
exit
1
if
[
-n
"
${
PYTHON_VERSION
##*-dev
}
"
-o
"
$COVERAGE
"
==
"1"
]
;
then
if
[
[
$PYTHON_VERSION
!=
*
"-dev"
||
$COVERAGE
==
"1"
]
]
;
then
python
-m
pip
install
-r
test-requirements.txt
||
exit
1
if
[
"
${
PYTHON_VERSION
##pypy*
}
"
-a
"
${
PYTHON_VERSION
##3.[4789]*
}
"
]
;
then
if
[
[
$PYTHON_VERSION
!=
"pypy"
*
&&
$PYTHON_VERSION
!=
"3."
[
4789]
*
]
]
;
then
python
-m
pip
install
-r
test-requirements-cpython.txt
||
exit
1
fi
fi
fi
if
[
"
$TEST_CODE_STYLE
"
==
"1"
]
;
then
STYLE_ARGS
=
"--no-unit --no-doctest --no-file --no-pyregr --no-examples"
;
if
[
[
$TEST_CODE_STYLE
==
"1"
]
]
;
then
STYLE_ARGS
=
"--no-unit --no-doctest --no-file --no-pyregr --no-examples"
python
-m
pip
install
-r
doc-requirements.txt
||
exit
1
else
STYLE_ARGS
=
"--no-code-style"
# Install more requirements
if
[
-n
"
${
PYTHON_VERSION
##*-dev
}
"
]
;
then
if
[
-z
"
${
BACKEND
##*cpp*
}
"
]
;
then
if
[
[
$PYTHON_VERSION
!=
*
"-dev"
]
]
;
then
if
[
[
$BACKEND
==
*
"cpp"
*
]
]
;
then
echo
"WARNING: Currently not installing pythran due to compatibility issues"
# python -m pip install pythran==0.9.5 || exit 1
fi
if
[
"
$BACKEND
"
!=
"cpp"
-a
-n
"
${
PYTHON_VERSION
##pypy*
}
"
-a
-n
"
${
PYTHON_VERSION
##2*
}
"
-a
-n
"
${
PYTHON_VERSION
##3.4*
}
"
]
;
then
if
[
[
$BACKEND
!=
"cpp"
&&
$PYTHON_VERSION
!=
"pypy"
*
&&
$PYTHON_VERSION
!=
"2"
*
&&
$PYTHON_VERSION
!=
"3.4"
*
]
]
;
then
python
-m
pip
install
mypy
||
exit
1
fi
fi
...
...
@@ -110,7 +110,7 @@ export PATH="/usr/lib/ccache:$PATH"
# This is true for the latest msvc, gcc and clang
CFLAGS
=
"-O0 -ggdb -Wall -Wextra"
if
[
"
$NO_CYTHON_COMPILE
"
!=
"1"
-a
-n
"
${
PYTHON_VERSION
##pypy*
}
"
]
;
then
if
[
[
$NO_CYTHON_COMPILE
!=
"1"
&&
$PYTHON_VERSION
!=
"pypy"
*
]
]
;
then
BUILD_CFLAGS
=
"
$CFLAGS
-O2"
if
[[
$PYTHON_SYS_VERSION
==
"2"
*
]]
;
then
...
...
@@ -118,10 +118,10 @@ if [ "$NO_CYTHON_COMPILE" != "1" -a -n "${PYTHON_VERSION##pypy*}" ]; then
fi
SETUP_ARGS
=
""
if
[
"
$COVERAGE
"
==
"1"
]
;
then
if
[
[
$COVERAGE
==
"1"
]
]
;
then
SETUP_ARGS
=
"
$SETUP_ARGS
--cython-coverage"
fi
if
[
"
$CYTHON_COMPILE_ALL
"
==
"1"
]
;
then
if
[
[
$CYTHON_COMPILE_ALL
==
"1"
]
]
;
then
SETUP_ARGS
=
"
$SETUP_ARGS
--cython-compile-all"
fi
SETUP_ARGS
=
"
$SETUP_ARGS
...
...
@@ -130,15 +130,18 @@ if [ "$NO_CYTHON_COMPILE" != "1" -a -n "${PYTHON_VERSION##pypy*}" ]; then
CFLAGS
=
$BUILD_CFLAGS
\
python setup.py build_ext
-i
$SETUP_ARGS
||
exit
1
if
[
-z
"
$COVERAGE
"
-a
-z
"
$STACKLESS
"
-a
-n
"
${
BACKEND
//*cpp*
}
"
-a
-z
"
$LIMITED_API
"
-a
-z
"
$CYTHON_COMPILE_ALL
"
-a
-z
"
$EXTRA_CFLAGS
"
]
;
then
# COVERAGE can be either "" (empty or not set) or "1" (when we set it)
# STACKLESS can be either "" (empty or not set) or "true" (when we set it)
# CYTHON_COMPILE_ALL can be either "" (empty or not set) or "1" (when we set it)
if
[[
$COVERAGE
!=
"1"
&&
$STACKLESS
!=
"true"
&&
$BACKEND
!=
*
"cpp"
*
&&
$CYTHON_COMPILE_ALL
!=
"1"
&&
$LIMITED_API
==
""
&&
$EXTRA_CFLAGS
==
""
]]
;
then
python setup.py bdist_wheel
||
exit
1
fi
fi
if
[
"
$TEST_CODE_STYLE
"
==
"1"
]
;
then
make
-C
docs html
||
exit
1
elif
[
-n
"
${
PYTHON_VERSION
##pypy*
}
"
]
;
then
if
[
[
$TEST_CODE_STYLE
==
"1"
]
]
;
then
make
-C
docs html
||
exit
1
elif
[
[
$PYTHON_VERSION
!=
"pypy"
*
]
]
;
then
# Run the debugger tests in python-dbg if available
# (but don't fail, because they currently do fail)
PYTHON_DBG
=
$(
python
-c
'import sys; print("%d.%d" % sys.version_info[:2])'
)
...
...
@@ -150,10 +153,10 @@ elif [ -n "${PYTHON_VERSION##pypy*}" ]; then
fi
RUNTESTS_ARGS
=
""
if
[
"
$COVERAGE
"
==
"1"
]
;
then
if
[
[
$COVERAGE
==
"1"
]
]
;
then
RUNTESTS_ARGS
=
"
$RUNTESTS_ARGS
--coverage --coverage-html --cython-only"
fi
if
[
-z
"
$TEST_CODE_STYLE
"
]
;
then
if
[
[
$TEST_CODE_STYLE
!=
"1"
]
]
;
then
RUNTESTS_ARGS
=
"
$RUNTESTS_ARGS
-j7"
fi
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment