spack #6
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 | |
| # Copy package directly into Spack's builtin repo | |
| mkdir -p spack/var/spack/repos/builtin/packages/mfc | |
| cp packaging/spack/package.py spack/var/spack/repos/builtin/packages/mfc/ | |
| - name: Run Spack Style Check | |
| run: | | |
| . spack/share/spack/setup-env.sh | |
| spack style spack/var/spack/repos/builtin/packages/mfc/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 | |
| # Copy package directly into Spack's builtin repo | |
| mkdir -p spack/var/spack/repos/builtin/packages/mfc | |
| cp packaging/spack/package.py spack/var/spack/repos/builtin/packages/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 |