Skip to content

Commit

Permalink
Merge pull request #9 from casacore/casacore-3.5.0
Browse files Browse the repository at this point in the history
Build casacore 3.5.0 on macOS
  • Loading branch information
ludwigschwardt committed Jun 20, 2024
2 parents f76339c + 7ddba91 commit fbb442b
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 32 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
name: brew pr-pull

on:
pull_request_target:
types:
- labeled

jobs:
pr-pull:
if: contains(github.event.pull_request.labels.*.name, 'pr-pull')
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
permissions:
contents: write
pull-requests: write
steps:
- name: Set up Homebrew
uses: Homebrew/actions/setup-homebrew@master
Expand All @@ -18,16 +23,16 @@ jobs:
env:
HOMEBREW_GITHUB_API_TOKEN: ${{ github.token }}
PULL_REQUEST: ${{ github.event.pull_request.number }}
run: brew pr-pull --debug --tap=$GITHUB_REPOSITORY $PULL_REQUEST
run: brew pr-pull --debug --tap="$GITHUB_REPOSITORY" "$PULL_REQUEST"

- name: Push commits
uses: Homebrew/actions/git-try-push@master
with:
token: ${{ github.token }}
branch: main
branch: master

- name: Delete branch
if: github.event.pull_request.head.repo.fork == false
env:
BRANCH: ${{ github.event.pull_request.head.ref }}
run: git push --delete origin $BRANCH
run: git push --delete origin "$BRANCH"
18 changes: 8 additions & 10 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,29 @@
name: brew test-bot

on:
push:
branches: main
branches:
- master
pull_request:

jobs:
test-bot:
strategy:
matrix:
os: [ubuntu-latest, macOS-latest]
os: [ubuntu-22.04, macos-13, macos-14]
runs-on: ${{ matrix.os }}
steps:
- name: Set up Homebrew
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master

- name: Cache Homebrew Bundler RubyGems
id: cache
uses: actions/cache@v1
uses: actions/cache@v4
with:
path: ${{ steps.set-up-homebrew.outputs.gems-path }}
key: ${{ runner.os }}-rubygems-${{ steps.set-up-homebrew.outputs.gems-hash }}
restore-keys: ${{ runner.os }}-rubygems-

- name: Install Homebrew Bundler RubyGems
if: steps.cache.outputs.cache-hit != 'true'
run: brew install-bundler-gems

- run: brew test-bot --only-cleanup-before

- run: brew test-bot --only-setup
Expand All @@ -37,7 +35,7 @@ jobs:

- name: Upload bottles as artifact
if: always() && github.event_name == 'pull_request'
uses: actions/upload-artifact@main
uses: actions/upload-artifact@v4
with:
name: bottles
name: bottles_${{ matrix.os }}
path: '*.bottle.*'
4 changes: 2 additions & 2 deletions Formula/casacore-data.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ def stage(&block)
class CasacoreData < Formula
desc "Ephemerides and geodetic data for casacore measures (via Astron)"
homepage "https://github.com/casacore/casacore"
url "ftp://ftp.astron.nl/outgoing/Measures/WSRT_Measures_20240325-160001.ztar", using: ZtarDownloadStrategy
sha256 "8cd94f300bba7c6776211b579ca88fea1be131c063850d9a9cf9234b8d709ab2"
url "ftp://ftp.astron.nl/outgoing/Measures/WSRT_Measures_20240611-160001.ztar", using: ZtarDownloadStrategy
sha256 "2241bae966986bb7914d589084fb69e4844ef5813d7189eb414370e0583f67d2"
head "ftp://ftp.astron.nl/outgoing/Measures/WSRT_Measures.ztar", using: ZtarDownloadStrategy

