Tests #695
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
name: Tests | |
on: | |
push: | |
pull_request: | |
schedule: | |
- cron: '0 0 * * *' # every day at midnight | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
defaults: | |
run: | |
shell: bash | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
python-version: [3.7] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install System Dependencies | |
run: | | |
sudo apt-get install build-essential curl wget cmake gfortran automake \ | |
autoconf libtool m4 libgomp1 libreadline-dev libncurses-dev pkg-config \ | |
libcairo2-dev libpango1.0-dev libxt-dev libx11-dev -y | |
- name: Check Latest Bmad Release | |
run: | | |
echo "Latest release is: $(curl https://www.classe.cornell.edu/~cesrulib/downloads/latest_distribution_file_prefix)" | |
# Set Environment variable for further steps | |
echo "BMADDIST=$(curl https://www.classe.cornell.edu/~cesrulib/downloads/latest_distribution_file_prefix)" >> $GITHUB_ENV | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- uses: actions/cache@v2 | |
id: cache | |
with: | |
path: ~/bmad | |
key: ${{ runner.os }}-${{ env.BMADDIST }} | |
- name: Install Bmad - ${{ env.BMADDIST }} | |
if: steps.cache.outputs.cache-hit != 'true' | |
run: .github/scripts/install_bmad.sh | |
- name: Setup Bmad | |
run: | | |
echo "ACC_ROOT_DIR=/home/runner/bmad/bmad_dist" >> $GITHUB_ENV | |
echo "ACC_EXE=/home/runner/bmad/bmad_dist/production/bin" >> $GITHUB_ENV | |
echo "TAO_DIR=/home/runner/bmad/bmad_dist/tao" >> $GITHUB_ENV | |
echo "/home/runner/bmad/bmad_dist/production/bin/" >> $GITHUB_PATH | |
- name: Install Python Dependencies | |
run: | | |
pip install -r requirements.txt | |
pip install -r test-requirements.txt | |
- name: Install PyTao | |
run: | | |
pip install . | |
- name: Run Tests | |
run: | | |
python run_tests.py |