-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Squashed 'deps/data/bridgestan/' changes from a8cfe61..c7a425a
c7a425a Allow JSON data as a string (#60) 50fe2ec Update README examples section e380e82 Reword docstrings fb513e3 Reorganize and update documentation (#57) 96805fd Compile methods: split stanc args from make args, add default include path (#58) f62bf46 Fix broken link 676db6b Bump actions/setup-python from 2 to 4 (#55) 34f10dd Remove CmdStan Dependency (#51) 821883f Prefix any C-exposed symbols with `bs_` (#54) 81129b0 Add the option for autodiff Hessian calculations (#52) git-subtree-dir: deps/data/bridgestan git-subtree-split: c7a425aac54120bafa643b722ed24b2a32111782
- Loading branch information
Showing
53 changed files
with
1,197 additions
and
985 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,8 +8,7 @@ on: | |
workflow_dispatch: {} | ||
|
||
env: | ||
CMDSTAN_VERSION: "2.31.0" | ||
CACHE_VERSION: 0 | ||
CACHE_VERSION: 1 | ||
|
||
jobs: | ||
build_test_models: | ||
|
@@ -22,28 +21,19 @@ jobs: | |
steps: | ||
- name: Check out github | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
|
||
- name: CmdStan installation cacheing | ||
- name: Stan build caching | ||
uses: actions/cache@v3 | ||
id: cmdstan-cache | ||
id: stan-cache | ||
with: | ||
path: ~/.cmdstan | ||
key: ${{ runner.os }}-cmdstan-${{ env.CMDSTAN_VERSION }} | ||
|
||
- name: Install CmdStan (Unix) | ||
if: matrix.os != 'windows-latest' | ||
run: | | ||
pipx run --spec cmdstanpy install_cmdstan --version "${{ env.CMDSTAN_VERSION }}" --cores 2 --verbose | ||
- name: Install CmdStan (Windows) | ||
if: matrix.os == 'windows-latest' | ||
run: | | ||
pipx run --spec cmdstanpy install_cmdstan --version "${{ env.CMDSTAN_VERSION }}" --cores 2 --verbose --compiler | ||
path: ./stan/ | ||
key: ${{ runner.os }}-stan-${{ hashFiles('stan/src/stan/version.hpp') }}-v${{ env.CACHE_VERSION }} | ||
|
||
- name: Build C example (Unix) | ||
if: matrix.os != 'windows-latest' | ||
run: | | ||
export CMDSTAN=~/.cmdstan/cmdstan-${{ env.CMDSTAN_VERSION }}/ | ||
cd c-example/ | ||
make example | ||
make example_static | ||
|
@@ -60,20 +50,17 @@ jobs: | |
id: test-models | ||
with: | ||
path: ./test_models/ | ||
key: ${{ hashFiles('**/*.stan', 'src/*') }}-${{ matrix.os }}-cmdstan-${{ env.CMDSTAN_VERSION }}-v${{ env.CACHE_VERSION }} | ||
key: ${{ hashFiles('**/*.stan', 'src/*', 'stan/src/stan/version.hpp') }}-${{ matrix.os }}-v${{ env.CACHE_VERSION }} | ||
|
||
- name: Build test models (Unix) | ||
if: matrix.os != 'windows-latest' && steps.test-models.outputs.cache-hit != 'true' | ||
run: | | ||
export CMDSTAN=~/.cmdstan/cmdstan-${{ env.CMDSTAN_VERSION }}/ | ||
make STAN_THREADS=true O=0 test_models -j2 | ||
shell: bash | ||
|
||
- name: Build test models (Windows) | ||
if: matrix.os == 'windows-latest' && steps.test-models.outputs.cache-hit != 'true' | ||
run: | | ||
$raw_cmdstan = "$($HOME)/.cmdstan/cmdstan-${{ env.CMDSTAN_VERSION }}/" | ||
$env:CMDSTAN = $raw_cmdstan.replace('\', '/') | ||
mingw32-make.exe STAN_THREADS=true O=0 test_models -j2 | ||
shell: pwsh | ||
|
||
|
@@ -88,23 +75,27 @@ jobs: | |
steps: | ||
- name: Check out github | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Restore CmdStan | ||
- name: Restore Stan | ||
uses: actions/cache@v3 | ||
id: stan-cache | ||
with: | ||
path: ~/.cmdstan | ||
key: ${{ runner.os }}-cmdstan-${{ env.CMDSTAN_VERSION }} | ||
path: ./stan/ | ||
key: ${{ runner.os }}-stan-${{ hashFiles('stan/src/stan/version.hpp') }}-v${{ env.CACHE_VERSION }} | ||
|
||
- name: Restore built models | ||
uses: actions/cache@v3 | ||
id: test-models | ||
with: | ||
path: ./test_models/ | ||
key: ${{ hashFiles('**/*.stan', 'src/*') }}-${{ matrix.os }}-cmdstan-${{ env.CMDSTAN_VERSION }}-v${{ env.CACHE_VERSION }} | ||
key: ${{ hashFiles('**/*.stan', 'src/*', 'stan/src/stan/version.hpp') }}-${{ matrix.os }}-v${{ env.CACHE_VERSION }} | ||
|
||
- name: Install package | ||
run: | | ||
|
@@ -117,6 +108,7 @@ jobs: | |
export BRIDGESTAN=$(pwd) | ||
cd python/ | ||
pytest -v | ||
pytest -v --run-type=ad_hessian | ||
test_julia_client: | ||
needs: [build_test_models] | ||
|
@@ -128,21 +120,25 @@ jobs: | |
steps: | ||
- name: Check out github | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Set up Julia | ||
uses: julia-actions/setup-julia@v1 | ||
|
||
- name: Restore CmdStan | ||
- name: Restore Stan | ||
uses: actions/cache@v3 | ||
id: stan-cache | ||
with: | ||
path: ~/.cmdstan | ||
key: ${{ runner.os }}-cmdstan-${{ env.CMDSTAN_VERSION }} | ||
path: ./stan/ | ||
key: ${{ runner.os }}-stan-${{ hashFiles('stan/src/stan/version.hpp') }}-v${{ env.CACHE_VERSION }} | ||
|
||
- name: Restore built models | ||
uses: actions/cache@v3 | ||
id: test-models | ||
with: | ||
path: ./test_models/ | ||
key: ${{ hashFiles('**/*.stan', 'src/*') }}-${{ matrix.os }}-cmdstan-${{ env.CMDSTAN_VERSION }}-v${{ env.CACHE_VERSION }} | ||
key: ${{ hashFiles('**/*.stan', 'src/*', 'stan/src/stan/version.hpp') }}-${{ matrix.os }}-v${{ env.CACHE_VERSION }} | ||
|
||
- name: Run tests | ||
run: | | ||
|
@@ -159,6 +155,8 @@ jobs: | |
steps: | ||
- name: Check out github | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Install R | ||
uses: r-lib/actions/[email protected] | ||
|
@@ -171,18 +169,18 @@ jobs: | |
any::testthat | ||
any::devtools | ||
- name: Restore CmdStan | ||
- name: Restore Stan | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.cmdstan | ||
key: ${{ runner.os }}-cmdstan-${{ env.CMDSTAN_VERSION }} | ||
path: ./stan/ | ||
key: ${{ runner.os }}-stan-${{ hashFiles('stan/src/stan/version.hpp') }}-v${{ env.CACHE_VERSION }} | ||
|
||
- name: Restore built models | ||
uses: actions/cache@v3 | ||
id: test-models | ||
with: | ||
path: ./test_models/ | ||
key: ${{ hashFiles('**/*.stan', 'src/*') }}-${{ matrix.os }}-cmdstan-${{ env.CMDSTAN_VERSION }}-v${{ env.CACHE_VERSION }} | ||
key: ${{ hashFiles('**/*.stan', 'src/*', 'stan/src/stan/version.hpp') }}-${{ matrix.os }}-v${{ env.CACHE_VERSION }} | ||
|
||
- name: Run tests | ||
run: | | ||
|
@@ -198,24 +196,26 @@ jobs: | |
steps: | ||
- name: Check out github | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Restore CmdStan | ||
- name: Restore Stan | ||
uses: actions/cache@v3 | ||
id: stan-cache | ||
with: | ||
path: ~/.cmdstan | ||
key: ${{ runner.os }}-cmdstan-${{ env.CMDSTAN_VERSION }} | ||
path: ./stan/ | ||
key: ${{ runner.os }}-stan-${{ hashFiles('stan/src/stan/version.hpp') }}-v${{ env.CACHE_VERSION }} | ||
|
||
- name: Setup TBB | ||
run: | | ||
cd ~/.cmdstan/cmdstan-${{ env.CMDSTAN_VERSION }} | ||
Add-Content $env:GITHUB_PATH "$(pwd)/stan/lib/stan_math/lib/tbb" | ||
- name: Restore built models | ||
uses: actions/cache@v3 | ||
id: test-models | ||
with: | ||
path: ./test_models/ | ||
key: ${{ hashFiles('**/*.stan', 'src/*') }}-windows-latest-cmdstan-${{ env.CMDSTAN_VERSION }}-v${{ env.CACHE_VERSION }} | ||
key: ${{ hashFiles('**/*.stan', 'src/*', 'stan/src/stan/version.hpp') }}-windows-latest-v${{ env.CACHE_VERSION }} | ||
|
||
- name: Install R | ||
uses: r-lib/actions/[email protected] | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,3 +33,5 @@ bridgestan.Rcheck/ | |
build/ | ||
|
||
.DS_Store | ||
|
||
bin/* |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[submodule "stan"] | ||
path = stan | ||
url = https://github.com/stan-dev/stan | ||
branch = master |
This file contains 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
Oops, something went wrong.