Include statment in NESTML #25
Workflow file for this run
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
on: | |
pull_request_target: | |
types: [opened, reopened, edited, synchronize] | |
jobs: | |
fork_pr_requires_review: | |
environment: ${{ (github.event.pull_request.head.repo.full_name == github.repository && 'internal') || 'external' }} | |
runs-on: ubuntu-latest | |
steps: | |
- run: true | |
benchmark_fork_pr_branch: | |
needs: fork_pr_requires_review | |
name: Continuous Benchmarking Fork PRs with Bencher | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
repository: ${{ github.event.pull_request.head.repo.full_name }} | |
ref: ${{ github.event.pull_request.head.sha }} | |
persist-credentials: false | |
- uses: bencherdev/bencher@main | |
# Setup Python version | |
- name: Setup Python 3.9 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.9 | |
# Install dependencies | |
- name: Install apt dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install libltdl7-dev libgsl0-dev libncurses5-dev libreadline6-dev pkg-config | |
sudo apt-get install python3-all-dev python3-matplotlib python3-numpy python3-scipy ipython3 | |
# Install Python dependencies | |
- name: Python dependencies | |
run: | | |
python -m pip install --upgrade pip pytest jupyterlab matplotlib pycodestyle scipy pandas pytest-benchmark | |
python -m pip install -r requirements.txt | |
# Install NEST simulator | |
- name: NEST simulator | |
run: | | |
python -m pip install cython | |
echo "GITHUB_WORKSPACE = $GITHUB_WORKSPACE" | |
NEST_SIMULATOR=$(pwd)/nest-simulator | |
NEST_INSTALL=$(pwd)/nest_install | |
echo "NEST_SIMULATOR = $NEST_SIMULATOR" | |
echo "NEST_INSTALL = $NEST_INSTALL" | |
git clone --depth=1 https://github.com/nest/nest-simulator | |
mkdir nest_install | |
echo "NEST_INSTALL=$NEST_INSTALL" >> $GITHUB_ENV | |
cd nest_install | |
cmake -DCMAKE_INSTALL_PREFIX=$NEST_INSTALL $NEST_SIMULATOR | |
make && make install | |
cd .. | |
# Install NESTML (repeated) | |
- name: Install NESTML | |
run: | | |
export PYTHONPATH=${{ env.PYTHONPATH }}:${{ env.NEST_INSTALL }}/lib/python3.9/site-packages | |
#echo PYTHONPATH=`pwd` >> $GITHUB_ENV | |
echo "PYTHONPATH=$PYTHONPATH" >> $GITHUB_ENV | |
python setup.py install | |
- name: Track Fork PR Benchmarks with Bencher | |
env: | |
LD_LIBRARY_PATH: ${{ env.NEST_INSTALL }}/lib/nest | |
run: | | |
echo "NEST_INSTALL = $NEST_INSTALL" | |
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${{ env.NEST_INSTALL }}/lib/nest bencher run \ | |
--project nestml \ | |
--token '${{ secrets.BENCHER_API_TOKEN }}' \ | |
--branch '${{ github.event.number }}/merge' \ | |
--branch-start-point '${{ github.base_ref }}' \ | |
--branch-start-point-hash '${{ github.event.pull_request.base.sha }}' \ | |
--branch-reset \ | |
--github-actions "${{ secrets.GITHUB_TOKEN }}" \ | |
--testbed ubuntu-latest \ | |
--adapter python_pytest \ | |
--file results.json \ | |
--err \ | |
'LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${{ env.NEST_INSTALL }}/lib/nest python3 -m pytest --benchmark-json results.json -s $GITHUB_WORKSPACE/tests/nest_continuous_benchmarking/test_nest_continuous_benchmarking.py' |