-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
171 additions
and
174 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,114 +32,114 @@ jobs: | |
echo "IMAGE_TAGS=pr-${{ github.event.number }}" >> $GITHUB_ENV | ||
echo "TEST_IMAGE_TAG=pr-${{ github.event.number }}" >> $GITHUB_ENV | ||
- name: Check out | ||
if: always() | ||
uses: actions/[email protected] | ||
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: Push To GHCR | ||
if: (github.event_name == 'pull_request') && (github.actor != 'dependabot[bot]') | ||
uses: redhat-actions/push-to-registry@v2 | ||
id: push-pr | ||
with: | ||
image: ${{ steps.build_image.outputs.image }} | ||
tags: ${{ env.IMAGE_TAGS }} | ||
registry: ${{ env.IMAGE_REGISTRY }} | ||
username: ${{ env.REGISTRY_USER }} | ||
password: ${{ env.REGISTRY_PASSWORD }} | ||
extra-args: | | ||
--disable-content-trust | ||
- 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 }}:${{ env.TEST_IMAGE_TAG }} | ||
- 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 | ||
|
||
strategy: | ||
matrix: | ||
include: | ||
- runner: 'ubuntu-latest' | ||
|
||
name: Container test ${{ matrix.runner }} | ||
runs-on: ${{ matrix.runner }} | ||
|
||
steps: | ||
- name: Check out | ||
uses: actions/[email protected] | ||
|
||
- name: Install podman-compose | ||
run: pip install podman-compose | ||
|
||
- name: Run container test | ||
run: podman-compose run quick-test | ||
|
||
update-binder-image: | ||
needs: container | ||
if: github.event_name == 'push' | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout binder branch | ||
uses: actions/[email protected] | ||
with: | ||
ref: binder | ||
|
||
- name: Modify Dockerfile | ||
run: | | ||
python generateDockerfile.py ${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.TEST_IMAGE_TAG }} | ||
- name: Create PR | ||
uses: peter-evans/create-pull-request@v6 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
commit-message: "Update Dockerfile" | ||
title: "Update Dockerfile" | ||
body: | | ||
This PR updates the Dockerfile for binder. | ||
branch: binder-update | ||
base: binder | ||
delete-branch: true | ||
# - name: Check out | ||
# if: always() | ||
# uses: actions/[email protected] | ||
# 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: Push To GHCR | ||
# if: (github.event_name == 'pull_request') && (github.actor != 'dependabot[bot]') | ||
# uses: redhat-actions/push-to-registry@v2 | ||
# id: push-pr | ||
# with: | ||
# image: ${{ steps.build_image.outputs.image }} | ||
# tags: ${{ env.IMAGE_TAGS }} | ||
# registry: ${{ env.IMAGE_REGISTRY }} | ||
# username: ${{ env.REGISTRY_USER }} | ||
# password: ${{ env.REGISTRY_PASSWORD }} | ||
# extra-args: | | ||
# --disable-content-trust | ||
|
||
# - 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 }}:${{ env.TEST_IMAGE_TAG }} | ||
|
||
# - 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 | ||
|
||
# strategy: | ||
# matrix: | ||
# include: | ||
# - runner: 'ubuntu-latest' | ||
|
||
# name: Container test ${{ matrix.runner }} | ||
# runs-on: ${{ matrix.runner }} | ||
|
||
# steps: | ||
# - name: Check out | ||
# uses: actions/[email protected] | ||
|
||
# - name: Install podman-compose | ||
# run: pip install podman-compose | ||
|
||
# - name: Run container test | ||
# run: podman-compose run quick-test | ||
|
||
# update-binder-image: | ||
# needs: container | ||
# if: github.event_name == 'push' | ||
|
||
# runs-on: ubuntu-latest | ||
|
||
# steps: | ||
# - name: Checkout binder branch | ||
# uses: actions/[email protected] | ||
# with: | ||
# ref: binder | ||
|
||
# - name: Modify Dockerfile | ||
# run: | | ||
# python generateDockerfile.py ${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.TEST_IMAGE_TAG }} | ||
|
||
# - name: Create PR | ||
# uses: peter-evans/create-pull-request@v6 | ||
# with: | ||
# token: ${{ secrets.GITHUB_TOKEN }} | ||
# commit-message: "Update Dockerfile" | ||
# title: "Update Dockerfile" | ||
# body: | | ||
# This PR updates the Dockerfile for binder. | ||
# branch: binder-update | ||
# base: binder | ||
# delete-branch: true |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,49 +26,49 @@ jobs: | |
- name: Check out repo | ||
uses: actions/[email protected] | ||
|
||
- name: Pull ccache cache | ||
id: ccache-restore | ||
uses: actions/cache/restore@v4 | ||
with: | ||
path: /home/runner/.cache/ccache | ||
key: ccache-documentation-ci | ||
# - name: Pull ccache cache | ||
# id: ccache-restore | ||
# uses: actions/cache/restore@v4 | ||
# with: | ||
# path: /home/runner/.cache/ccache | ||
# key: ccache-documentation-ci | ||
|
||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.11' | ||
# - uses: actions/setup-python@v5 | ||
# with: | ||
# python-version: '3.11' | ||
|
||
- name: Install Ubuntu packages | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install mpi-default-bin mpi-default-dev libmetis-dev libparmetis-dev libsuitesparse-dev ccache | ||
# - name: Install Ubuntu packages | ||
# run: | | ||
# sudo apt-get update | ||
# sudo apt-get install mpi-default-bin mpi-default-dev libmetis-dev libparmetis-dev libsuitesparse-dev ccache | ||
|
||
- name: Install Python dependencies | ||
run: make prereq && make prereq-extra | ||
# - name: Install Python dependencies | ||
# run: make prereq && make prereq-extra | ||
|
||
- name: Install | ||
run: make dev | ||
# - name: Install | ||
# run: make dev | ||
|
||
- name: Remove ccache cache | ||
if: ${{ steps.ccache-restore.outputs.cache-hit }} | ||
shell: bash | ||
env: | ||
GH_TOKEN: ${{ github.token }} | ||
run: | | ||
gh extension install actions/gh-actions-cache | ||
gh actions-cache delete ccache --confirm | ||
continue-on-error: true | ||
# - name: Remove ccache cache | ||
# if: ${{ steps.ccache-restore.outputs.cache-hit }} | ||
# shell: bash | ||
# env: | ||
# GH_TOKEN: ${{ github.token }} | ||
# run: | | ||
# gh extension install actions/gh-actions-cache | ||
# gh actions-cache delete ccache --confirm | ||
# continue-on-error: true | ||
|
||
- name: Push ccache cache | ||
uses: actions/cache/save@v4 | ||
with: | ||
path: /home/runner/.cache/ccache | ||
key: ccache-documentation-ci | ||
# - name: Push ccache cache | ||
# uses: actions/cache/save@v4 | ||
# with: | ||
# path: /home/runner/.cache/ccache | ||
# key: ccache-documentation-ci | ||
|
||
- name: Build documentation | ||
run: | | ||
make docs | ||
# - name: Build documentation | ||
# run: | | ||
# make docs | ||
|
||
- name: Upload artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
path: 'docs/build' | ||
# - name: Upload artifact | ||
# uses: actions/upload-artifact@v4 | ||
# with: | ||
# path: 'docs/build' |
This file contains 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
Oops, something went wrong.