|
59 | 59 | files: lcov.info |
60 | 60 | token: ${{ secrets.CODECOV_TOKEN }} |
61 | 61 | fail_ci_if_error: false |
62 | | - |
63 | | - test-strumpack: |
64 | | - name: Test with STRUMPACK |
65 | | - runs-on: ubuntu-latest |
66 | | - timeout-minutes: 30 |
67 | | - |
68 | | - env: |
69 | | - PETSC_RELEASE_TAG: petsc-strumpack |
70 | | - |
71 | | - steps: |
72 | | - - uses: actions/checkout@v4 |
73 | | - |
74 | | - - name: Install CUDA runtime |
75 | | - run: | |
76 | | - sudo apt-get update |
77 | | - # Only install CUDA runtime (MPI is bundled in the tarball) |
78 | | - sudo apt-get install -y nvidia-cuda-toolkit |
79 | | -
|
80 | | - - uses: julia-actions/setup-julia@v2 |
81 | | - with: |
82 | | - version: '1.10' |
83 | | - arch: x64 |
84 | | - |
85 | | - # Note: Intentionally NOT using julia-actions/cache@v2 here |
86 | | - # The cache would restore MPI.jl compiled against JLL MPI, conflicting |
87 | | - # with the bundled MPICH in the pre-built PETSc tarball |
88 | | - |
89 | | - - name: Download pre-built PETSc STRUMPACK |
90 | | - run: | |
91 | | - echo "Downloading $PETSC_RELEASE_TAG..." |
92 | | - gh release download $PETSC_RELEASE_TAG --pattern "*.tar.gz" --dir /tmp |
93 | | - echo "Extracting..." |
94 | | - mkdir -p /tmp/petsc_strumpack |
95 | | - tar -xzf /tmp/${PETSC_RELEASE_TAG}.tar.gz -C /tmp/petsc_strumpack |
96 | | - echo "Done. Library at /tmp/petsc_strumpack/lib/libpetsc.so" |
97 | | - echo "Contents of lib/:" |
98 | | - ls -la /tmp/petsc_strumpack/lib/ |
99 | | - echo "Contents of bin/:" |
100 | | - ls -la /tmp/petsc_strumpack/bin/ |
101 | | - env: |
102 | | - GH_TOKEN: ${{ github.token }} |
103 | | - |
104 | | - - name: Configure MPI to use bundled MPICH |
105 | | - run: | |
106 | | - # Write LocalPreferences.toml directly to configure MPI.jl |
107 | | - # This will be picked up by julia-buildpkg |
108 | | - cat > LocalPreferences.toml << 'EOF' |
109 | | - [MPIPreferences] |
110 | | - _format = "1.0" |
111 | | - abi = "MPICH" |
112 | | - binary = "system" |
113 | | - libmpi = "/tmp/petsc_strumpack/lib/libmpi.so" |
114 | | - mpiexec = "/tmp/petsc_strumpack/bin/mpiexec" |
115 | | - EOF |
116 | | - # Remove leading whitespace from TOML (heredoc includes YAML indentation) |
117 | | - sed -i 's/^[[:space:]]*//' LocalPreferences.toml |
118 | | - echo "LocalPreferences.toml:" |
119 | | - cat LocalPreferences.toml |
120 | | -
|
121 | | - - name: Build package |
122 | | - env: |
123 | | - LD_LIBRARY_PATH: /tmp/petsc_strumpack/lib |
124 | | - uses: julia-actions/julia-buildpkg@v1 |
125 | | - |
126 | | - - name: Verify MPI configuration |
127 | | - env: |
128 | | - LD_LIBRARY_PATH: /tmp/petsc_strumpack/lib |
129 | | - run: | |
130 | | - julia --project=. -e ' |
131 | | - using MPI |
132 | | - println("MPI library: ", MPI.libmpi) |
133 | | - println("mpiexec: ", MPI.mpiexec()) |
134 | | - ' |
135 | | -
|
136 | | - - name: Run tests with STRUMPACK |
137 | | - env: |
138 | | - JULIA_PETSC_LIBRARY: /tmp/petsc_strumpack/lib/libpetsc.so |
139 | | - LD_LIBRARY_PATH: /tmp/petsc_strumpack/lib |
140 | | - MPIEXEC_PATH: /tmp/petsc_strumpack/bin/mpiexec |
141 | | - run: | |
142 | | - # Run tests directly instead of Pkg.test() to preserve LocalPreferences.toml |
143 | | - # (Pkg.test() creates a fresh temp environment that loses MPI preferences) |
144 | | - julia --project=. test/runtests.jl |
0 commit comments