|
78 | 78 | pip install -i https://pypi.anaconda.org/scientific-python-nightly-wheels/simple cython
|
79 | 79 | - uses: ./.github/meson_actions
|
80 | 80 |
|
81 |
| - # Add ARM64-specific smoke test |
82 |
| - smoke_test_arm64: |
83 |
| - if: github.repository == 'numpy/numpy' |
84 |
| - runs-on: ubuntu-22.04-arm |
85 |
| - env: |
86 |
| - MESON_ARGS: "-Dallow-noblas=true -Dcpu-baseline=none -Dcpu-dispatch=none" |
87 |
| - strategy: |
88 |
| - matrix: |
89 |
| - version: ["3.11", "3.12"] |
90 |
| - steps: |
91 |
| - - uses: actions/checkout@v4 |
92 |
| - with: |
93 |
| - submodules: recursive |
94 |
| - fetch-tags: true |
95 |
| - - uses: actions/setup-python@v5 |
96 |
| - with: |
97 |
| - python-version: ${{ matrix.version }} |
98 |
| - - name: Install dependencies |
99 |
| - run: | |
100 |
| - python -m pip install --upgrade pip |
101 |
| - python -m pip install -r requirements/build_requirements.txt |
102 |
| - - uses: ./.github/meson_actions |
103 |
| - |
104 | 81 | # TODO pypy: uncomment when pypy3.11 becomes available
|
105 | 82 | #pypy:
|
106 | 83 | #needs: [smoke_test]
|
@@ -190,31 +167,89 @@ jobs:
|
190 | 167 | PYTHONOPTIMIZE: 2
|
191 | 168 |
|
192 | 169 | # Add ARM64-specific full test
|
193 |
| - full_arm64: |
194 |
| - needs: [smoke_test_arm64] |
195 |
| - runs-on: ubuntu-22.04-arm |
| 170 | + aarch64_test: |
| 171 | + if: github.repository == 'numpy/numpy' |
| 172 | + runs-on: ubuntu-22.04-arm64 |
196 | 173 | steps:
|
197 |
| - - uses: actions/checkout@v4 |
| 174 | + # PR handling |
| 175 | + - name: Checkout for PR |
| 176 | + if: github.event_name == 'pull_request' |
| 177 | + uses: actions/checkout@v4 |
198 | 178 | with:
|
199 | 179 | submodules: recursive
|
200 |
| - fetch-tags: true |
| 180 | + fetch-depth: 0 |
| 181 | + ref: ${{ github.event.pull_request.head.sha }} |
| 182 | + |
| 183 | + - name: Configure Git for PR |
| 184 | + if: github.event_name == 'pull_request' |
| 185 | + run: | |
| 186 | + git config --global user.email "you@example.com" |
| 187 | + git config --global user.name "GitHub Actions Bot" |
| 188 | + git fetch origin ${{ github.base_ref }} |
| 189 | + git checkout ${{ github.base_ref }} |
| 190 | + git merge --no-commit ${{ github.event.pull_request.head.sha }} |
| 191 | + git submodule update --init --recursive |
| 192 | +
|
| 193 | + # Regular checkout for non-PR builds |
| 194 | + - name: Checkout for non-PR |
| 195 | + if: github.event_name != 'pull_request' |
| 196 | + uses: actions/checkout@v4 |
| 197 | + with: |
| 198 | + submodules: recursive |
| 199 | + fetch-depth: 0 |
| 200 | + |
| 201 | + # Setup ccache using Cirrus CI approach |
| 202 | + - name: Setup ccache directory |
| 203 | + run: | |
| 204 | + mkdir -p .ccache |
| 205 | +
|
| 206 | + - uses: actions/cache@v4 |
| 207 | + with: |
| 208 | + path: .ccache |
| 209 | + key: ccache-linux_aarch64-${{ github.sha }} |
| 210 | + restore-keys: | |
| 211 | + ccache-linux_aarch64- |
| 212 | +
|
| 213 | + # Install system dependencies |
| 214 | + - name: Install system dependencies |
| 215 | + run: | |
| 216 | + sudo apt-get update |
| 217 | + sudo apt-get install -y --no-install-recommends \ |
| 218 | + software-properties-common \ |
| 219 | + gcc g++ gfortran pkg-config ccache \ |
| 220 | + libopenblas-dev libatlas-base-dev liblapack-dev |
| 221 | +
|
| 222 | + sudo /usr/sbin/update-ccache-symlinks |
| 223 | + export PATH=/usr/lib/ccache:$PATH |
| 224 | + echo "PATH=$PATH" >> $GITHUB_ENV |
| 225 | + echo "CCACHE_DIR=${{ github.workspace }}/.ccache" >> $GITHUB_ENV |
| 226 | +
|
| 227 | + # Setup Python |
201 | 228 | - uses: actions/setup-python@v5
|
202 | 229 | with:
|
203 | 230 | python-version: '3.11'
|
204 |
| - - name: Install build and test dependencies |
| 231 | + |
| 232 | + # Install Python dependencies |
| 233 | + - name: Install Python dependencies |
205 | 234 | run: |
|
206 | 235 | python -m pip install -r requirements/build_requirements.txt
|
207 | 236 | python -m pip install -r requirements/test_requirements.txt
|
208 |
| - - name: Install OpenBLAS |
209 |
| - run: | |
210 |
| - sudo apt update |
211 |
| - sudo apt install -y gfortran libopenblas-dev |
212 |
| - - name: Build and install |
| 237 | +
|
| 238 | + # Build |
| 239 | + - name: Build |
213 | 240 | run: |
|
214 |
| - python -m pip install -e . --no-build-isolation |
215 |
| - - name: Run full test suite |
| 241 | + spin build -- -Dallow-noblas=true |
| 242 | +
|
| 243 | + # Test |
| 244 | + - name: Test |
216 | 245 | run: |
|
217 |
| - pytest numpy --durations=10 --timeout=600 |
| 246 | + spin test -j 1 |
| 247 | + ccache -s |
| 248 | +
|
| 249 | + # Meson Log on failure |
| 250 | + - name: Meson Log |
| 251 | + if: always() |
| 252 | + run: cat build/meson-logs/meson-log.txt |
218 | 253 |
|
219 | 254 | benchmark:
|
220 | 255 | needs: [smoke_test]
|
|
0 commit comments