diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 4cec58e..24fc751 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -23,8 +23,8 @@ jobs: - py3_casacore_v3.4 steps: - name: Checkout - uses: actions/checkout@v2 - + uses: actions/checkout@v3 + - name: Build container run: docker build . -t ${{ matrix.dist }} -f .github/workflows/${{ matrix.dist }}.docker diff --git a/.github/workflows/osx.yml b/.github/workflows/osx.yml index 21b3783..2fc47ed 100644 --- a/.github/workflows/osx.yml +++ b/.github/workflows/osx.yml @@ -14,11 +14,11 @@ jobs: steps: - name: checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: install homebrew packages run: | - brew tap casacore/tap + brew tap casacore/tap brew install casacore --with-python - name: make virtualenv @@ -40,6 +40,6 @@ jobs: run: venv/bin/delocate-wheel -v dist/*.whl - name: Publish OS X binary wheels - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: path: dist/*.whl diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml new file mode 100644 index 0000000..1ace0da --- /dev/null +++ b/.github/workflows/wheels.yml @@ -0,0 +1,57 @@ +name: Build wheels + +on: + # Just testing for now, and the dispatch on works on master branch... + push: + branches: [ cibuildwheel ] + workflow_dispatch: + +env: + # Just build for the latest Homebrew Python on macOS + CIBW_BUILD: cp311-macosx* + # Install HEAD version of casacore-data because we don't need exact version + # when compiling python-casacore. This avoids failure if it's not up to date. + # The pip install is a workaround (see https://issues.apache.org/jira/browse/ARROW-11151). + CIBW_BEFORE_ALL_MACOS: > + brew tap casacore/tap && + brew install casacore-data --HEAD && + pip3 install numpy && + brew install casacore --with-python + # Support both Apple architectures natively + CIBW_ARCHS_MACOS: "x86_64 arm64" + # XXX (but don't test Apple Silicon yet - we first need some M1 runners - Q4 2023?) + CIBW_TEST_SKIP: "*-macosx_arm64" + +jobs: + make_sdist: + name: Build SDist + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Build SDist + run: pipx run build --sdist + + - uses: actions/upload-artifact@v3 + with: + name: sdist + path: dist/*.tar.gz + + build_wheels: + name: Build wheels on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [macos-latest] + steps: + - uses: actions/checkout@v3 + + - name: Build wheels + uses: pypa/cibuildwheel@v2.15.0 + + - name: Upload wheels + uses: actions/upload-artifact@v3 + with: + name: wheels + path: ./wheelhouse/*.whl