Repository navigation
116 lines (108 loc) · 4.66 KB
/
Copy pathbuild-pyfixest.yml
File metadata and controls
116 lines (108 loc) · 4.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
# SPDX-FileCopyrightText: 2026 The RISE Project
# SPDX-License-Identifier: MIT
---
# This workflow is based on the `linux` job of
# https://github.com/py-econometrics/pyfixest/blob/v0.60.0/.github/workflows/build-and-release.yaml
name: Build pyfixest wheels (riscv64)
on:
workflow_dispatch:
inputs:
version:
description: 'Version glob to (re)build; empty builds every version of docs/packages/pyfixest.yaml not released yet'
required: false
default: ''
cancel-in-progress:
description: Cancel an in-progress run in the same concurrency group.
required: false
type: boolean
default: true
pull_request:
branches: [main]
paths:
- '.github/workflows/build-pyfixest.yml'
- 'docs/packages/pyfixest.yaml'
push:
branches: [main]
paths:
- '.github/workflows/build-pyfixest.yml'
- 'docs/packages/pyfixest.yaml'
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: ${{ case(github.event_name == 'pull_request', true, github.event_name == 'workflow_dispatch', inputs['cancel-in-progress'], false) }}
permissions:
contents: read # to fetch code (actions/checkout)
env:
MANYLINUX_RISCV64_IMAGE: quay.io/pypa/manylinux_2_39_riscv64
jobs:
setup:
uses: $/.github/workflows/_setup.yml
with:
package: pyfixest
version: ${{ inputs.version }}
build_wheels:
needs: [setup]
if: needs.setup.outputs.versions != '[]'
name: Build pyfixest ${{ matrix.version }} ${{ matrix.python }}-${{ matrix.platform }}_riscv64
strategy:
fail-fast: false
matrix:
include: ${{ fromJSON(needs.setup.outputs.matrix) }}
uses: $/.github/workflows/_build-cibuildwheel.yml
with:
package: "pyfixest"
version: "${{ matrix.version }}"
repository: "py-econometrics/pyfixest"
ref: "v${{ matrix.version }}"
artifact-tag: "${{ matrix.python }}-${{ matrix.platform }}_riscv64"
timeout-minutes: 180
cibw-build: "${{ matrix.python }}-${{ matrix.platform }}_riscv64"
# pyfixest ships no [tool.cibuildwheel], so the Rust toolchain its
# maturin backend needs is installed in-container here.
cibw-before-all-linux: >
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
cibw-environment-linux: "PATH=\"$PATH:$HOME/.cargo/bin\" PIP_ONLY_BINARY=numpy,scipy,pandas,matplotlib,duckdb,pillow,polars-runtime-32,pyarrow"
cibw-test-requires: "pytest pytest-xdist pytest-benchmark duckdb matplotlib polars pyarrow"
cibw-test-sources: "tests benchmarks pyfixest/did/data"
# test_collinearity.py, test_count_fixef_fully_nested.py,
# test_demean.py and test_detect_singletons.py import pyfixest's
# numba/jax backends at module scope, and the jax-named tests and
# test_wildboottest.py/test_rwolf_error (wildboottest needs numba)
# call them; neither has a riscv64 wheel anywhere, nor a port in
# this repo. test_batched_lsmr.py and test_lsmr_compiled.py import
# torch, which has no riscv64 wheel either. test_quantreg.py needs
# statsmodels, which has no riscv64 wheel for cp314 (CLAUDE.md
# gotcha 84). test_check_version.py tests upstream's release script
# under .github/, not the wheel. test_errors_etable expects the
# AssertionError of upstream's locked maketables 0.1.8; 0.2.0
# raises ValueError.
cibw-test-command: >
python -c "import pyfixest.core._core_impl as m; assert m.__file__.endswith('.so'), m.__file__"
&& python -m pytest -v tests -n auto
-m "not (extended or against_r_core or against_r_extended or plots or hac)"
-k "not (jax or test_rwolf_error or test_errors_etable)"
--ignore tests/test_batched_lsmr.py
--ignore tests/test_check_version.py
--ignore tests/test_collinearity.py
--ignore tests/test_count_fixef_fully_nested.py
--ignore tests/test_demean.py
--ignore tests/test_detect_singletons.py
--ignore tests/test_lsmr_compiled.py
--ignore tests/test_quantreg.py
--ignore tests/test_wildboottest.py
publish:
name: Publish pyfixest ${{ matrix.version }}
needs: [setup, build_wheels]
if: needs.setup.outputs.versions != '[]'
strategy:
fail-fast: false
matrix:
version: ${{ fromJSON(needs.setup.outputs.versions) }}
permissions:
contents: write
pull-requests: write
uses: $/.github/workflows/_publish-wheel.yml
secrets:
app-private-key: ${{ secrets.RISEPROJECT_APP_PRIVATE_KEY }}
with:
matrix: ${{ needs.setup.outputs.matrix }}
artifact-pattern: pyfixest-${{ matrix.version }}-*-manylinux_riscv64