Automatically run a profiler with the executable #914
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: CI | |
on: | |
push: | |
branches: "main" | |
tags: ["*"] | |
paths: | |
- '.github/workflows/ci.yml' | |
- 'MANIFEST.in' | |
- 'pyproject.toml' | |
- 'benchmarks/reframe_config.py' | |
- 'benchmarks/examples/**' | |
- 'benchmarks/modules/**' | |
- 'post-processing/**' | |
pull_request: | |
paths: | |
- '.github/workflows/ci.yml' | |
- 'MANIFEST.in' | |
- 'pyproject.toml' | |
- 'reframe_config.py' | |
- 'benchmarks/examples/**' | |
- 'benchmarks/modules/**' | |
- 'post-processing/**' | |
release: | |
env: | |
RFM_CONFIG_FILES: "${{ github.workspace }}/benchmarks/reframe_config.py" | |
concurrency: | |
# Skip intermediate builds: always. | |
# Cancel intermediate builds: always. | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
test: | |
name: Tests on ${{ matrix.os }} - Spack ${{ matrix.spack_version }} - Spack spec ${{ matrix.spack_spec }} | |
timeout-minutes: 15 | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- ubuntu-latest | |
spack_version: | |
# In README.md we claim compatibility with v0.20.0 | |
- v0.20.0 | |
- develop | |
spack_spec: | |
# `example` is a package in our custom Spack repo, ensure we can build | |
# packages in it. | |
- sombrero@2021-08-16 | |
- example@2021-08-16 | |
# Compatible ReFrame versions are set in pyproject.toml | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10.6' | |
cache: 'pip' | |
- name: Install Excalibur-tests | |
shell: bash | |
run: | | |
python -m pip install --upgrade pip | |
pip install -e .[test] | |
- name: Install Spack | |
shell: bash | |
working-directory: ${{runner.workspace}} | |
run: | | |
git clone --depth=1 --branch=${{ matrix.spack_version }} https://github.com/spack/spack.git | |
cd spack | |
echo "PATH=${PWD}/bin:${PATH}" >> "${GITHUB_ENV}" | |
# Make sure `spack` command works | |
- name: Spack version number | |
shell: bash | |
run: spack --version | |
# Make sure `reframe` command works | |
- name: ReFrame version number | |
shell: bash | |
run: reframe -V | |
- name: Install OpenMPI, CMake and extra Python packages | |
shell: bash | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y openmpi-bin libopenmpi-dev cmake | |
env: | |
DEBIAN_FRONTEND: noninteractive | |
- name: Run sample benchmark | |
shell: bash | |
run: | | |
reframe -v -c benchmarks/examples/sombrero --run --performance-report --system github-actions:default -S'spack_spec=${{ matrix.spack_spec }}' | |
- name: Post-processing tests | |
shell: bash | |
run: | | |
pytest |