Skip to content

docs: add comprehensive README for tests/ci directory #3030

docs: add comprehensive README for tests/ci directory

docs: add comprehensive README for tests/ci directory #3030

Workflow file for this run

name: Validate
on:
push:
branches:
- 4.x
pull_request:
branches:
- 4.x
env:
SKIP_CI_SPECS: |
components/fs/lustre-client/SPECS/lustre.spec
components/parallel-libs/trilinos/SPECS/trilinos.spec
jobs:
check_spec:
env:
JOB_SKIP_CI_SPECS: |
components/admin/ohpc-filesystem/SPECS/ohpc-filesystem.spec
runs-on: ubuntu-latest
container:
image: docker.io/library/almalinux:10
steps:
- name: Setup
run: |
dnf install -y epel-release git python3
- uses: actions/checkout@v4
- id: files
uses: Ana06/[email protected]
- name: Validate Changes
run: |
export SKIP_CI_SPECS="${{ env.SKIP_CI_SPECS }}${{ env.JOB_SKIP_CI_SPECS }}"
tests/ci/check_spec.py ${{ steps.files.outputs.added_modified }}
lint_markdown:
name: Run markdown linter
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Lint markdown
uses: DavidAnson/markdownlint-cli2-action@v15
with:
globs: |
README.md
CONTRIBUTING.md
containers/README.md
.github/workflows/README.md
lint:
strategy:
matrix:
step: [codespell, ruff-check, ruff-format, shellcheck, whitespace, shfmt, clang-format]
name: Run ${{ matrix.step }} linter
runs-on: ubuntu-latest
container:
image: registry.fedoraproject.org/fedora:latest
steps:
- name: Setup
run: dnf -y install codespell make ruff ShellCheck shfmt clang-tools-extra git
- uses: actions/checkout@v4
- name: Run ${{ matrix.step }}
run: make -C tests/ci/ ${{ matrix.step }}-lint
build_on_rhel:
strategy:
matrix:
os: [ubuntu-latest, ubuntu-24.04-arm]
compiler: [gnu15, intel]
exclude:
- os: ubuntu-24.04-arm
compiler: intel
runs-on: ${{ matrix.os }}
name: Build on RHEL (${{ matrix.os }}/${{ matrix.compiler}})
container:
image: docker.io/library/almalinux:10
volumes:
- /usr:/host/usr
- /opt:/host/opt
steps:
- name: Delete unneeded tools on the host
# Needed to have enough space to install the Intel compiler
run: |
rm -rf /host/usr/share/dotnet /host/usr/local/lib/android /host/opt/ghc
- name: Install git
run: dnf -y install git
- uses: actions/checkout@v4
- name: Setup
run: tests/ci/prepare-ci-environment.sh ${{ matrix.compiler }}
- id: files
uses: Ana06/[email protected]
- name: Validate Build
run: |
export SKIP_CI_SPECS="${{ env.SKIP_CI_SPECS }}"
if [ "${{ matrix.compiler }}" == "intel" ]; then
export SKIP_CI_SPECS="${SKIP_CI_SPECS} components/serial-libs/openblas/SPECS/openblas.spec"
export SKIP_CI_SPECS="${SKIP_CI_SPECS} components/dev-tools/scipy/SPECS/python-scipy.spec"
export SKIP_CI_SPECS="${SKIP_CI_SPECS} components/serial-libs/R/SPECS/R.spec"
export SKIP_CI_SPECS="${SKIP_CI_SPECS} components/parallel-libs/opencoarrays/SPECS/opencoarrays.spec"
fi
if [ "${{ matrix.os }}" == "ubuntu-24.04-arm" ]; then
export SKIP_CI_SPECS="${SKIP_CI_SPECS} components/compiler-families/intel-compilers-devel/SPECS/intel-compilers-devel.spec"
export SKIP_CI_SPECS="${SKIP_CI_SPECS} components/mpi-families/impi-devel/SPECS/intel-mpi.spec"
export SKIP_CI_SPECS="${SKIP_CI_SPECS} components/perf-tools/geopm/SPECS/geopm.spec"
export SKIP_CI_SPECS="${SKIP_CI_SPECS} components/perf-tools/likwid/SPECS/likwid.spec"
fi
. /etc/profile.d/lmod.sh
tests/ci/run_build.py ohpc ${{ steps.files.outputs.added_modified }} --compiler-family ${{ matrix.compiler }}
touch /tmp/empty
- uses: actions/upload-artifact@v4
with:
name: rhel-rpms-${{ matrix.compiler }}-${{ matrix.os }}
retention-days: 1
path: |
/home/ohpc/rpmbuild/RPMS/aarch64/*rpm
/home/ohpc/rpmbuild/RPMS/noarch/*rpm
/home/ohpc/rpmbuild/RPMS/x86_64/*rpm
/tmp/empty
test_on_rhel:
strategy:
matrix:
os: [ubuntu-latest, ubuntu-24.04-arm]
compiler: [gnu15, intel]
exclude:
- os: ubuntu-24.04-arm
compiler: intel
runs-on: ${{ matrix.os }}
name: Test on RHEL (${{ matrix.os }}/${{ matrix.compiler}})
env:
JOB_SKIP_CI_SPECS: |
components/perf-tools/likwid/SPECS/likwid.spec
components/perf-tools/papi/SPECS/papi.spec
container:
image: docker.io/library/almalinux:10
options: --privileged
volumes:
- /usr:/host/usr
- /opt:/host/opt
needs: build_on_rhel
steps:
- name: Delete unneeded tools on the host
# Needed to have enough space to install the Intel compiler
run: |
rm -rf /host/usr/share/dotnet /host/usr/local/lib/android /host/opt/ghc
- name: Install git
run: dnf -y install git
- uses: actions/checkout@v4
- name: Setup
run: tests/ci/prepare-ci-environment.sh ${{ matrix.compiler }}
- id: files
uses: Ana06/[email protected]
- uses: actions/download-artifact@v4
with:
name: rhel-rpms-${{ matrix.compiler }}-${{ matrix.os }}
path: /home/ohpc/rpmbuild/RPMS
- name: Run CI Tests
run: |
export SKIP_CI_SPECS="${{ env.SKIP_CI_SPECS }}${{ env.JOB_SKIP_CI_SPECS }}"
if [ "${{ matrix.compiler }}" == "intel" ]; then
export SKIP_CI_SPECS="${SKIP_CI_SPECS} components/serial-libs/openblas/SPECS/openblas.spec"
export SKIP_CI_SPECS="${SKIP_CI_SPECS} components/dev-tools/scipy/SPECS/python-scipy.spec"
export SKIP_CI_SPECS="${SKIP_CI_SPECS} components/dev-tools/spack/SPECS/spack.spec"
export SKIP_CI_SPECS="${SKIP_CI_SPECS} components/dev-tools/cmake/SPECS/cmake.spec"
export SKIP_CI_SPECS="${SKIP_CI_SPECS} components/serial-libs/R/SPECS/R.spec"
export SKIP_CI_SPECS="${SKIP_CI_SPECS} components/parallel-libs/opencoarrays/SPECS/opencoarrays.spec"
fi
if [ "${{ matrix.os }}" == "ubuntu-24.04-arm" ]; then
export SKIP_CI_SPECS="${SKIP_CI_SPECS} components/compiler-families/intel-compilers-devel/SPECS/intel-compilers-devel.spec"
export SKIP_CI_SPECS="${SKIP_CI_SPECS} components/mpi-families/impi-devel/SPECS/intel-mpi.spec"
export SKIP_CI_SPECS="${SKIP_CI_SPECS} components/perf-tools/geopm/SPECS/geopm.spec"
export SKIP_CI_SPECS="${SKIP_CI_SPECS} components/perf-tools/likwid/SPECS/likwid.spec"
fi
. /etc/profile.d/lmod.sh
chown ohpc -R tests
tests/ci/setup_slurm_and_run_tests.sh ohpc ${{ matrix.compiler }} ${{ steps.files.outputs.added_modified }}
- name: Upload Test Results
# To display test results from forked repositories they need to
# be uploaded and then analyzed.
if: always()
uses: actions/upload-artifact@v4
with:
name: test-results-${{ matrix.compiler }}-${{ matrix.os }}
retention-days: 1
path: tests/**/*.log.xml
build_on_openEuler:
strategy:
matrix:
os: [ubuntu-latest, ubuntu-24.04-arm]
env:
JOB_SKIP_CI_SPECS: |
components/provisioning/warewulf/SPECS/warewulf.spec
runs-on: ${{ matrix.os }}
name: Build on openEuler (${{ matrix.os }})
container:
image: docker.io/openeuler/openeuler:24.03-lts-sp2
steps:
- name: Switch repo
run: sed -i "[email protected]@repo.huaweicloud.com/openeuler@g" /etc/yum.repos.d/openEuler.repo
- name: Install git
run: dnf -y install git
- uses: actions/checkout@v4
- name: Setup
run: tests/ci/prepare-ci-environment.sh ${{ matrix.compiler }}
- id: files
uses: Ana06/[email protected]
- name: Validate Build
run: |
export SKIP_CI_SPECS="${{ env.SKIP_CI_SPECS }}${{ env.JOB_SKIP_CI_SPECS }}"
if [ "${{ matrix.os }}" == "ubuntu-24.04-arm" ]; then
export SKIP_CI_SPECS="${SKIP_CI_SPECS} components/compiler-families/intel-compilers-devel/SPECS/intel-compilers-devel.spec"
export SKIP_CI_SPECS="${SKIP_CI_SPECS} components/mpi-families/impi-devel/SPECS/intel-mpi.spec"
export SKIP_CI_SPECS="${SKIP_CI_SPECS} components/perf-tools/geopm/SPECS/geopm.spec"
export SKIP_CI_SPECS="${SKIP_CI_SPECS} components/perf-tools/likwid/SPECS/likwid.spec"
fi
. /etc/profile.d/lmod.sh
tests/ci/run_build.py ohpc ${{ steps.files.outputs.added_modified }}
touch /tmp/empty
- uses: actions/upload-artifact@v4
with:
name: openEuler-rpms-${{ matrix.os }}
retention-days: 1
path: |
/home/ohpc/rpmbuild/RPMS/aarch64/*rpm
/home/ohpc/rpmbuild/RPMS/noarch/*rpm
/home/ohpc/rpmbuild/RPMS/x86_64/*rpm
/tmp/empty
test_on_openEuler:
strategy:
matrix:
compiler: [gnu15]
os: [ubuntu-latest, ubuntu-24.04-arm]
env:
JOB_SKIP_CI_SPECS: |
components/runtimes/charliecloud/SPECS/charliecloud.spec
components/perf-tools/likwid/SPECS/likwid.spec
components/provisioning/warewulf/SPECS/warewulf.spec
components/perf-tools/papi/SPECS/papi.spec
runs-on: ${{ matrix.os }}
name: Test on openEuler (${{ matrix.os }}/${{ matrix.compiler}})
container:
image: docker.io/openeuler/openeuler:24.03-lts-sp2
needs: build_on_openEuler
steps:
- name: Switch repo
run: sed -i "[email protected]@repo.huaweicloud.com/openeuler@g" /etc/yum.repos.d/openEuler.repo
- name: Install git
run: dnf -y install git
- uses: actions/checkout@v4
- name: Setup
run: tests/ci/prepare-ci-environment.sh ${{ matrix.compiler }}
- id: files
uses: Ana06/[email protected]
- uses: actions/download-artifact@v4
with:
name: openEuler-rpms-${{ matrix.os }}
path: /home/ohpc/rpmbuild/RPMS
- name: Run CI Tests
run: |
export SKIP_CI_SPECS="${{ env.SKIP_CI_SPECS }}${{ env.JOB_SKIP_CI_SPECS }}"
if [ "${{ matrix.os }}" == "ubuntu-24.04-arm" ]; then
export SKIP_CI_SPECS="${SKIP_CI_SPECS} components/compiler-families/intel-compilers-devel/SPECS/intel-compilers-devel.spec"
export SKIP_CI_SPECS="${SKIP_CI_SPECS} components/mpi-families/impi-devel/SPECS/intel-mpi.spec"
export SKIP_CI_SPECS="${SKIP_CI_SPECS} components/perf-tools/geopm/SPECS/geopm.spec"
export SKIP_CI_SPECS="${SKIP_CI_SPECS} components/perf-tools/likwid/SPECS/likwid.spec"
fi
. /etc/profile.d/lmod.sh
chown ohpc -R tests
tests/ci/setup_slurm_and_run_tests.sh ohpc ${{ matrix.compiler }} ${{ steps.files.outputs.added_modified }}
event_file:
name: "Event File"
runs-on: ubuntu-latest
steps:
- name: Upload
if: always()
uses: actions/upload-artifact@v4
with:
name: event-file
retention-days: 1
path: ${{ github.event_path }}
test_parse_doc:
name: Run bats tests
runs-on: ubuntu-latest
strategy:
matrix:
parser: ["python", "perl"]
container:
image: registry.fedoraproject.org/fedora:latest
steps:
- name: Setup
run: dnf -y install bats python3
- uses: actions/checkout@v4
- name: Run bats tests
run: PARSE_DOC_TEST_IMPL="${{ matrix.parser }}" ./tests/ci/test_parse_doc.bats