|
16 | 16 |
|
17 | 17 | jobs:
|
18 | 18 |
|
19 |
| - container: |
20 |
| - runs-on: ubuntu-latest |
21 |
| - timeout-minutes: 300 |
| 19 | + # container: |
| 20 | + # runs-on: ubuntu-latest |
| 21 | + # timeout-minutes: 300 |
| 22 | + |
| 23 | + # steps: |
| 24 | + # - name: Check out |
| 25 | + # if: always() |
| 26 | + # uses: actions/checkout@v4 |
| 27 | + # with: |
| 28 | + # fetch-depth: 0 |
| 29 | + |
| 30 | + # # - uses: hadolint/[email protected] |
| 31 | + # # with: |
| 32 | + # # dockerfile: Dockerfile |
| 33 | + # # ignore: 'DL3008,DL3013' |
| 34 | + # # verbose: true |
| 35 | + |
| 36 | + # - name: Build Image |
| 37 | + # id: build_image |
| 38 | + # uses: redhat-actions/buildah-build@v2 |
| 39 | + # with: |
| 40 | + # image: ${{ env.IMAGE_NAME }} |
| 41 | + # tags: ${{ env.IMAGE_TAGS }} |
| 42 | + # containerfiles: | |
| 43 | + # ./Dockerfile |
| 44 | + # build-args: | |
| 45 | + # PYNUCLEUS_BUILD_PARALLELISM=4 |
| 46 | + |
| 47 | + # - name: Run tests |
| 48 | + # run: | |
| 49 | + # podman run \ |
| 50 | + # -e MPIEXEC_FLAGS="--allow-run-as-root --oversubscribe" \ |
| 51 | + # --workdir /pynucleus \ |
| 52 | + # --rm \ |
| 53 | + # --entrypoint='["python3", "-m", "pytest", "--junit-xml", "test-results.xml"]' \ |
| 54 | + # ${{ steps.build_image.outputs.image }}:${{ github.sha }} |
| 55 | + |
| 56 | + # - name: Push To GHCR |
| 57 | + # if: github.event_name == 'push' |
| 58 | + # uses: redhat-actions/push-to-registry@v2 |
| 59 | + # id: push |
| 60 | + # with: |
| 61 | + # image: ${{ steps.build_image.outputs.image }} |
| 62 | + # tags: ${{ steps.build_image.outputs.tags }} |
| 63 | + # registry: ${{ env.IMAGE_REGISTRY }} |
| 64 | + # username: ${{ env.REGISTRY_USER }} |
| 65 | + # password: ${{ env.REGISTRY_PASSWORD }} |
| 66 | + # extra-args: | |
| 67 | + # --disable-content-trust |
| 68 | + |
| 69 | + # - name: Echo outputs |
| 70 | + # if: github.event_name == 'push' |
| 71 | + # run: | |
| 72 | + # echo "${{ toJSON(steps.push.outputs) }}" |
| 73 | + |
| 74 | + # container-test: |
| 75 | + # needs: container |
| 76 | + # if: github.event_name == 'push' |
| 77 | + |
| 78 | + # strategy: |
| 79 | + # matrix: |
| 80 | + # include: |
| 81 | + # - runner: 'ubuntu-latest' |
| 82 | + |
| 83 | + # name: Container test ${{ matrix.runner }} |
| 84 | + # runs-on: ${{ matrix.runner }} |
| 85 | + |
| 86 | + # steps: |
| 87 | + # - name: Check out |
| 88 | + # uses: actions/checkout@v4 |
| 89 | + |
| 90 | + # - name: Install podman-compose |
| 91 | + # run: pip install podman-compose |
| 92 | + |
| 93 | + # - name: Run container test |
| 94 | + # run: podman-compose run quick-test |
| 95 | + |
| 96 | + container-test-mac: |
| 97 | + # needs: container |
| 98 | + # if: github.event_name == 'push' |
| 99 | + |
| 100 | + name: Container test MacOS |
| 101 | + runs-on: macos-latest |
22 | 102 |
|
23 | 103 | steps:
|
24 | 104 | - name: Check out
|
25 |
| - if: always() |
26 | 105 | uses: actions/checkout@v4
|
27 |
| - with: |
28 |
| - fetch-depth: 0 |
29 |
| - |
30 |
| - # - uses: hadolint/[email protected] |
31 |
| - # with: |
32 |
| - # dockerfile: Dockerfile |
33 |
| - # ignore: 'DL3008,DL3013' |
34 |
| - # verbose: true |
35 |
| - |
36 |
| - - name: Build Image |
37 |
| - id: build_image |
38 |
| - uses: redhat-actions/buildah-build@v2 |
39 |
| - with: |
40 |
| - image: ${{ env.IMAGE_NAME }} |
41 |
| - tags: ${{ env.IMAGE_TAGS }} |
42 |
| - containerfiles: | |
43 |
| - ./Dockerfile |
44 |
| - build-args: | |
45 |
| - PYNUCLEUS_BUILD_PARALLELISM=4 |
46 |
| -
|
47 |
| - - name: Run tests |
48 |
| - run: | |
49 |
| - podman run \ |
50 |
| - -e MPIEXEC_FLAGS="--allow-run-as-root --oversubscribe" \ |
51 |
| - --workdir /pynucleus \ |
52 |
| - --rm \ |
53 |
| - --entrypoint='["python3", "-m", "pytest", "--junit-xml", "test-results.xml"]' \ |
54 |
| - ${{ steps.build_image.outputs.image }}:${{ github.sha }} |
55 |
| -
|
56 |
| - - name: Push To GHCR |
57 |
| - if: github.event_name == 'push' |
58 |
| - uses: redhat-actions/push-to-registry@v2 |
59 |
| - id: push |
60 |
| - with: |
61 |
| - image: ${{ steps.build_image.outputs.image }} |
62 |
| - tags: ${{ steps.build_image.outputs.tags }} |
63 |
| - registry: ${{ env.IMAGE_REGISTRY }} |
64 |
| - username: ${{ env.REGISTRY_USER }} |
65 |
| - password: ${{ env.REGISTRY_PASSWORD }} |
66 |
| - extra-args: | |
67 |
| - --disable-content-trust |
68 |
| -
|
69 |
| - - name: Echo outputs |
70 |
| - if: github.event_name == 'push' |
| 106 | + |
| 107 | + - name: Install colima |
71 | 108 | run: |
|
72 |
| - echo "${{ toJSON(steps.push.outputs) }}" |
| 109 | + brew install docker \ |
| 110 | + colima start |
| 111 | +
|
| 112 | + - name: Run container test |
| 113 | + run: docker run --entrypoint="mpiexec -n 4 /pynucleus/drivers/runFractional.py" ghcr.io/sandialabs/pynucleus:latest |
0 commit comments