spack #4
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: Create Spack Repository | |
| run: | | |
| . spack/share/spack/setup-env.sh | |
| spack repo create mfc-repo mfc | |
| mkdir -p mfc-repo/spack_repo/mfc/packages/mfc | |
| cp packaging/spack/package.py mfc-repo/spack_repo/mfc/packages/mfc/ | |
| spack repo add mfc-repo/spack_repo/mfc | |
| - name: Run Spack Style Check | |
| run: | | |
| . spack/share/spack/setup-env.sh | |
| spack style mfc-repo/spack_repo/mfc/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: Create Spack Repository | |
| run: | | |
| . spack/share/spack/setup-env.sh | |
| spack repo create mfc-repo mfc | |
| mkdir -p mfc-repo/spack_repo/mfc/packages/mfc | |
| cp packaging/spack/package.py mfc-repo/spack_repo/mfc/packages/mfc/ | |
| spack repo add mfc-repo/spack_repo/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 |