1010
1111jobs :
1212 build_wheels :
13- name : ${{ matrix.os }}, Python ${{ matrix.python }}
13+ name : ${{ matrix.os }}, ${{matrix.python_impl }} ${{ matrix.python }}
1414 runs-on : ${{ matrix.os }}
1515 defaults :
1616 run :
2020 matrix :
2121 python : [cp39, cp310, cp311, cp312]
2222 os : [ubuntu-latest, windows-latest, macOS-latest]
23+ python_impl : [Python]
24+ include :
25+ - python : cp312
26+ os : ubuntu-latest
27+ python_impl : Pyodide
2328 env :
2429 BUILD_COMMIT : " main" # or a specific version, e.g., v0.13.1
2530 CIBW_BUILD : ${{ matrix.python }}-*
@@ -58,93 +63,24 @@ jobs:
5863
5964 - name : Build wheels
606566+ if : matrix.python_impl != 'Pyodide'
6167 with :
6268 output-dir : wheelhouse
6369 package-dir : statsmodels
6470 env :
6571 CIBW_BEFORE_BUILD : ' git submodule foreach git checkout ${{ env.BUILD_COMMIT }}'
6672
67- - name : Setup Upload Variables
68- if : ${{ always() }}
69- shell : bash
70- run : |
71- if [ "schedule" == "${{ github.event_name }}" ] || [ "push" == "${{ github.event_name }}" ]; then
72- echo "ANACONDA_UPLOAD=true" >> $GITHUB_ENV
73- else
74- echo "ANACONDA_UPLOAD=false" >> $GITHUB_ENV
75- fi
76- if [ "schedule" == "${{ github.event_name }}" ] || [ "main" == "$BUILD_COMMIT" ]; then
77- echo "ANACONDA_ORG=scientific-python-nightly-wheels" >> $GITHUB_ENV
78- echo "TOKEN=$SCIENTIFIC_PYTHON_NIGHTLY_WHEELS" >> $GITHUB_ENV
79- else
80- echo "ANACONDA_ORG=multibuild-wheels-staging" >> $GITHUB_ENV
81- echo "TOKEN=$MULTIBUILD_WHEELS_STAGING_ACCESS" >> $GITHUB_ENV
82- fi
83- - name : Upload wheels
84- if : ${{ always() }}
85- shell : bash
86- run : |
87- # trigger an upload to the shared ecosystem
88- # infrastructure at: https://anaconda.org/scientific-python-nightly-wheels
89- # for cron jobs only (restricted to main branch once
90- # per week)
91- # SCIENTIFIC_PYTHON_NIGHTLY_WHEELS is a secret token
92- # used in Travis CI config, originally
93- #
94- # for merges (push events) we use the staging area instead;
95- # MULTIBUILD_WHEELS_STAGING_ACCESS is a secret token used in Travis
96- # CI config, originally generated at anaconda.org for
97- # multibuild-wheels-staging
98- # generated at anaconda.org for scientific-python-nightly-wheels
99- echo ${PWD}
100- if [ ${ANACONDA_UPLOAD} == true ]; then
101- # main branches of these two packages
102- python --version
103- python -m pip install "cython<3"
104- python -m pip list
105- python -m pip install git+https://github.com/bashtage/clyent.git
106- python -m pip install git+https://github.com/Anaconda-Server/anaconda-client.git
107- python -m pip install "urllib3>=1.21.1,<2"
108- ls ./wheelhouse/*.whl
109- anaconda -t ${TOKEN} upload --force -u ${ANACONDA_ORG} ./wheelhouse/*.whl
110- echo "PyPI-style index: https://pypi.anaconda.org/$ANACONDA_ORG/simple"
111- fi
112-
113-
114- # Same as the above job, but configurations swapped for Pyodide
115- build_pyodide_wheel :
116- name : ubuntu-latest, Pyodide cp312
117- runs-on : ubuntu-latest
118- defaults :
119- run :
120- shell : bash
121- env :
122- BUILD_COMMIT : " main" # or a specific version, e.g., v0.13.1
123- CIBW_PLATFORM : pyodide
124- CIBW_TEST_REQUIRES : pytest
125- CIBW_TEST_COMMAND : python -c "import statsmodels; statsmodels.test(['--skip-examples','--skip-slow'])"
126- MULTIBUILD_WHEELS_STAGING_ACCESS : ${{ secrets.MULTIBUILD_WHEELS_STAGING_ACCESS }}
127- SCIENTIFIC_PYTHON_NIGHTLY_WHEELS : ${{ secrets.SCIENTIFIC_PYTHON_NIGHTLY_WHEELS }}
128- MKL_NUM_THREADS : 1
129- OMP_NUM_THREADS : 1
130- OPENLAS_NUM_THREADS : 1
131-
132- steps :
133- - uses : actions/checkout@v4
134- with :
135- submodules : recursive
136- fetch-depth : 0
137-
138- # Used to host cibuildwheel runner
139- - uses : actions/setup-python@v5
140- with :
141- python-version : ' 3.12'
142-
14373 - name : Build Pyodide wheel
74+ if : matrix.python_impl == 'Pyodide'
1447514576 with :
14677 output-dir : wheelhouse
14778 package-dir : statsmodels
79+ env :
80+ CIBW_BEFORE_BUILD : ' git submodule foreach git checkout ${{ env.BUILD_COMMIT }}'
81+ CIBW_PLATFORM : pyodide
82+ CIBW_TEST_REQUIRES : pytest
83+ CIBW_TEST_COMMAND : python -c "import statsmodels; statsmodels.test(['--skip-examples','--skip-slow'])"
14884
14985 - name : Setup Upload Variables
15086 if : ${{ always() }}
@@ -190,4 +126,4 @@ jobs:
190126 ls ./wheelhouse/*.whl
191127 anaconda -t ${TOKEN} upload --force -u ${ANACONDA_ORG} ./wheelhouse/*.whl
192128 echo "PyPI-style index: https://pypi.anaconda.org/$ANACONDA_ORG/simple"
193- fi
129+ fi
0 commit comments