mirror of https://github.com/YosysHQ/yosys.git
Add test, shell for windows
This commit is contained in:
parent
ab4ea84679
commit
ab84c105c1
|
@ -91,7 +91,7 @@ jobs:
|
||||||
# manylinux2014 (default) does not have a modern enough C++ compiler for Yosys
|
# manylinux2014 (default) does not have a modern enough C++ compiler for Yosys
|
||||||
CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28
|
CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28
|
||||||
CIBW_MANYLINUX_AARCH64_IMAGE: manylinux_2_28
|
CIBW_MANYLINUX_AARCH64_IMAGE: manylinux_2_28
|
||||||
CIBW_BEFORE_ALL: bash ./.github/workflows/cibw_before_all.sh
|
CIBW_BEFORE_ALL: bash ./.github/workflows/wheels/cibw_before_all.sh
|
||||||
CIBW_ENVIRONMENT: >
|
CIBW_ENVIRONMENT: >
|
||||||
CXXFLAGS=-I./boost/pfx/include
|
CXXFLAGS=-I./boost/pfx/include
|
||||||
LINKFLAGS=-L./boost/pfx/lib
|
LINKFLAGS=-L./boost/pfx/lib
|
||||||
|
@ -103,7 +103,8 @@ jobs:
|
||||||
PKG_CONFIG_PATH=./ffi/pfx/lib/pkgconfig
|
PKG_CONFIG_PATH=./ffi/pfx/lib/pkgconfig
|
||||||
MACOSX_DEPLOYMENT_TARGET=11
|
MACOSX_DEPLOYMENT_TARGET=11
|
||||||
makeFlags='BOOST_PYTHON_LIB=./boost/pfx/lib/libboost_python*.a CONFIG=clang'
|
makeFlags='BOOST_PYTHON_LIB=./boost/pfx/lib/libboost_python*.a CONFIG=clang'
|
||||||
CIBW_BEFORE_BUILD: bash ./.github/workflows/cibw_before_build.sh
|
CIBW_BEFORE_BUILD: bash ./.github/workflows/wheels/cibw_before_build.sh
|
||||||
|
CIBW_TEST_COMMAND: python3 -c "from pyosys import libyosys as ys;d=ys.Design();ys.run_pass('help', d)"
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
path: ./dist/*.whl
|
path: ./dist/*.whl
|
||||||
|
|
|
@ -24,7 +24,7 @@ import subprocess
|
||||||
__dir__ = os.path.dirname(os.path.abspath(__file__))
|
__dir__ = os.path.dirname(os.path.abspath(__file__))
|
||||||
|
|
||||||
|
|
||||||
workflow = yaml.safe_load(open(os.path.join(__dir__, "wheels.yml")))
|
workflow = yaml.safe_load(open(os.path.join(os.path.dirname(__dir__), "wheels.yml")))
|
||||||
|
|
||||||
env = os.environ.copy()
|
env = os.environ.copy()
|
||||||
|
|
|
@ -11,11 +11,13 @@ if command -v apk &> /dev/null; then
|
||||||
apk add flex bison
|
apk add flex bison
|
||||||
fi
|
fi
|
||||||
|
|
||||||
## macOS/Windows -- install in GitHub Action itself, not container
|
## macOS/Windows -- installed in GitHub Action itself, not container
|
||||||
|
|
||||||
# Build Static FFI (platform-dependent but not Python version dependent)
|
# Build Static FFI (platform-dependent but not Python version dependent)
|
||||||
cd ffi
|
cd ffi
|
||||||
SHELL=bash CFLAGS=-fPIC CXXFLAGS=-fPIC ./configure --prefix=$PWD/pfx
|
## Ultimate libyosys.so will be shared, so we need fPIC for the static libraries
|
||||||
|
CFLAGS=-fPIC CXXFLAGS=-fPIC ./configure --prefix=$PWD/pfx
|
||||||
make install -j$(getconf _NPROCESSORS_ONLN 2>/dev/null || sysctl -n hw.ncpu)
|
## Without this, SHELL has a space in its path which breaks the makefile
|
||||||
|
make install -j$(getconf _NPROCESSORS_ONLN 2>/dev/null || sysctl -n hw.ncpu) SHELL=bash
|
||||||
|
## Forces static library to be used in all situations
|
||||||
sed -i.bak 's@-L${toolexeclibdir} -lffi@${toolexeclibdir}/libffi.a@' ./pfx/lib/pkgconfig/libffi.pc
|
sed -i.bak 's@-L${toolexeclibdir} -lffi@${toolexeclibdir}/libffi.a@' ./pfx/lib/pkgconfig/libffi.pc
|
|
@ -1,6 +1,13 @@
|
||||||
set -e
|
set -e
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
|
# Don't use objects from previous compiles on Windows/macOS
|
||||||
|
make clean
|
||||||
|
|
||||||
|
# DEBUG: show python3 and python3-config outputs
|
||||||
|
python3 --version
|
||||||
|
python3-config --includes
|
||||||
|
|
||||||
# Build boost
|
# Build boost
|
||||||
cd ./boost
|
cd ./boost
|
||||||
## Delete the artefacts from previous builds (if any)
|
## Delete the artefacts from previous builds (if any)
|
Loading…
Reference in New Issue