option "with-casapy", "Use Mac CASA.App (aka casapy) data directory if found"
Expand Down
33 changes: 17 additions & 16 deletions Formula/casacore.rb
Original file line number Diff line number Diff line change
@@ -1,21 +1,24 @@
class Casacore < Formula
desc "Suite of C++ libraries for radio astronomy data processing"
homepage "https://github.com/casacore/casacore"
url "https://github.com/casacore/casacore/archive/refs/tags/v3.4.0.tar.gz"
sha256 "31f02ad2e26f29bab4a47a2a69e049d7bc511084a0b8263360e6157356f92ae1"
url "https://github.com/casacore/casacore/archive/refs/tags/v3.5.0.tar.gz"
sha256 "63f1c8eff932b0fcbd38c598a5811e6e5397b72835b637d6f426105a183b3f91"
head "https://github.com/casacore/casacore.git"

option "with-python", "Build Python bindings"
option "without-python", "Build without Python bindings"

depends_on "cmake" => :build
depends_on "casacore-data"
depends_on "cfitsio"
depends_on "fftw"
depends_on "gcc" # for gfortran
depends_on "gsl"
depends_on "hdf5"
depends_on "readline"
depends_on "wcslib"

# Apply patches at the end of the formula, in the following order:
# 1. casacore/casacore#1350 (should be in next release after 3.5.0)
patch :DATA

if build.with?("python")
Expand All @@ -33,7 +36,6 @@ def install
cmake_args = std_cmake_args
cmake_args.delete "-DCMAKE_BUILD_TYPE=None"
cmake_args << "-DCMAKE_BUILD_TYPE=#{build_type}"
cmake_args << "-DBUILD_PYTHON=OFF"
cmake_args << "-DBUILD_PYTHON3=#{build.with?("python") ? "ON" : "OFF"}"
cmake_args << "-DUSE_OPENMP=OFF"
cmake_args << "-DUSE_FFTW3=ON" << "-DFFTW3_ROOT_DIR=#{HOMEBREW_PREFIX}"
Expand All @@ -52,15 +54,14 @@ def install
end

__END__
diff --git a/python/Converters/test/CMakeLists.txt b/python/Converters/test/CMakeLists.txt
index 32214a8..321c98b 100644
--- a/python/Converters/test/CMakeLists.txt
+++ b/python/Converters/test/CMakeLists.txt
@@ -1,6 +1,6 @@
include_directories ("..")
add_library(tConvert MODULE tConvert.cc)
SET_TARGET_PROPERTIES(tConvert PROPERTIES PREFIX "_")
-target_link_libraries (tConvert casa_python ${PYTHON_LIBRARIES})
+target_link_libraries (tConvert casa_python)
add_test (tConvert ${CMAKE_SOURCE_DIR}/cmake/cmake_assay ./tConvert)
add_dependencies(check tConvert)
diff --git a/tables/Dysco/tests/testdyscostman.cc b/tables/Dysco/tests/testdyscostman.cc
index 69da97c..ae52c03 100644
--- a/tables/Dysco/tests/testdyscostman.cc
+++ b/tables/Dysco/tests/testdyscostman.cc
@@ -1,5 +1,6 @@
#include <boost/test/unit_test.hpp>
#include <boost/filesystem/operations.hpp>
+#include <boost/filesystem/directory.hpp>

#include <casacore/tables/Tables/ArrayColumn.h>
#include <casacore/tables/Tables/Table.h>
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,21 @@

Or `brew tap casacore/tap` and then `brew install <formula>`.

Or, in a [`brew bundle`](https://github.com/Homebrew/homebrew-bundle) `Brewfile`:

```ruby
tap "test/tap"
brew "<formula>"
```

## Documentation
`brew help`, `man brew` or check [Homebrew's documentation](https://docs.brew.sh).

## History

This used to reside in https://github.com/ska-sa/homebrew-tap.

To access those older commits when you run `git log`, `git blame` and
other commands on your local clone, do

`git fetch origin '+refs/replace/*:refs/replace/*'`

0 comments on commit fbb442b

Please sign in to comment.