Add support for RISC-V repository #18
This file contains hidden or 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: Generate and serve API data for EESSI | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| concurrency: | |
| group: pr-${{ github.event.pull_request.number }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| test_data_generation: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: eessi/github-action-eessi@v3 | |
| with: | |
| use_eessi_module: true | |
| eessi_stack_version: "2025.06" | |
| - name: Create a virtualenv to install zensical | |
| run: | | |
| python -m venv /tmp/venv_docs | |
| source /tmp/venv_docs/bin/activate | |
| pip install zensical | |
| - name: Generate API data | |
| run: | | |
| echo "Generating data files..." | |
| module purge | |
| module unuse $MODULEPATH | |
| module use /cvmfs/software.eessi.io/init/modules/ | |
| # Set CPU override for the stack to query | |
| export EESSI_ARCHDETECT_OPTIONS_OVERRIDE="x86_64/intel/icelake" | |
| # Set GPU overrides for the stack to query (we have no GPU, so also override the GPU check) | |
| export EESSI_ACCELERATOR_TARGET_OVERRIDE="accel/nvidia/cc90" | |
| export EESSI_OVERRIDE_GPU_CHECK=1 | |
| # Only do 2023.06 for EB 5 since this is just a test | |
| ( | |
| module purge | |
| module load EESSI/2023.06 | |
| module load EasyBuild/5 | |
| module load EESSI-extend | |
| python scripts/generate_data_files.py --eessi-version=2023.06 | |
| ) & | |
| # Merge all these results together | |
| wait | |
| python scripts/merge_data_files.py out.yaml eessi*.yaml | |
| mv out.yaml docs/data/eessi_software_metadata.yaml | |
| # Also test RISC-V | |
| rm eessi*.yaml | |
| # Need to set environment variables to load EESSI module for RISC-V | |
| ( | |
| module purge | |
| export EESSI_DEBUG_INIT=1 | |
| export EESSI_VERSION_OVERRIDE=2025.06-001 | |
| export EESSI_ARCHDETECT_OPTIONS_OVERRIDE=riscv64/generic | |
| export EESSI_ACCELERATOR_TARGET_OVERRIDE="doesnotexist" | |
| # Need to fake uname to convince EESSI we are on a RISC-V system | |
| uname() { echo "riscv64"; } | |
| export -f uname | |
| module load EESSI/2025.06 | |
| # Can't run RISC-V binaries from compat layer so remove them | |
| export PATH=$(echo "$PATH" | /usr/bin/tr ':' '\n' | /usr/bin/grep -v '^/cvmfs' | /usr/bin/paste -sd ':' -) | |
| module load EasyBuild/5 | |
| module load EESSI-extend | |
| python scripts/generate_data_files.py --eessi-version 2025.06-001 --repository "dev.eessi.io/riscv" | |
| ) | |
| python scripts/merge_data_files.py out_riscv.yaml eessi*.yaml | |
| mv out_riscv.yaml docs/data/eessi_software_metadata-riscv.yaml | |
| # Generate json data files and markdown index/description for them | |
| cd docs/data | |
| python ../../scripts/process_eessi_software_metadata.py eessi_software_metadata.yaml eessi_api_metadata | |
| python ../../scripts/process_eessi_software_metadata.py eessi_software_metadata-riscv.yaml eessi_api_metadata-riscv | |
| python ../../scripts/calculate_hashes.py | |
| for json_file in eessi_api_metadata_*.json; do | |
| python ../../scripts/generate_schema_md.py $json_file >> index.md | |
| done | |
| echo "" >> index.md | |
| echo "### RISC-V datafiles" >> index.md | |
| echo "" >> index.md | |
| for json_file in eessi_api_metadata-riscv*.json; do | |
| python ../../scripts/generate_schema_md.py $json_file >> index.md | |
| done | |
| - name: Test building the website | |
| run: | | |
| source /tmp/venv_docs/bin/activate | |
| zensical build --clean | |
| - name: Upload EESSI API metadata | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: eessi-api-metadata | |
| path: docs/data/eessi_api_metadata*software*.json |