updated submodules #1496
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 is a basic workflow to help you get started with Actions | |
name: CI | |
# Controls when the action will run. Triggers the workflow on push or pull request | |
# events but only for the master branch | |
on: | |
push: | |
branches: [ "master" ] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# Do not cancel any in-progress job or run | |
# As group name is defined on workflow level (not job-level), concurrency will be checked across different branches | |
concurrency: | |
group: et-tests | |
cancel-in-progress: false | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
# This workflow contains a single job called "build" | |
build: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-22.04 | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Below the runner checks-out multiple branches side by side, under different paths | |
# Check-out master and its submodules under $GITHUB_WORKSPACE/master, as its files are needed to run tests | |
- uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
# 0 indicates all history for all branches and tags (see https://github.com/actions/checkout) | |
fetch-depth: 0 | |
path: master | |
submodules: recursive | |
# single-branch: true | |
# Check-out scripts branch under $GITHUB_WORKSPACE/scripts to access scripts to run | |
- uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
fetch-depth: 1 | |
ref: scripts | |
path: scripts | |
# Check-out gh-pages branch under $GITHUB_WORKSPACE/gh-pages, for pushing test report output to | |
- uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
fetch-depth: 1 | |
ref: gh-pages | |
path: gh-pages | |
# This step stores certain environment variables in a file that is on githubs clouds | |
- name: Create Environment Variables | |
run: | | |
echo "TESTS_FAILED=False" >> $GITHUB_ENV | |
# Install prerequisite libraries for einstein toolkit | |
- name: Install pre-requisite libraries | |
run: | | |
sudo apt update | |
$(sudo -l sudo) su -c 'apt-get install --fix-missing -y pkg-config subversion gcc git numactl libgit2-dev=1.1.0+dfsg.1-4.1ubuntu0.1 libgsl-dev libpapi-dev python-is-python3 libhwloc-dev libudev-dev make libopenmpi-dev libhdf5-openmpi-dev libfftw3-dev libssl-dev liblapack-dev g++ curl gfortran patch pkg-config libhdf5-dev libjpeg-turbo?-dev' | |
# freeze Python to known good version. Failures with 3.12 in bokeh (https://bugzilla.redhat.com/show_bug.cgi?id=2019057) | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v5 | |
with: | |
# Semantic version range syntax or exact version of a Python version | |
python-version: '3.10' | |
# Install required libraries for parsing scripts | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install wheel | |
# jinja2 >= 3.1 removes jinja2.Markup, causing failures: | |
# https://github.com/bokeh/bokeh/pull/11174 | |
pip install jinja2==3.0.3 | |
# newer version cause issues due to numpy.bool being removed | |
pip install 'numpy<=1.23.1' | |
pip install bokeh==2.0.1 | |
pip install matplotlib | |
pip install requests | |
# must be compatible with libgit2-dev from apt | |
pip install pygit2==1.4.0 | |
# Run the script to build and test (build-and-test.sh) and write results to HTML pages (logpage.py) | |
# The script that runs the html script outputs if any tests are failed and that is stored as an environment variable | |
# Paths to master and gh-pages are passed as sys args to the scripts, so their files can be accessed | |
- name: Run build and test script | |
run: | | |
cd scripts | |
chmod +x build-and-test.sh | |
./build-and-test.sh --master $GITHUB_WORKSPACE/master --ghpages $GITHUB_WORKSPACE/gh-pages | |
python3 logpage.py --master $GITHUB_WORKSPACE/master --ghpages $GITHUB_WORKSPACE/gh-pages | |
# Push the files from gh-pages that need to be preserved for future use | |
- name: Add index.html and previous logs from gh-pages | |
run: | | |
cd gh-pages | |
git status | |
git add docs | |
git add records | |
git add test_nums.csv | |
- name: Commit files from gh-pages | |
run: | | |
cd gh-pages | |
git config --local user.email "[email protected]" | |
git config --local user.name "github runner" | |
git commit -m "CI workflow updated html file" || true | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
directory: gh-pages | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: "gh-pages" | |
# If a test failed the workflow exit with a failing status | |
- name: Clean up | |
if: ${{env.TESTS_FAILED == 'True'}} | |
run: exit 1 |