Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 22 additions & 8 deletions .github/workflows/macos-build+deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,29 +17,39 @@ jobs:
fail-fast: false
matrix:
include:
- { version: ventura, arch: x86_64, runner: macos-13, jobs: 4, prefix: /usr/local, CXXFLAGS="-O2 -g -march=x86-64 -fPIC -DPIC" }
- { version: sonoma, arch: arm64, runner: macos-14, jobs: 3, prefix: /opt/homebrew, CXXFLAGS="-O2 -g -march=armv8.5a -fPIC -DPIC" }
- { version: arm64, arch: arm64, runner: macos-15, jobs: 3, prefix: /opt/homebrew, cxxflags: "-O2 -g -march=armv8.5a -fPIC -DPIC", deployment_target: "14.0" }
runs-on: ${{ matrix.runner }}
env:
JOBS: ${{ matrix.jobs }}
DESTDIR: /tmp/DESTDIR
OUTPUTDIR: /tmp/OUTPUT
PREFIX: ${{ matrix.prefix }}
PYTHON_VERSIONS: "3.9 3.10 3.11 3.12"
PYTHON_VERSIONS: "3.12 3.13 3.14"
CFLAGS: ${{ matrix.cxxflags }}
CXXFLAGS: ${{ matrix.cxxflags }}
MACOSX_DEPLOYMENT_TARGET: ${{ matrix.deployment_target }}
permissions:
contents: read
packages: write
steps:
-
name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v7
-
name: Install build dependencies and workflow dependencies
shell: bash
run: |
brew install \
autoconf automake cmake gnu-sed libtool m4 make pkg-config \
cmake gnu-sed make pkg-config \
oras
-
name: Set up Python (for libboost_python)
uses: actions/setup-python@v7
with:
python-version: |
3.12
3.13
3.14
-
name: Create directories
shell: bash
Expand All @@ -54,6 +64,10 @@ jobs:
name: Build GSL
shell: bash
run: ./macos/${{ matrix.version }}/build-gsl.bash
-
name: Build FFTW3
shell: bash
run: ./macos/${{ matrix.version }}/build-fftw3.bash
-
name: Build Boost
shell: bash
Expand All @@ -63,14 +77,14 @@ jobs:
shell: bash
run: |
cd ${DESTDIR}
tar zcf ${OUTPUTDIR}/${{ matrix.version }}-${{ matrix.arch }}.tar.gz *
tar zcf ${OUTPUTDIR}/macos-${{ matrix.version }}.tar.gz *
-
name: Push tarball to ghcr.io
shell: bash
run: |
oras login --username "${{ github.actor }}" --password "${{ secrets.GITHUB_TOKEN }}" ghcr.io
cd ${OUTPUTDIR}
oras push \
ghcr.io/eos/docker.io:${{ matrix.version }}-${{ matrix.arch }}-${GITHUB_SHA::7} \
ghcr.io/eos/docker.io:macos-${{ matrix.version }}-${GITHUB_SHA::7} \
-a "org.opencontainers.image.source=https://github.com/eos/docker.io" \
${{ matrix.version }}-${{ matrix.arch}}.tar.gz
macos-${{ matrix.version }}.tar.gz
24 changes: 12 additions & 12 deletions .github/workflows/manylinux_2_34-build+deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,32 +23,32 @@ jobs:
steps:
-
name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v7
-
name: Docker meta
id: meta
uses: docker/metadata-action@v5
uses: docker/metadata-action@v6
with:
images: eoshep/manylinux_2_34
tags: |
type=raw,value={{date 'YYYY-MM-DD'}}-{{sha}}
type=raw,value=latest
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v4
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v4
-
name: Login to DockerHub
uses: docker/login-action@v2
uses: docker/login-action@v4
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
id: build
uses: docker/build-push-action@v3
uses: docker/build-push-action@v7
with:
push: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
context: manylinux_2_34/${{ matrix.arch }}
Expand All @@ -63,7 +63,7 @@ jobs:
touch "/tmp/digests/${digest#sha256:}"
-
name: Upload digest
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: digest-${{ matrix.arch }}
path: /tmp/digests/*
Expand All @@ -77,26 +77,26 @@ jobs:
steps:
-
name: Download digests
uses: actions/download-artifact@v4
uses: actions/download-artifact@v8
with:
pattern: digest-*
path: /tmp/digests
merge-multiple: true
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@v4
-
name: Docker meta
id: meta
uses: docker/metadata-action@v5
uses: docker/metadata-action@v6
with:
images: eoshep/manylinux_2_34
tags: |
type=raw,value={{date 'YYYY-MM-DD'}}-{{sha}}
type=raw,value=latest
-
name: Login to Docker Hub
uses: docker/login-action@v3
uses: docker/login-action@v4
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
Expand All @@ -109,4 +109,4 @@ jobs:
-
name: Inspect image
run: |
docker buildx imagetools inspect eoshep/manylinux_2_34:${{ steps.meta.outputs.version }}
docker buildx imagetools inspect eoshep/manylinux_2_34:${{ steps.meta.outputs.version }}
51 changes: 51 additions & 0 deletions macos/arm64/build-boost.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
set -eo pipefail
set -x

mkdir -p /tmp/boost
pushd /tmp/boost


echo Download the tarball
curl -L -O https://archives.boost.io/release/1.90.0/source/boost_1_90_0.tar.gz

echo Untar
tar zxf boost_1_90_0.tar.gz

echo Build Boost
pushd boost_1_90_0
gsed -i -e '/^#include <boost\/phoenix\/stl\/tuple\.hpp/d' boost/phoenix/stl.hpp
echo "Build Boost (Python-independent parts)"
./bootstrap.sh --prefix=$PREFIX --with-libraries=filesystem,math,system
./b2 install link=shared threading=single cxxflags="${CXXFLAGS}" --prefix=${DESTDIR}/${PREFIX} -j ${JOBS}
for pyver in ${PYTHON_VERSIONS} ; do
echo "Build Boost (libboost_python${pyver/./})"
# Use the runner's own CPython (installed by actions/setup-python from its
# pre-cached tool versions), not a Homebrew-installed Python: it is already
# present, so building/fetching one via Homebrew is pure waste. Query the
# interpreter itself for its layout instead of assuming a particular
# installation's directory structure (Homebrew's framework layout differs
# from the toolcache's).
export PYTHON=$(command -v python${pyver})
pyinc=$(${PYTHON} -c "import sysconfig; print(sysconfig.get_paths()['include'])")
pylib=$(${PYTHON} -c "import sysconfig; print(sysconfig.get_config_var('LIBDIR'))")
cat > user-config.jam <<EOF
using darwin : : clang++ ;
using python : ${pyver}
: ${PYTHON}
: ${pyinc}
: ${pylib} ;
EOF
gsed -i -e 's/using python/#using python/' ./bootstrap.sh
./bootstrap.sh --with-python=$PYTHON --with-libraries=python
./b2 install \
link=shared threading=single \
cxxflags=-std=c++14 \
cxxflags=-stdlib=libc++ \
cxxflags="${CXXFLAGS}" \
linkflags=-stdlib=libc++ \
--user-config=user-config.jam \
--prefix=${DESTDIR}/${PREFIX} \
-j ${JOBS}
done
popd
popd
19 changes: 19 additions & 0 deletions macos/arm64/build-fftw3.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
set -eo pipefail
set -x

mkdir -p /tmp/fftw
pushd /tmp/fftw

echo Download the tarball
curl -L -O https://www.fftw.org/fftw-3.3.10.tar.gz

echo Untar
tar zxf fftw-3.3.10.tar.gz

pushd fftw-3.3.10
echo Build FFTW3
./configure --prefix=$PREFIX --enable-shared
make -j${JOBS}
make install DESTDIR=$DESTDIR
popd
popd
19 changes: 19 additions & 0 deletions macos/arm64/build-gsl.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
set -eo pipefail
set -x

mkdir -p /tmp/gsl/build
pushd /tmp/gsl

echo Download the tarball
curl -L -O https://ftp.gnu.org/gnu/gsl/gsl-2.8.tar.gz

echo Untar
tar zxf gsl-2.8.tar.gz

pushd build
echo Build GSL
../gsl-2.8/configure --prefix=$PREFIX LDFLAGS="-Wl,-not_for_dyld_shared_cache"
make -j${JOBS}
make install DESTDIR=$DESTDIR
popd
popd
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
set -eo pipefail
set -x

mkdir -p /tmp/yaml/build
pushd /tmp/yaml

echo Download the tarball
curl -L -O https://github.com/jbeder/yaml-cpp/archive/refs/tags/0.8.0.tar.gz
curl -L -O https://github.com/jbeder/yaml-cpp/archive/refs/tags/yaml-cpp-0.9.0.tar.gz

echo Untar
tar zxf 0.8.0.tar.gz
tar zxf yaml-cpp-0.9.0.tar.gz

echo Build yaml-cpp
pushd build
cmake -DCMAKE_INSTALL_PREFIX:PATH=$PREFIX -DBUILD_SHARED_LIBS=on ../yaml-cpp-0.8.0
cmake -DCMAKE_INSTALL_PREFIX:PATH=$PREFIX -DBUILD_SHARED_LIBS=on -DCMAKE_POLICY_VERSION_MINIMUM=3.5 ../yaml-cpp-yaml-cpp-0.9.0
make -j${JOBS}
make install DESTDIR=$DESTDIR
popd
popd
popd
43 changes: 0 additions & 43 deletions macos/sonoma/build-boost.bash

This file was deleted.

18 changes: 0 additions & 18 deletions macos/sonoma/build-gsl.bash

This file was deleted.

43 changes: 0 additions & 43 deletions macos/ventura/build-boost.bash

This file was deleted.

Loading
Loading