Use latest CmdStan #657
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| build-and-test-python: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| python-version: ["3.10"] | |
| os: ["macos-13", "ubuntu-latest", "windows-latest", "macos-latest-xlarge"] | |
| fail-fast: false | |
| steps: | |
| - name: "Set environment variables (Windows)" | |
| if: startsWith(runner.os, 'Windows') | |
| shell: pwsh | |
| run: | | |
| (Get-ItemProperty "HKLM:System\CurrentControlSet\Control\FileSystem").LongPathsEnabled | |
| $os_version = (Get-CimInstance Win32_OperatingSystem).version | |
| Echo "OS_VERSION=$os_version" >> $env:GITHUB_ENV | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: pip | |
| cache-dependency-path: "**/python/pyproject.toml" | |
| - name: "Restore RTools40" | |
| if: startsWith(runner.os, 'Windows') | |
| id: cache-rtools | |
| uses: actions/cache@v4 | |
| with: | |
| path: C:/rtools40 | |
| key: ${{ runner.os }}-${{ env.OS_VERSION }}-rtools-v1 | |
| - name: Install and test | |
| run: | | |
| cd python | |
| python -m pip install -U --editable ".[dev,parallel]" | |
| python -m pytest prophet/tests/ | |
| build-and-test-r: | |
| runs-on: ${{ matrix.config.os }} | |
| name: R ${{ matrix.config.os }} (${{ matrix.config.r }}) | |
| strategy: | |
| matrix: | |
| config: | |
| - {os: ubuntu-22.04, r: 'release'} | |
| fail-fast: false | |
| env: | |
| GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
| R_KEEP_PKG_SOURCE: yes | |
| R_REMOTES_NO_ERRORS_FROM_WARNINGS: true | |
| PKGDIR: "R/" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: r-lib/actions/setup-pandoc@v2 | |
| - uses: r-lib/actions/setup-r@v2 | |
| with: | |
| r-version: ${{ matrix.config.r }} | |
| use-public-rspm: true | |
| # Install dependencies - separating the steps to fix dependency conflicts | |
| - name: Install dependencies | |
| run: | | |
| install.packages('remotes') | |
| remotes::install_deps(dependencies = TRUE) | |
| remotes::install_cran(c("rcmdcheck", "knitr", "testthat", "readr", "rmarkdown")) | |
| shell: Rscript {0} | |
| working-directory: ${{ env.PKGDIR }} | |
| # Install Stan packages separately if needed | |
| - name: Install Stan packages | |
| run: | | |
| install.packages(c("cmdstanr", "posterior"), repos = c("https://mc-stan.org/r-packages/", getOption("repos"))) | |
| shell: Rscript {0} | |
| - name: Check | |
| uses: r-lib/actions/check-r-package@v2 | |
| with: | |
| upload-snapshots: true | |
| build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")' | |
| working-directory: ${{ env.PKGDIR }} |