mirror of
https://github.com/saymrwulf/prophet.git
synced 2026-07-23 19:32:25 +00:00
Speed up Linux wheel building and other fixes (#2040)
This commit is contained in:
parent
4fb577e5d4
commit
1ff78a3a05
2 changed files with 14 additions and 13 deletions
10
.github/workflows/build-and-test.yml
vendored
10
.github/workflows/build-and-test.yml
vendored
|
|
@ -19,6 +19,12 @@ jobs:
|
|||
fail-fast: false
|
||||
|
||||
steps:
|
||||
- name: "Get OS version (Linux)"
|
||||
if: startsWith(runner.os, 'Linux')
|
||||
run: |
|
||||
echo "OS_VERSION=`lsb_release -sr`" >> $GITHUB_ENV
|
||||
echo "PIP_DEFAULT_CACHE=$HOME/.cache/pip" >> $GITHUB_ENV
|
||||
echo "DEFAULT_HOME=$HOME" >> $GITHUB_ENV
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v2
|
||||
|
|
@ -28,7 +34,7 @@ jobs:
|
|||
id: cache-pip
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: $HOME/.cache/pip
|
||||
path: ${{ env.PIP_DEFAULT_CACHE }}
|
||||
key: ${{ runner.os }}-pip-${{ hashFiles('**/python/requirements.txt') }}-v1
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pip-
|
||||
|
|
@ -36,7 +42,7 @@ jobs:
|
|||
id: cache-cmdstan
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: $HOME/.cmdstan
|
||||
path: ${{ env.DEFAULT_HOME }}/.cmdstan
|
||||
key: ${{ runner.os }}-cmdstan-${{ env.CMDSTAN_VERSION }}-v1
|
||||
- name: "Download cmdstan"
|
||||
if: steps.cache-cmdstan.outputs.cache-hit != 'true'
|
||||
|
|
|
|||
17
.github/workflows/wheel.yml
vendored
17
.github/workflows/wheel.yml
vendored
|
|
@ -15,15 +15,9 @@ jobs:
|
|||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os:
|
||||
- "macos-latest"
|
||||
- "ubuntu-latest"
|
||||
python-version:
|
||||
- "3.6"
|
||||
- "3.7"
|
||||
- "3.8"
|
||||
architecture:
|
||||
- x64
|
||||
os: ["macos-latest", "ubuntu-latest"]
|
||||
python-version: [3.8]
|
||||
architecture: ["x64"]
|
||||
|
||||
fail-fast: false
|
||||
|
||||
|
|
@ -87,13 +81,14 @@ jobs:
|
|||
STAN_BACKEND="${{ env.STAN_BACKEND }}"
|
||||
CMDSTAN_VERSION=${{ env.CMDSTAN_VERSION }}
|
||||
# Linux builds run in a Docker container, need to point the cache to the host machine.
|
||||
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
|
||||
CIBW_ENVIRONMENT_LINUX: >
|
||||
STAN_BACKEND="${{ env.STAN_BACKEND }}"
|
||||
CMDSTAN_VERSION=${{ env.CMDSTAN_VERSION }}
|
||||
HOME="/host/${{ env.DEFAULT_HOME }}"
|
||||
PIP_CACHE_DIR="/host/${{ env.PIP_DEFAULT_CACHE }}"
|
||||
CIBW_BEFORE_ALL_LINUX: sudo chmod -R a+rwx ${{ env.PIP_DEFAULT_CACHE }}
|
||||
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
|
||||
CIBW_BEFORE_ALL_LINUX: chmod -R a+rwx /host/${{ env.PIP_DEFAULT_CACHE }}
|
||||
CIBW_BUILD: cp36-* cp37-* cp38-*
|
||||
CIBW_ARCHS: native
|
||||
CIBW_BUILD_FRONTEND: build
|
||||
CIBW_TEST_REQUIRES: pytest
|
||||
|
|
|
|||
Loading…
Reference in a new issue