From ea627bde1362588efcac4e43b343f870eb2dbb65 Mon Sep 17 00:00:00 2001 From: zhangjianfei Date: Fri, 15 Aug 2025 11:05:03 +0800 Subject: [PATCH 1/3] ci: add macos-14 to GitHub Actions matrix Add macos-14 runner to all workflow files that use matrix.os configuration: - bazel.yml - cmake.yml - nodejs.yml - python.yml - release-pypi.yml This ensures compatibility testing on the new M1 macOS runners. Reference: https://github.blog/changelog/2024-01-30-github-actions-introducing-the-new-m1-macos-runner-available-to-open-source/ --- .github/workflows/bazel.yml | 2 +- .github/workflows/cmake.yml | 2 +- .github/workflows/nodejs.yml | 2 +- .github/workflows/python.yml | 2 +- .github/workflows/release-pypi.yml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/bazel.yml b/.github/workflows/bazel.yml index 537167599..f3aa450d5 100644 --- a/.github/workflows/bazel.yml +++ b/.github/workflows/bazel.yml @@ -11,7 +11,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-latest, macos-latest] + os: [ubuntu-latest, macos-latest, macos-14] steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 51a0935d4..32a2f2b45 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -11,7 +11,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-latest, macos-latest] + os: [ubuntu-latest, macos-latest, macos-14] steps: - uses: actions/checkout@v4 - name: make build diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index b8b1c9f37..23fe7bc9e 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -13,7 +13,7 @@ jobs: strategy: matrix: node-version: [20.x, 22.x, latest] - os: [ubuntu-latest, macos-latest] + os: [ubuntu-latest, macos-latest, macos-14] steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 7ace094d0..7e32d0a08 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -38,7 +38,7 @@ jobs: test-pypi: strategy: matrix: - os: [ubuntu-latest, macos-latest, windows-latest] + os: [ubuntu-latest, macos-latest, macos-14, windows-latest] runs-on: ${{ matrix.os }} steps: diff --git a/.github/workflows/release-pypi.yml b/.github/workflows/release-pypi.yml index a422454b9..c95894776 100644 --- a/.github/workflows/release-pypi.yml +++ b/.github/workflows/release-pypi.yml @@ -7,7 +7,7 @@ jobs: release-pypi: strategy: matrix: - os: [ubuntu-latest, macos-latest, windows-latest] + os: [ubuntu-latest, macos-latest, macos-14, windows-latest] runs-on: ${{ matrix.os }} steps: From a51644e76656fb55ff6421aeded06537445670c9 Mon Sep 17 00:00:00 2001 From: zhangjianfei Date: Fri, 15 Aug 2025 11:10:17 +0800 Subject: [PATCH 2/3] fix: accept conda Terms of Service in Linux, macOS and Windows PyPI release scripts Add conda tos accept commands for required channels in all platform scripts: - release-pypi-macos.sh: Accept ToS for main and r channels - release-pypi-windows.cmd: Accept ToS for main and r channels This ensures all PyPI release workflows can run without conda ToS errors --- release-pypi-linux.sh | 4 ++++ release-pypi-macos.sh | 4 ++++ release-pypi-windows.cmd | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/release-pypi-linux.sh b/release-pypi-linux.sh index d5391dbf3..20714a533 100644 --- a/release-pypi-linux.sh +++ b/release-pypi-linux.sh @@ -25,6 +25,10 @@ bash ${MINICONDA_FILENAME} -b -f -p $HOME/miniconda3 export PATH=$HOME/miniconda3/bin:$PATH eval "$(conda shell.bash hook)" +# Accept conda Terms of Service for required channels +conda tos accept --override-channels --channel https://repo.anaconda.com/pkgs/main +conda tos accept --override-channels --channel https://repo.anaconda.com/pkgs/r + for VERSION in 3.8 3.9 3.10 3.11 3.12; do # Create and activate environment conda config --add channels conda-forge diff --git a/release-pypi-macos.sh b/release-pypi-macos.sh index 909bea7ce..593e4e99e 100644 --- a/release-pypi-macos.sh +++ b/release-pypi-macos.sh @@ -12,6 +12,10 @@ bash ${MINICONDA_FILENAME} -b -f -p $HOME/miniconda3 export PATH=$HOME/miniconda3/bin:$PATH eval "$(conda shell.bash hook)" +# Accept conda Terms of Service for required channels +conda tos accept --override-channels --channel https://repo.anaconda.com/pkgs/main +conda tos accept --override-channels --channel https://repo.anaconda.com/pkgs/r + for VERSION in 3.8 3.9 3.10 3.11 3.12; do # Create and activate environment conda config --add channels conda-forge diff --git a/release-pypi-windows.cmd b/release-pypi-windows.cmd index 7056d9d5d..635399f37 100644 --- a/release-pypi-windows.cmd +++ b/release-pypi-windows.cmd @@ -4,6 +4,10 @@ setlocal EnableDelayedExpansion SET VERSIONS=3.8 3.9 3.10 3.11 3.12 SET SOURCEDIR=%cd% +REM Accept conda Terms of Service for required channels +CALL C:\Miniconda/condabin/conda.bat tos accept --override-channels --channel https://repo.anaconda.com/pkgs/main +CALL C:\Miniconda/condabin/conda.bat tos accept --override-channels --channel https://repo.anaconda.com/pkgs/r + REM Build packages for %%v in (%VERSIONS%) do ( SET ENV_NAME=py%%v From 4e55f83754ae1965caecea6147769b79253c6533 Mon Sep 17 00:00:00 2001 From: zhangjianfei Date: Fri, 15 Aug 2025 11:21:01 +0800 Subject: [PATCH 3/3] fix: support ARM64 architecture in macOS PyPI release script Detect macOS architecture (arm64 vs x86_64) and download the appropriate Miniconda version: - ARM64 (Apple Silicon): Miniconda3-latest-MacOSX-arm64.sh - x86_64 (Intel): Miniconda3-latest-MacOSX-x86_64.sh This ensures compatibility with both macos-latest (x86_64) and macos-14 (ARM64) GitHub Actions runners. --- release-pypi-macos.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/release-pypi-macos.sh b/release-pypi-macos.sh index 593e4e99e..b4a7fa1c6 100644 --- a/release-pypi-macos.sh +++ b/release-pypi-macos.sh @@ -5,7 +5,14 @@ set -e # this script has to be ran from a clean dockerfile # Download and init conda -MINICONDA_FILENAME=Miniconda3-latest-MacOSX-x86_64.sh +# Detect architecture and set appropriate Miniconda filename +ARCH=$(uname -m) +if [ "$ARCH" = "arm64" ]; then + MINICONDA_FILENAME=Miniconda3-latest-MacOSX-arm64.sh +else + MINICONDA_FILENAME=Miniconda3-latest-MacOSX-x86_64.sh +fi + curl -L -o $MINICONDA_FILENAME \ "https://repo.continuum.io/miniconda/$MINICONDA_FILENAME" bash ${MINICONDA_FILENAME} -b -f -p $HOME/miniconda3