From 3ee427ea92b0864e1bfca6c0c1a374392e8d8e01 Mon Sep 17 00:00:00 2001 From: Andreas Holm <60451789+holm10@users.noreply.github.com> Date: Tue, 12 Mar 2024 15:12:11 -0700 Subject: [PATCH] Parallelizes python version --- .github/workflows/build-test-wheel.yml | 112 ++----------------------- 1 file changed, 7 insertions(+), 105 deletions(-) diff --git a/.github/workflows/build-test-wheel.yml b/.github/workflows/build-test-wheel.yml index f8a571c7..126e64cf 100644 --- a/.github/workflows/build-test-wheel.yml +++ b/.github/workflows/build-test-wheel.yml @@ -49,22 +49,12 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, macos-13, macos-14] #, macos-12, ubuntu-20.04] -# pyversions: ['3.11'] #, '3.10', '3.9', '3.8', '3.7',] + os: [ubuntu-latest, macos-13, macos-14] + pyver: [cp37, cp38, cp39, cp310, cp311, cp312] steps: - - uses: actions/checkout@v4 - - # - uses: actions/setup-python@v5 - # with: - # python-version: ${{ matrix.pyversions }} -# - name: Install pip dependencies -# run: | -# python -m pip install --upgrade pip -# python -m pip install forthon mppl numpy h5py -# python -m pip install flake8 -# python -m pip install pytest-isolate pytest-xdist -# pip install 'build<0.10.0' + - name: Checks out repo + uses: actions/checkout@v4 - name: Symlink gfortran for x86 macOS if: matrix.os == 'macos-13' @@ -81,10 +71,12 @@ jobs: ln -s /opt/homebrew/bin/gfortran-13 /opt/homebrew/bin/gfortran gfortran --version - - name: Build wheels uses: pypa/cibuildwheel@v2.17.0 env: + CIBW_BUILD: ${{matrix.pyver}}-* + CIBW_ARCHS_LINUX: auto + CIBW_ARCHS_MACOS: auto universal2 CIBW_BEFORE_BUILD: pip install numpy forthon 'build<0.10.0' - uses: actions/upload-artifact@v4 @@ -92,97 +84,7 @@ jobs: name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }} path: ./wheelhouse/*.whl -# - name: Build wheels -# run: python -m build - -# - name: Upload Linux wheels -# uses: actions/upload-artifact@v4 -# with: -# name: ${{ matrix.os }}-${{ matrix.pyversions }} -# path: dist/*.whl - -# - name: Delocate macOS wheels -# if: runner.os == 'macOS' -# run: | -# pip install delocate -# mkdir delocated_wheels -# delocate-wheel -w delocated_wheels dist/*.whl - -# - name: Delocate Linux wheels -# if: runner.os == 'Linux' -# run: | -# pip install auditwheel -# cd dist -# auditwheel repair *.whl - -# - name: Upload maxOS wheels -# if: runner.os == 'macOS' -# uses: actions/upload-artifact@v4 -# with: -# name: ${{ matrix.os }}-${{ matrix.pyversions }} -# path: delocated_wheels/*.whl - -# - name: Upload Linux wheels -# if: runner.os == 'Linux' -# uses: actions/upload-artifact@v4 -# with: -# name: ${{ matrix.os }}-${{ matrix.pyversions }} -# path: wheelhouse/*.whl - - - - build_arm_wheels: - name: Build wheels on ${{ matrix.os }} for Python ${{ matrix.pyversions }} - if: false - runs-on: ${{ matrix.os }} - needs: run-all-tests - strategy: - fail-fast: false - matrix: - os: [macos-14] #, macos-13-arm64] - pyversions: ['3.11', '3.10'] - - steps: - - uses: actions/checkout@v4 - - - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.pyversions }} - - - name: Install pip dependencies - run: | - python -m pip install --upgrade pip - python -m pip install forthon mppl numpy h5py - python -m pip install flake8 - python -m pip install pytest-isolate pytest-xdist - pip install 'build<0.10.0' - - - name: Symlink gfortran for macOS - run: | - # make sure gfortran is available - ln -s /opt/homebrew/bin/gfortran-13 /opt/homebrew/bin/gfortran - gfortran --version - - name: Build wheels - run: python -m build - - - name: Upload maxOS wheels - uses: actions/upload-artifact@v4 - with: - name: ${{ matrix.os }}-${{ matrix.pyversions }} - path: dist/*.whl - -# - name: Delocate macOS wheels -# run: | -# pip install delocate -# mkdir delocated_wheels -# delocate-wheel -w delocated_wheels dist/*.whl - -# - name: Upload maxOS wheels -# uses: actions/upload-artifact@v4 -# with: -# name: ${{ matrix.os }}-${{ matrix.pyversions }} -# path: delocated_wheels/*.whl gather_wheels: