Skip to content

Commit

Permalink
Update cibuildwheel to 2.19.2 and ci pipeline (#52)
Browse files Browse the repository at this point in the history
* Update cibuildwheel to 2.19.2.

* update.

* upddate.

* update.
  • Loading branch information
B1ueber2y authored Aug 1, 2024
1 parent f56d0fb commit 5dab798
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 10 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,14 @@ jobs:
matrix:
config: [
{os: ubuntu-latest},
{os: macos-13, arch: x86_64},
{os: macos-13, arch: arm64},
{os: macos-14, arch: x86_64},
{os: macos-14, arch: arm64},
{os: windows-latest},
]
env:
COMPILER_CACHE_VERSION: 1
COMPILER_CACHE_DIR: ${{ github.workspace }}/compiler-cache
MACOSX_DEPLOYMENT_TARGET: 10.12
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
Expand All @@ -37,7 +38,7 @@ jobs:
if: runner.os == 'macOS'
run: |
if [[ ${{ matrix.config.arch }} == "x86_64" ]]; then
VCPKG_TARGET_TRIPLET="x64-osx"
VCPKG_TARGET_TRIPLET="x64-osx-release"
elif [[ ${{ matrix.config.arch }} == "arm64" ]]; then
VCPKG_TARGET_TRIPLET="arm64-osx-release"
else
Expand Down Expand Up @@ -85,7 +86,7 @@ jobs:
$VCPKG_CACHE_DIR = "${env:COMPILER_CACHE_DIR}/vcpkg"
$VCPKG_BINARY_SOURCES = "clear;files,${VCPKG_CACHE_DIR},readwrite"
echo "VCPKG_BINARY_SOURCES=${VCPKG_BINARY_SOURCES}" >> "${env:GITHUB_ENV}"
- name: Set env (Ubuntu)
- name: Set env (Linux)
if: runner.os == 'Linux'
run: |
VCPKG_TARGET_TRIPLET="x64-linux-release"
Expand Down Expand Up @@ -114,8 +115,11 @@ jobs:
CIBW_ENVIRONMENT_PASS_LINUX="VCPKG_TARGET_TRIPLET VCPKG_INSTALLATION_ROOT CMAKE_TOOLCHAIN_FILE VCPKG_BINARY_SOURCES CONTAINER_COMPILER_CACHE_DIR"
echo "CIBW_ENVIRONMENT_PASS_LINUX=${CIBW_ENVIRONMENT_PASS_LINUX}" >> "$GITHUB_ENV"
CIBW_MANYLINUX_X86_64_IMAGE="quay.io/pypa/manylinux_2_28_x86_64"
echo "CIBW_MANYLINUX_X86_64_IMAGE=${CIBW_MANYLINUX_X86_64_IMAGE}" >> "$GITHUB_ENV"
- name: Build wheels
uses: pypa/cibuildwheel@v2.16.5
uses: pypa/cibuildwheel@v2.19.2
env:
CIBW_ARCHS_MACOS: ${{ matrix.config.arch }}
- name: Archive wheels
Expand Down
16 changes: 15 additions & 1 deletion ci/install-ceres-centos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,21 @@ set -e -x
uname -a
CURRDIR=$(pwd)

yum install -y gcc gcc-c++ ninja-build curl zip unzip tar
export PATH="/usr/bin"

# Install toolchain under AlmaLinux 8,
# see https://almalinux.pkgs.org/8/almalinux-appstream-x86_64/
yum install -y \
gcc \
gcc-c++ \
gcc-gfortran \
git \
cmake3 \
ninja-build \
curl \
zip \
unzip \
tar

DEPENDENCIES=$(cat ${CURRDIR}/ci/vcpkg-dependencies.txt)
git clone https://github.com/microsoft/vcpkg ${VCPKG_INSTALLATION_ROOT}
Expand Down
4 changes: 2 additions & 2 deletions ci/install-ceres-macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ set -x -e
CURRDIR=$(pwd)

brew update
brew install git cmake ninja llvm
brew install git cmake ninja llvm gfortran

# When building lapack-reference, vcpkg/cmake looks for gfortran.
ln -s $(which gfortran-13) "$(dirname $(which gfortran-13))/gfortran"
ln -sf $(which gfortran-14) "$(dirname $(which gfortran-14))/gfortran"

DEPENDENCIES=$(cat ${CURRDIR}/ci/vcpkg-dependencies.txt)
git clone https://github.com/microsoft/vcpkg ${VCPKG_INSTALLATION_ROOT}
Expand Down
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
requires = ["scikit-build-core>=0.3.3", "pybind11==2.11.1"]
build-backend = "scikit_build_core.build"


[project]
name = "pyceres"
version = "2.2"
Expand All @@ -27,7 +26,7 @@ archs = ["auto64"]
test-command = "python -c \"import pyceres; print(pyceres.__version__)\""

[tool.cibuildwheel.environment]
VCPKG_COMMIT_ID = "fa6e6a6ec3224f1d3697d544edef6272a59cd834"
VCPKG_COMMIT_ID = "e01906b2ba7e645a76ee021a19de616edc98d29f"

[tool.cibuildwheel.linux]
before-all = "{package}/ci/install-ceres-centos.sh"
Expand Down

0 comments on commit 5dab798

Please sign in to comment.