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 79bb11b
Show file tree
Hide file tree
Showing 10 changed files with 678 additions and 994 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
}
26 changes: 14 additions & 12 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,37 +11,39 @@ 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}
brew install boost cmake git pkg-config ragel wget gnu-tar
# git clone -b "${HYPERSCAN_GIT_REF}" ${HYPERSCAN_GIT_SOURCE}
git clone ${HYPERSCAN_GIT_SOURCE}
brew install binutils boost cmake git pkg-config ragel wget gnu-tar
cd $(basename ${HYPERSCAN_GIT_SOURCE})
# git checkout "24786ae"

git checkout 5145b6d

export PATH="$(brew --prefix gnu-tar)/bin:$PATH"
# 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}"
mv "pcre-${PCRE_VERSION}" pcre

export CFLAGS=-fPIC
export CXXFLAGS=-fPIC
./configure --prefix=/opt/pcre --enable-unicode-properties --enable-utf
nproc=$(sysctl -n hw.logicalcpu)
make -j${nproc} && sudo make install

# build and install Hyperscan/Vectorscan
cd /tmp/vectorscan
cmake \
-B build \
-S . \
-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"
cmake --build build --parallel ${nproc}
Expand Down
Loading

0 comments on commit 79bb11b

Please sign in to comment.