Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attempt to use colima to run docker on mac #40

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: CI

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
# push:
# branches: [ "master" ]
# pull_request:
# branches: [ "master" ]
workflow_dispatch:


Expand Down
137 changes: 88 additions & 49 deletions .github/workflows/container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,57 +16,96 @@ env:

jobs:

container:
runs-on: ubuntu-latest
timeout-minutes: 300
# container:
# runs-on: ubuntu-latest
# timeout-minutes: 300

# steps:
# - name: Check out
# if: always()
# uses: actions/checkout@v4
# with:
# fetch-depth: 0

# # - uses: hadolint/[email protected]
# # with:
# # dockerfile: Dockerfile
# # ignore: 'DL3008,DL3013'
# # verbose: true

# - name: Build Image
# id: build_image
# uses: redhat-actions/buildah-build@v2
# with:
# image: ${{ env.IMAGE_NAME }}
# tags: ${{ env.IMAGE_TAGS }}
# containerfiles: |
# ./Dockerfile
# build-args: |
# PYNUCLEUS_BUILD_PARALLELISM=4

# - name: Run tests
# run: |
# podman run \
# -e MPIEXEC_FLAGS="--allow-run-as-root --oversubscribe" \
# --workdir /pynucleus \
# --rm \
# --entrypoint='["python3", "-m", "pytest", "--junit-xml", "test-results.xml"]' \
# ${{ steps.build_image.outputs.image }}:${{ github.sha }}

# - name: Push To GHCR
# if: github.event_name == 'push'
# uses: redhat-actions/push-to-registry@v2
# id: push
# with:
# image: ${{ steps.build_image.outputs.image }}
# tags: ${{ steps.build_image.outputs.tags }}
# registry: ${{ env.IMAGE_REGISTRY }}
# username: ${{ env.REGISTRY_USER }}
# password: ${{ env.REGISTRY_PASSWORD }}
# extra-args: |
# --disable-content-trust

# - name: Echo outputs
# if: github.event_name == 'push'
# run: |
# echo "${{ toJSON(steps.push.outputs) }}"

# container-test:
# needs: container
# if: github.event_name == 'push'

# strategy:
# matrix:
# include:
# - runner: 'ubuntu-latest'

# name: Container test ${{ matrix.runner }}
# runs-on: ${{ matrix.runner }}

# steps:
# - name: Check out
# uses: actions/checkout@v4

# - name: Install podman-compose
# run: pip install podman-compose

# - name: Run container test
# run: podman-compose run quick-test

container-test-mac:
# needs: container
# if: github.event_name == 'push'

name: Container test MacOS
runs-on: macos-latest

steps:
- name: Check out
if: always()
uses: actions/checkout@v4
with:
fetch-depth: 0

# - uses: hadolint/[email protected]
# with:
# dockerfile: Dockerfile
# ignore: 'DL3008,DL3013'
# verbose: true

- name: Build Image
id: build_image
uses: redhat-actions/buildah-build@v2
with:
image: ${{ env.IMAGE_NAME }}
tags: ${{ env.IMAGE_TAGS }}
containerfiles: |
./Dockerfile
build-args: |
PYNUCLEUS_BUILD_PARALLELISM=4

- name: Run tests
run: |
podman run \
-e MPIEXEC_FLAGS="--allow-run-as-root --oversubscribe" \
--workdir /pynucleus \
--rm \
--entrypoint='["python3", "-m", "pytest", "--junit-xml", "test-results.xml"]' \
${{ steps.build_image.outputs.image }}:${{ github.sha }}

- name: Push To GHCR
if: github.event_name == 'push'
uses: redhat-actions/push-to-registry@v2
id: push
with:
image: ${{ steps.build_image.outputs.image }}
tags: ${{ steps.build_image.outputs.tags }}
registry: ${{ env.IMAGE_REGISTRY }}
username: ${{ env.REGISTRY_USER }}
password: ${{ env.REGISTRY_PASSWORD }}
extra-args: |
--disable-content-trust

- name: Echo outputs
if: github.event_name == 'push'

- name: Run container
run: |
echo "${{ toJSON(steps.push.outputs) }}"
brew install docker && \
colima start --runtime docker && \
docker run --entrypoint="mpiexec -n 4 /pynucleus/drivers/runFractional.py" ghcr.io/sandialabs/pynucleus:latest
5 changes: 3 additions & 2 deletions .github/workflows/documentation-ci.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
name: Documentation CI

on:
pull_request:
branches: [ "master" ]
# pull_request:
# branches: [ "master" ]
workflow_dispatch:

permissions:
contents: read
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Documentation

on:
push:
branches: [ "master" ]
# push:
# branches: [ "master" ]
workflow_dispatch:

permissions:
Expand Down
Loading