|
1 | | -version: "3.9" |
2 | | - |
3 | | -x-fenix: &fenix |
4 | | - build: &fenix-build |
5 | | - context: ./ |
6 | | - dockerfile: .github/Dockerfile |
7 | | - args: |
8 | | - OPENMPI_REPO: open-mpi/ompi |
9 | | - OPENMPI_VERS_PREFIX: tags |
10 | | - OPENMPI_VERS: v5.0.0rc10 |
11 | | - #Caches should be manually scoped, or they'll conflict. |
12 | | - x-bake: |
13 | | - cache-from: |
14 | | - - type=gha,scope=default |
15 | | - cache-to: |
16 | | - - type=gha,scope=default,mode=max |
17 | | - |
18 | 1 | services: |
19 | | - #fenix_ompi_5rc10: |
20 | | - # <<: *fenix |
21 | | - # image: "fenix:ompi_5rc10" |
22 | | - # build: |
23 | | - # <<: *fenix-build |
24 | | - # x-bake: |
25 | | - # cache-from: |
26 | | - # - type=gha,scope=ompi_5rc10 |
27 | | - # cache-to: |
28 | | - # - type=gha,scope=ompi_5rc10,mode=max |
29 | | - |
30 | | - fenix_ompi_5: |
31 | | - <<: *fenix |
32 | | - image: "fenix:ompi_5" |
| 2 | + bootstrap: |
| 3 | + image: "local/bootstrap" |
33 | 4 | build: |
34 | | - <<: *fenix-build |
| 5 | + dockerfile_inline: | |
| 6 | + FROM spack/ubuntu-focal:0.21.3 |
| 7 | + VOLUME /configs |
| 8 | + ARG ompi_version |
| 9 | + ENV ompi_version=$$ompi_version |
| 10 | + CMD cp /configs/spack.yaml . && \ |
| 11 | + spack -e . add openmpi@$${ompi_version} && \ |
| 12 | + spack -e . containerize >/configs/spack.Dockerfile |
35 | 13 | args: |
36 | | - - OPENMPI_VERS_PREFIX=heads |
37 | | - - OPENMPI_VERS=v5.0.x |
38 | | - x-bake: |
39 | | - cache-from: |
40 | | - - type=gha,scope=ompi_5 |
41 | | - cache-to: |
42 | | - - type=gha,scope=ompi_5,mode=max |
43 | | - |
44 | | - fenix_ompi_main: |
45 | | - <<: *fenix |
46 | | - image: "fenix:ompi_main" |
| 14 | + ompi_version: main |
| 15 | + no_cache: true |
| 16 | + pull_policy: build |
| 17 | + volumes: |
| 18 | + - .github/:/configs |
| 19 | + |
| 20 | + env: |
| 21 | + image: "local/env" |
47 | 22 | build: |
48 | | - <<: *fenix-build |
49 | | - args: |
50 | | - - OPENMPI_VERS_PREFIX=heads |
51 | | - - OPENMPI_VERS=main |
52 | | - x-bake: |
53 | | - cache-from: |
54 | | - - type=gha,scope=ompi_main |
55 | | - cache-to: |
56 | | - - type=gha,scope=ompi_main,mode=max |
57 | | - |
58 | | - fenix_icldisco_latest: |
59 | | - <<: *fenix |
60 | | - image: "fenix:icldisco_latest" |
| 23 | + # Generated by spack in a previous workflow step |
| 24 | + dockerfile: .github/spack.Dockerfile |
| 25 | + depends_on: |
| 26 | + bootstrap: |
| 27 | + condition: service_completed_successfully |
| 28 | + required: true |
| 29 | + pull_policy: build |
| 30 | + |
| 31 | + |
| 32 | + fenix: |
| 33 | + image: "local/fenix" |
61 | 34 | build: |
62 | | - <<: *fenix-build |
63 | | - args: |
64 | | - - OPENMPI_REPO=icldisco/ompi |
65 | | - - OPENMPI_VERS_PREFIX=heads |
66 | | - - OPENMPI_VERS=ulfm/latest |
67 | | - x-bake: |
68 | | - cache-from: |
69 | | - - type=gha,scope=icldisco_latest |
70 | | - cache-to: |
71 | | - - type=gha,scope=icldisco_latest,mode=max |
72 | | - |
73 | | - #fenix_icldisco_experimental: |
74 | | - # <<: *fenix |
75 | | - # image: fenix/icldisco |
76 | | - # build: |
77 | | - # <<: *fenix-build |
78 | | - # args: |
79 | | - # - OPENMPI_REPO=icldisco/ompi |
80 | | - # - OPENMPI_VERS_PREFIX=heads |
81 | | - # - OPENMPI_VERS=ulfm/experimental |
| 35 | + dockerfile_inline: | |
| 36 | + FROM local/env |
| 37 | + COPY . /fenix |
| 38 | + RUN . /opt/spack-environment/activate.sh && \ |
| 39 | + mkdir -p /fenix/build && \ |
| 40 | + rm -r /fenix/build/* && \ |
| 41 | + cd /fenix/build && \ |
| 42 | + cmake /fenix \ |
| 43 | + -DCMAKE_BUILD_TYPE=Release \ |
| 44 | + -DCMAKE_C_COMPILER=mpicc \ |
| 45 | + -DFENIX_EXAMPLES=ON \ |
| 46 | + -DFENIX_TESTS=ON \ |
| 47 | + -DMPIEXEC_PREFLAGS="--allow-run-as-root;--map-by;:oversubscribe" && \ |
| 48 | + make -j |
| 49 | + |
| 50 | + WORKDIR /fenix/build |
| 51 | + ENTRYPOINT ["/entrypoint.sh"] |
| 52 | + CMD ["ctest", "--output-on-failure"] |
| 53 | + pull_policy: build |
0 commit comments