diff --git a/.github/workflows/test-macos-arm.yaml b/.github/workflows/test-macos-arm.yaml new file mode 100644 index 00000000..7b230f2f --- /dev/null +++ b/.github/workflows/test-macos-arm.yaml @@ -0,0 +1,93 @@ +name: Test macOS ARM + +on: + pull_request: + branches: [main] + push: + branches: [main] + +jobs: + test: + name: Test on macOS ARM + runs-on: macos-14 # ARM64 (M1) runner + timeout-minutes: 90 + strategy: + fail-fast: false + matrix: + python-version: ["3.10", "3.11", "3.12", "3.13"] + + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 1 + submodules: true + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + + - name: Install Rust + run: | + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y + echo "$HOME/.cargo/bin" >> $GITHUB_PATH + + - name: Install Cython + run: | + python3 --version + python3 -m pip install --upgrade pip + python3 -m pip install cython + + - name: Install test dependencies + run: python3 ci/pip_install_deps.py + + - name: Build + run: python3 proj.py build + + - name: Run tests + run: python3 proj.py test 1 + env: + JAVA_HOME: ${{ env.JAVA_HOME_17_ARM64 }} + + test-numpy-compat: + name: Test numpy compatibility + runs-on: macos-14 # ARM64 (M1) runner + timeout-minutes: 90 + strategy: + fail-fast: false + matrix: + include: + - python-version: "3.10" + numpy-version: "1.21.0" + - python-version: "3.10" + numpy-version: "1.24.0" + - python-version: "3.10" + numpy-version: "1.26.0" + - python-version: "3.11" + numpy-version: "2.0.0" + - python-version: "3.11" + numpy-version: "2.2.0" + + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 1 + submodules: true + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + + - name: Install Rust + run: | + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y + echo "$HOME/.cargo/bin" >> $GITHUB_PATH + + - name: Install uv + run: python3 -m pip install uv + + - name: Run tests with numpy ${{ matrix.numpy-version }} + run: uv run --python python --with 'numpy==${{ matrix.numpy-version }}' test/test.py -v TestBufferProtocolVersionV2