diff --git a/.editorconfig b/.editorconfig index f5444d81a74..572b73bd2ed 100644 --- a/.editorconfig +++ b/.editorconfig @@ -10,3 +10,7 @@ insert_final_newline = true indent_style = space indent_size = 2 trim_trailing_whitespace = false + +[*.yml] +indent_style = space +indent_size = 2 diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index a91c873fbc3..c6132685b5d 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -1,8 +1,7 @@ name: Build Wheels for PyPI on: workflow_dispatch: - push: - # tags: ["yosys-*"] + jobs: build_wheels: strategy: @@ -37,24 +36,27 @@ jobs: runner: "macos-14", archs: "arm64", }, - { - name: "Windows Server 2019", - family: "windows", - runner: "windows-2019", - archs: "AMD64", - }, + ## Windows is disabled because of an issue with compiling FFI as + ## under MinGW in the GitHub Actions environment (SHELL variable has + ## whitespace.) + # { + # name: "Windows Server 2019", + # family: "windows", + # runner: "windows-2019", + # archs: "AMD64", + # }, ] name: Build Wheels | ${{ matrix.os.name }} | ${{ matrix.os.archs }} runs-on: ${{ matrix.os.runner }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 submodules: true - if: ${{ matrix.os.family == 'linux' }} name: "[Linux] Set up QEMU" - uses: docker/setup-qemu-action@v2 - - uses: actions/setup-python@v3 + uses: docker/setup-qemu-action@v3 + - uses: actions/setup-python@v5 - name: Get Boost Source shell: bash run: | @@ -73,7 +75,7 @@ jobs: brew install flex bison echo "PATH=$(brew --prefix flex)/bin:$PATH" >> $GITHUB_ENV echo "PATH=$(brew --prefix bison)/bin:$PATH" >> $GITHUB_ENV - - if : ${{ matrix.os.family == 'windows' }} + - if: ${{ matrix.os.family == 'windows' }} name: "[Windows] Flex/Bison" run: | choco install winflexbison3 @@ -86,7 +88,7 @@ jobs: uses: pypa/cibuildwheel@v2.21.1 env: # * APIs not supported by PyPy - # * Musllinux temporarily disabled because it takes too much time + # * Musllinux disabled because it increases build time from 48m to ~3h CIBW_SKIP: > pp* *musllinux* @@ -109,6 +111,25 @@ jobs: makeFlags='BOOST_PYTHON_LIB=./boost/pfx/lib/libboost_python*.a CONFIG=clang' 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@v4 with: + name: python-wheels path: ./wheelhouse/*.whl + upload_wheels: + name: Upload Wheels + runs-on: ubuntu-latest + needs: build_wheels + steps: + - uses: actions/download-artifact@v4 + with: + name: python-wheels + path: "." + - run: | + ls + mkdir -p ./dist + mv *.whl ./dist + - name: Publish + uses: pypa/gh-action-pypi-publish@release/v1 + with: + password: ${{ secrets.PYPI_TOKEN }} + repository-url: ${{ vars.PYPI_INDEX || 'https://upload.pypi.org/legacy/' }} diff --git a/setup.py b/setup.py index 02e6e5843de..f9d455f0bbf 100644 --- a/setup.py +++ b/setup.py @@ -25,7 +25,7 @@ version = yosys_version_rx.search( open(os.path.join(__dir__, "Makefile"), encoding="utf8").read() -)[1] +)[1].replace("+", ".post") class libyosys_so_ext(Extension):