Skip to content

Commit

Permalink
Update build toolchain to vcpkg 2024.12.15 (#138)
Browse files Browse the repository at this point in the history
  • Loading branch information
sjperkins authored Jan 18, 2025
1 parent e665cc4 commit 07865df
Show file tree
Hide file tree
Showing 9 changed files with 56 additions and 83 deletions.
53 changes: 0 additions & 53 deletions .cirrus.yml

This file was deleted.

4 changes: 2 additions & 2 deletions .env
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
VCPKG_SHA1=43cf47eccfbe27006cf9534a5db809798f8c37fe
VCPKG_SHA256=49eda834c9109f2b99749b541072a75c2c84d0a0250f0c5454419ebcc488581a
VCPKG_SHA1=b322364f06308bdd24823f9d8f03fe0cc86fd46f
VCPKG_SHA256=91202919873e34cba4c84186c50db483d09c9d249cd2257831024f0be4faa34d
27 changes: 22 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: ["ubuntu-22.04", "macos-13", "macos-14"]
os: ["ubuntu-22.04", "macos-13", "macos-14", "ubuntu-22.04-arm"]
# https://peps.python.org/pep-0425
cpython: ["cp310", "cp311", "cp312"]
is_main_or_release:
Expand All @@ -112,14 +112,21 @@ jobs:
arch: "x86_64"
triplet: "x64-linux-dynamic-cxx17-abi1-rel"
extra_build: "manylinux_x86_64"
- os: ubuntu-22.04-arm
os_short: linux
arch: "aarch64"
triplet: "arm64-linux-dynamic-cxx17-abi1-rel"
extra_build: "manylinux_aarch64"
- os: macos-13
os_short: macos
arch: "x86_64"
deployment_target: "13.0"
triplet: "x64-osx-dynamic-cxx17-abi1-rel"
extra_build: "macosx_x86_64"
- os: macos-14
os_short: macos
arch: "arm64"
deployment_target: "14.0"
triplet: "arm64-osx-dynamic-cxx17-abi1-rel"
extra_build: "macosx_arm64"
steps:
Expand All @@ -144,6 +151,7 @@ jobs:
ACTIONS_CACHE_URL=${{ env.ACTIONS_CACHE_URL }}
ACTIONS_RUNTIME_TOKEN=${{ env.ACTIONS_RUNTIME_TOKEN }}
VCPKG_BINARY_SOURCES="clear;x-gha,readwrite"
VCPKG_FORCE_SYSTEM_BINARIES=1
VCPKG_TARGET_TRIPLET=${{ matrix.triplet }}
VCPKG_INSTALLED_DIR=${{ env.VCPKG_INSTALLED_DIR }}
LD_LIBRARY_PATH=${{ env.VCPKG_INSTALLED_DIR }}/${{ matrix.triplet }}/lib
Expand All @@ -155,12 +163,21 @@ jobs:
CIBW_BUILD_FRONTEND: build
CIBW_ARCHS: ${{ matrix.arch }}
CIBW_BEFORE_ALL_LINUX: yum install -y zip flex bison gcc-gfortran
CIBW_BEFORE_ALL_MACOS: brew uninstall --zap gcc
CIBW_BEFORE_ALL_MACOS: |
brew install python llvm
brew reinstall gcc
CIBW_BEFORE_BUILD_MACOS: |
export PATH="/opt/homebrew/opt/llvm/bin:$PATH"
export LDFLAGS="-L/opt/homebrew/opt/llvm/lib"
export CPPFLAGS="-I/opt/homebrew/opt/llvm/include"
CIBW_ENVIRONMENT: ${{ env.CIBW_ENVIRONMENT_COMMON }}
CIBW_ENVIRONMENT_MACOS: >
${{ env.CIBW_ENVIRONMENT_COMMON }}
MACOSX_DEPLOYMENT_TARGET=${{ matrix.deployment_target }}
CIBW_MANYLINUX_X86_64_IMAGE: quay.io/pypa/manylinux_2_28_x86_64
CIBW_MANYLINUX_AARCH64_IMAGE: quay.io/pypa/manylinux_2_28_aarch64
CIBW_TEST_EXTRAS_LINUX: applications,test
CIBW_TEST_COMMAND_LINUX: py.test -s -vvv --pyargs arcae
CIBW_TEST_COMMAND_MACOS: python -c "from arcae.testing import sanity; sanity()"
CIBW_TEST_COMMAND: bash {package}/ci/scripts/run_tests.sh
CIBW_REPAIR_WHEEL_COMMAND_LINUX: >
auditwheel repair
-w {dest_dir} {wheel}
Expand All @@ -175,7 +192,7 @@ jobs:
--exclude libarrow_python.dylib \
--exclude libarrow.1601.dylib \
--ignore-missing-dependencies
run: bash ci/scripts/run_cibuildwheel.sh
uses: pypa/cibuildwheel@v2.22.0

- name: Upload wheel artifacts
uses: actions/upload-artifact@v4
Expand Down
3 changes: 3 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ History

0.2.6 (10-09-2024)
------------------
* Update to vcpkg 2024.12.15 (:pr:`138`)
* Use github arm64 runners (:pr:`138`)
* Constrained mininum MACOSX_DEPLOYMENT_TARGET to 13.0 on Intel x86 and 14.0 on Darwin arm64 (:pr:`138`)
* Disable tmate in continuous integration (:pr:`135`)
* Update to latest cibuildwheel (:pr:`131`, :pr:`133`)
* Use conda forge compilers on MACOSX and update MACOX_DEPLOYMENT_TARGET=12.0 (:pr:`131`, :pr:`133`)
Expand Down
20 changes: 0 additions & 20 deletions ci/scripts/run_cibuildwheel.sh

This file was deleted.

13 changes: 13 additions & 0 deletions ci/scripts/run_tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/ash

OS=$(uname -s)
ARCH=$(uname -m)

if [[ "$OS" == "Linux" && "$ARCH" == "x86_64" ]]; then
# We can only rely on the python-casacore wheels for linux x86
echo "Running complete test suite on $OS $ARCH"
python -m pytest -s -vvv --pyargs arcae
else
echo "Running sanity check test on $OS $ARCH"
python -c "from arcae.testing import sanity; sanity()"
fi
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ dev = [
test = [
"duckdb",
"pytest >= 7.0.0",
"python-casacore >= 3.5.0; sys_platform != 'darwin' and python_version<'3.12'",
"python-casacore >= 3.5.0; sys_platform == 'linux' and platform_machine == 'x86_64' and python_version<'3.14'",
"requests"
]

Expand Down
4 changes: 2 additions & 2 deletions scripts/run_cibuildwheel.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

PYTHON_VERSION="3.8"
PYTHON_VERSION="3.10"

function usage {
echo ""
Expand Down Expand Up @@ -61,7 +61,7 @@ export CIBW_REPAIR_WHEEL_COMMAND_LINUX="auditwheel repair -w {dest_dir} {wheel}
# $ docker run -it --rm cibw-debug /bin/bash
export CIBW_TEST_SKIP="*"
export CIBW_TEST_EXTRAS=
export CIBW_TEST_COMMAND="python -c 'from arcae.lib.arrow_tables import Table'"
export CIBW_TEST_COMMAND=bash {package}/ci/scripts/run_tests.sh
export CIBW_VERBOSITY=3

echo "Creating VCPKG Binary Cache in $VCPKG_HOST_BINARY_CACHE"
Expand Down
13 changes: 13 additions & 0 deletions vcpkg/overlay-ports/casacore/001-casacore-cmake.patch
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,19 @@ index f9447d9c6..80a17be99 100644
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib${LIB_SUFFIX}
ARCHIVE DESTINATION lib${LIB_SUFFIX}
diff --git a/casa/Exceptions/Error.h b/casa/Exceptions/Error.h
index 12229f902..a15e5080b 100644
--- a/casa/Exceptions/Error.h
+++ b/casa/Exceptions/Error.h
@@ -91,7 +91,7 @@ namespace casacore { //# NAMESPACE CASACORE - BEGIN
#define ThrowIfError(c,m) {if (AIPS_UNLIKELY(c)) {casacore::AipsError::throwIfError (casacore::True, (m), __FILE__, __LINE__, __PRETTY_FUNCTION__);}}

// Repackage and rethrow an AipsError exception.
-#define Rethrow(e,m) {throw casacore::AipsError::repackageAipsError ((e),(m),__FILE__,__LINE__, __PRETTY_FUNCTION__);}
+// #define Rethrow(e,m) {throw casacore::AipsError::repackageAipsError ((e),(m),__FILE__,__LINE__, __PRETTY_FUNCTION__);}


// <summary>Base class for all Casacore library errors</summary>
diff --git a/casa/Json/JsonOut.h b/casa/Json/JsonOut.h
index b5229c57d..66596d273 100644
--- a/casa/Json/JsonOut.h
Expand Down

0 comments on commit 07865df

Please sign in to comment.