spack #10
Workflow file for this run
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: 'Spack Package' | |
| on: | |
| push: | |
| paths: | |
| - 'packaging/spack/**' | |
| - '.github/workflows/spack.yml' | |
| pull_request: | |
| paths: | |
| - 'packaging/spack/**' | |
| - '.github/workflows/spack.yml' | |
| workflow_dispatch: | |
| jobs: | |
| lint: | |
| name: Spack Lint & Style Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout MFC | |
| uses: actions/checkout@v4 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Install Spack | |
| run: | | |
| git clone --depth=1 https://github.com/spack/spack.git | |
| echo "${GITHUB_WORKSPACE}/spack/bin" >> $GITHUB_PATH | |
| - name: Setup Spack | |
| run: | | |
| . spack/share/spack/setup-env.sh | |
| spack compiler find | |
| - name: Install Package into Spack | |
| run: | | |
| . spack/share/spack/setup-env.sh | |
| # Find the actual builtin repo location | |
| BUILTIN_REPO=$(spack repo list | grep builtin | awk '{print $NF}') | |
| echo "Builtin repo location: $BUILTIN_REPO" | |
| # Copy package to the builtin repo | |
| mkdir -p "$BUILTIN_REPO/packages/mfc" | |
| cp packaging/spack/package.py "$BUILTIN_REPO/packages/mfc/" | |
| # Verify package is visible | |
| spack list mfc | |
| # Show package info to confirm it loads | |
| spack info mfc | |
| - name: Run Spack Style Check | |
| run: | | |
| . spack/share/spack/setup-env.sh | |
| # Skip flake8 F405 warnings which are expected for star imports in Spack packages | |
| spack style --no-flake8 packaging/spack/package.py | |
| - name: Run Spack Audit | |
| run: | | |
| . spack/share/spack/setup-env.sh | |
| spack audit packages mfc | |
| - name: Verify Package Info | |
| run: | | |
| . spack/share/spack/setup-env.sh | |
| spack info mfc | |
| test-spec: | |
| name: Test Package Spec | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout MFC | |
| uses: actions/checkout@v4 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Install Spack | |
| run: | | |
| git clone --depth=1 https://github.com/spack/spack.git | |
| echo "${GITHUB_WORKSPACE}/spack/bin" >> $GITHUB_PATH | |
| - name: Setup Spack | |
| run: | | |
| . spack/share/spack/setup-env.sh | |
| spack compiler find | |
| - name: Install Package into Spack | |
| run: | | |
| . spack/share/spack/setup-env.sh | |
| # Find the actual builtin repo location | |
| BUILTIN_REPO=$(spack repo list | grep builtin | awk '{print $NF}') | |
| echo "Builtin repo location: $BUILTIN_REPO" | |
| # Copy package to the builtin repo | |
| mkdir -p "$BUILTIN_REPO/packages/mfc" | |
| cp packaging/spack/package.py "$BUILTIN_REPO/packages/mfc/" | |
| # Verify package is visible | |
| spack list mfc | |
| # Show package info to confirm it loads | |
| spack info mfc | |
| - name: Test Default Spec | |
| run: | | |
| . spack/share/spack/setup-env.sh | |
| spack spec mfc | |
| - name: Test Minimal Spec | |
| run: | | |
| . spack/share/spack/setup-env.sh | |
| spack spec mfc~mpi~post_process |