mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-11-03 21:09:12 +00:00 
			
		
		
		
	Add test, shell for windows
This commit is contained in:
		
							parent
							
								
									ab4ea84679
								
							
						
					
					
						commit
						ab84c105c1
					
				
					 4 changed files with 17 additions and 7 deletions
				
			
		
							
								
								
									
										5
									
								
								.github/workflows/wheels.yml
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										5
									
								
								.github/workflows/wheels.yml
									
										
									
									
										vendored
									
									
								
							| 
						 | 
				
			
			@ -91,7 +91,7 @@ jobs:
 | 
			
		|||
          # manylinux2014 (default) does not have a modern enough C++ compiler for Yosys
 | 
			
		||||
          CIBW_MANYLINUX_X86_64_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: >
 | 
			
		||||
            CXXFLAGS=-I./boost/pfx/include
 | 
			
		||||
            LINKFLAGS=-L./boost/pfx/lib
 | 
			
		||||
| 
						 | 
				
			
			@ -103,7 +103,8 @@ jobs:
 | 
			
		|||
            PKG_CONFIG_PATH=./ffi/pfx/lib/pkgconfig
 | 
			
		||||
            MACOSX_DEPLOYMENT_TARGET=11
 | 
			
		||||
            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
 | 
			
		||||
        with:
 | 
			
		||||
          path: ./dist/*.whl
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -24,7 +24,7 @@ import subprocess
 | 
			
		|||
__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()
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -11,11 +11,13 @@ if command -v apk &> /dev/null; then
 | 
			
		|||
    apk add flex bison
 | 
			
		||||
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)
 | 
			
		||||
cd ffi
 | 
			
		||||
SHELL=bash CFLAGS=-fPIC CXXFLAGS=-fPIC ./configure --prefix=$PWD/pfx
 | 
			
		||||
 | 
			
		||||
make install -j$(getconf _NPROCESSORS_ONLN 2>/dev/null || sysctl -n hw.ncpu)
 | 
			
		||||
## Ultimate libyosys.so will be shared, so we need fPIC for the static libraries
 | 
			
		||||
CFLAGS=-fPIC CXXFLAGS=-fPIC ./configure --prefix=$PWD/pfx
 | 
			
		||||
## 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
 | 
			
		||||
| 
						 | 
				
			
			@ -1,6 +1,13 @@
 | 
			
		|||
set -e
 | 
			
		||||
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
 | 
			
		||||
cd ./boost
 | 
			
		||||
## Delete the artefacts from previous builds (if any)
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue