Skip to content

Replace scalar enumerable_thread_specific with parallel_reduce (#121) #718

Replace scalar enumerable_thread_specific with parallel_reduce (#121)

Replace scalar enumerable_thread_specific with parallel_reduce (#121) #718

Workflow file for this run

name: Python
on:
push:
branches: [main]
pull_request:
paths:
- '.github/workflows/python.yml'
- 'cmake/**'
- 'python/src/**'
- 'python/src/CMakeLists.txt'
- 'src/**'
- 'CMakeLists.txt'
- 'MANIFEST.in'
- 'pyproject.toml'
- 'setup.py'
jobs:
Build:
name: ${{ matrix.name }} Python ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
include:
- os: ubuntu-latest
name: Linux
- os: windows-latest
name: Windows
- os: macOS-latest
name: macOS
steps:
- name: Checkout Repository
uses: actions/[email protected]
with:
fetch-depth: 10
- name: Set up Python ${{ matrix.python-version }}
uses: actions/[email protected]
with:
python-version: ${{ matrix.python-version }}
- name: Install Ccache (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get install ccache
echo 'CACHE_PATH=~/.cache/ccache' >> "$GITHUB_ENV"
- name: Install Ccache (macOS)
if: runner.os == 'macOS'
run: |
brew install ccache
echo 'CACHE_PATH=~/Library/Caches/ccache' >> "$GITHUB_ENV"
- name: Install Ccache (Windows)
if: runner.os == 'Windows'
run: |
choco install ccache
"CACHE_PATH=${env:LOCALAPPDATA}\ccache" | Out-File -FilePath $env:GITHUB_ENV -Append
- name: Cache Build
id: cache-build
uses: actions/[email protected]
with:
path: ${{ env.CACHE_PATH }}
key: ${{ runner.os }}-Python${{ matrix.python-version }}-cache
- name: Prepare Ccache
run: |
ccache --max-size=1.0G
ccache -V && ccache --show-config
ccache --show-stats && ccache --zero-stats
- name: Build and Install
run: |
pip install --verbose . && ccache --show-stats
- name: Tests
run: |
pip install -r python/tests/requirements.txt
nose2 -v --pretty-assert -s python/tests