Skip to content

Commit

Permalink
ci: 🎡 update macos runners (#160)
Browse files Browse the repository at this point in the history
  • Loading branch information
darvid committed Oct 11, 2024
1 parent 684b308 commit f23bc01
Show file tree
Hide file tree
Showing 11 changed files with 699 additions and 1,024 deletions.
31 changes: 15 additions & 16 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ jobs:
platform_id: musllinux_x86_64
- os: ubicloud-standard-2-arm
platform_id: manylinux_aarch64
- os: macos-12-xl
- os: macos-15-large
platform_id: macosx_x86_64
- os: flyci-macos-large-latest-m1
- os: macos-15
platform_id: macosx_arm64

steps:
Expand Down Expand Up @@ -192,46 +192,45 @@ jobs:
platform_id: musllinux_aarch64

# 🍎 macOS x86_64
- os: macos-12-xl
- os: macos-15-large
python: "3.9"
python_id: cp39
platform_id: macosx_x86_64
- os: macos-12-xl
- os: macos-15-large
python: "3.10"
python_id: cp310
platform_id: macosx_x86_64
- os: macos-12-xl
- os: macos-15-large
python: "3.11"
python_id: cp311
platform_id: macosx_x86_64
- os: macos-12-xl
- os: macos-15-large
python: "3.12"
python_id: cp312
platform_id: macosx_x86_64
- os: macos-12-xl
- os: macos-15-large
python: "3.13"
python_id: cp313
platform_id: macosx_x86_64

# 🍎 macOS arm64 (Apple silicon)
# XXX: ☠️ https://github.com/actions/setup-python/issues/696
# - os: flyci-macos-large-latest-m1
# python: "3.9"
# python_id: cp39
# platform_id: macosx_arm64
- os: flyci-macos-large-latest-m1
- os: macos-15
python: "3.9"
python_id: cp39
platform_id: macosx_arm64
- os: macos-15
python: "3.10"
python_id: cp310
platform_id: macosx_arm64
- os: flyci-macos-large-latest-m1
- os: macos-15
python: "3.11"
python_id: cp311
platform_id: macosx_arm64
- os: flyci-macos-large-latest-m1
- os: macos-15
python: "3.12"
python_id: cp312
platform_id: macosx_arm64
- os: flyci-macos-large-latest-m1
- os: macos-15
python: "3.13"
python_id: cp313
platform_id: macosx_arm64
Expand Down
3 changes: 3 additions & 0 deletions .mise.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[tools]
python = "3.13.0"
shfmt = "latest"
2 changes: 0 additions & 2 deletions .rtx.toml

This file was deleted.

18 changes: 18 additions & 0 deletions .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"configurations": [
{
"name": "Linux",
"includePath": [
"${workspaceFolder}/**",
"/usr/include/python3.10",
"/usr/include/hs"
],
"defines": [],
"compilerPath": "/usr/bin/gcc",
"cStandard": "c17",
"cppStandard": "gnu++17",
"intelliSenseMode": "linux-gcc-x64"
}
],
"version": 4
}
2 changes: 2 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{
}
37 changes: 23 additions & 14 deletions build_tools/macos/build_hyperscan.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
set -euxo pipefail

HYPERSCAN_GIT_SOURCE=${HYPERSCAN_GIT_SOURCE:-https://github.com/VectorCamp/vectorscan}
HYPERSCAN_GIT_REF=${HYPERSCAN_GIT_REF:-vectorscan/5.4.11}
# HYPERSCAN_GIT_REF=${HYPERSCAN_GIT_REF:-vectorscan/5.4.11}
HYPERSCAN_BUILD_TYPE=${HYPERSCAN_BUILD_TYPE:-MinSizeRel}
PCRE_VERSION=${PCRE_VERSION:-8.45}

Expand All @@ -11,38 +11,47 @@ if pkg-config --validate libhs; then
exit 0
fi

if [ -z "$HYPERSCAN_GIT_REF" ]; then
echo >&2 "HYPERSCAN_GIT_REF must be set"
exit 1
fi
# if [ -z "$HYPERSCAN_GIT_REF" ]; then
# echo >&2 "HYPERSCAN_GIT_REF must be set"
# exit 1
# fi

cd /tmp
git clone -b "${HYPERSCAN_GIT_REF}" ${HYPERSCAN_GIT_SOURCE}
# git clone -b "${HYPERSCAN_GIT_REF}" ${HYPERSCAN_GIT_SOURCE}
git clone ${HYPERSCAN_GIT_SOURCE}
brew install boost cmake git pkg-config ragel wget gnu-tar
cd $(basename ${HYPERSCAN_GIT_SOURCE})
# git checkout "24786ae"

git checkout 5145b6d

export CFLAGS="-fPIC -Wno-error"
export CPPFLAGS="-fPIC -I/usr/local/opt/binutils/include"
export PATH="$(brew --prefix gnu-tar)/bin:$PATH"
nproc=$(sysctl -n hw.logicalcpu)

# build and install PCRE (static required for Chimera)
wget -qO- https://sourceforge.net/projects/pcre/files/pcre/${PCRE_VERSION}/pcre-${PCRE_VERSION}.tar.gz/download | tar xvz
cd "pcre-${PCRE_VERSION}"

export CFLAGS=-fPIC
export CXXFLAGS=-fPIC
mv "pcre-${PCRE_VERSION}" pcre
cd pcre
./configure --prefix=/opt/pcre --enable-unicode-properties --enable-utf
nproc=$(sysctl -n hw.logicalcpu)
make -j${nproc} && sudo make install
cd ..
sed -i -e 's/-Wall -Werror/-Wno-error/g' cmake/*.cmake

# build and install Hyperscan/Vectorscan
cd /tmp/vectorscan
cmake \
-B build \
-S . \
-DEXTRA_C_FLAGS=-Wno-error \
-DEXTRA_CXX_FLAGS=-Wno-error \
-DCMAKE_INSTALL_PREFIX=/opt/vectorscan \
-DBUILD_STATIC_LIBS=ON \
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_BUILD_TYPE=${HYPERSCAN_BUILD_TYPE} \
-DPCRE_SOURCE=/tmp/vectorscan/pcre-${PCRE_VERSION} \
-DFAT_RUNTIME=OFF \
-DPCRE_SOURCE="${PWD}/pcre" \
-DCMAKE_C_FLAGS="$CFLAGS" \
-DCMAKE_CXX_FLAGS="$CXXFLAGS -D_GLIBCXX_USE_CXX11_ABI=0"
-DCMAKE_CXX_FLAGS="$CPPFLAGS -D_GLIBCXX_USE_CXX11_ABI=0"
cmake --build build --parallel ${nproc}
sudo cmake --install build
Loading

0 comments on commit f23bc01

Please sign in to comment.