Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
37af29b
updates some docker files
spossann Oct 28, 2025
c66da59
new workflow for testing image
spossann Oct 28, 2025
3bc0040
test images in workflow
spossann Oct 28, 2025
485ae42
change container
spossann Oct 28, 2025
714c3f3
upper case GITHUB_TOKEN
spossann Oct 28, 2025
327afec
use new secrets.GHCR_TOKEN
spossann Oct 28, 2025
d94b189
remove checkout
spossann Oct 28, 2025
42c80af
check for dockerenv file
spossann Oct 28, 2025
43e8f86
add shell bach
spossann Oct 28, 2025
97b9455
add pwd
spossann Oct 28, 2025
552216c
try installing struphy
spossann Oct 28, 2025
90a2dd0
forgotten (
spossann Oct 28, 2025
d97b8a8
enter virtual envs
spossann Oct 28, 2025
d218735
spelling error
spossann Oct 28, 2025
50eb15c
correct env name
spossann Oct 28, 2025
bfa3566
add some which python3
spossann Oct 28, 2025
3f54c23
correct env path
spossann Oct 28, 2025
4fedd4a
compile Struphy
spossann Oct 28, 2025
0ee68db
find out why struphy compile just refresshes models and then exits
spossann Oct 28, 2025
81db8ca
cat compile.py
spossann Oct 28, 2025
b91db0d
fix typo
spossann Oct 28, 2025
ffd261f
check phys install
spossann Oct 28, 2025
991f2b2
try to get some info from console.main
spossann Oct 28, 2025
cf53705
pull current branch
spossann Oct 28, 2025
b4cf309
add -e flag
spossann Oct 28, 2025
f7a6251
use spossann username
spossann Oct 28, 2025
d1cff05
new action for Struphy install in container
spossann Oct 28, 2025
e63eaa3
add content to action
spossann Oct 28, 2025
589cf47
add shell
spossann Oct 28, 2025
103ea66
revert console.main
spossann Oct 28, 2025
0fe8b81
revert console.copile
spossann Oct 28, 2025
64dca56
update other images
spossann Oct 28, 2025
64c9fa8
remove mpcdf image (too large anyways)
spossann Oct 28, 2025
5d5c670
revert two workflows
spossann Oct 28, 2025
e7b54d7
remove .gitlab folder
spossann Oct 28, 2025
b1cf1f2
Merge branch 'devel' into 37-use-the-github-container-registry-to-sto…
spossann Oct 28, 2025
fe8c7f3
set the Ubuntu testing as a cronjob at 1 am every Sunday
spossann Oct 28, 2025
9bda18d
rename testing.yml -> reusable-testing.yml
spossann Oct 28, 2025
074ff5a
new actions for PR unit and model tests
spossann Oct 28, 2025
1ff17bf
rename workflow for model testing
spossann Oct 28, 2025
52ff740
do not use actions in PR testing workflows; we must source a specific…
spossann Oct 28, 2025
3886193
add gvec env vars
spossann Oct 29, 2025
ae4c71a
try serial unit tests first
spossann Oct 29, 2025
a1ebe58
run test_l2_projectors in separate step
spossann Oct 29, 2025
e00bbc5
exclude gvec from l2 projector test
spossann Oct 29, 2025
a2071de
revert deletion of gitlb templates
spossann Oct 29, 2025
c7165be
remove separate l2-projector test
spossann Oct 29, 2025
c780618
do not run verification model test in unit tests
spossann Oct 29, 2025
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
26 changes: 26 additions & 0 deletions .github/actions/install/struphy_in_container/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: "Install Struphy in Container"

runs:
using: composite
steps:
- name: Git branch name
id: git-branch-name
uses: EthanSK/git-branch-name-action@v1
- name: Echo the branch name
shell: bash
run: echo "Branch name ${GIT_BRANCH_NAME}"
- name: Install struphy
shell: bash
run: |
ls / -a
which python3
cd /struphy_c_
git status
git fetch origin
echo ${GIT_BRANCH_NAME}
git checkout ${GIT_BRANCH_NAME}
git pull
source env_c_/bin/activate
which python3
struphy -p
pip install -e ".[phys,mpi,doc]"
File renamed without changes.
72 changes: 72 additions & 0 deletions .github/workflows/test-PR-models.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: PR - model tests in Container

on:
pull_request:
branches:
- main
- devel
workflow_dispatch:

defaults:
run:
shell: bash

permissions:
contents: read

# concurrency:
# group: "pages"
# cancel-in-progress: false

jobs:
model-tests-in-container-with-struphy:
runs-on: ubuntu-latest
container:
image: ghcr.io/struphy-hub/struphy/ubuntu-with-struphy:latest
credentials:
username: spossann
password: ${{ secrets.GHCR_TOKEN }}
steps:

- name: Check for dockerenv file
run: (ls /.dockerenv && echo Found dockerenv) || (echo No dockerenv)

- name: Checkout repo
uses: actions/checkout@v4

- name: Install Struphy in Container
uses: ./.github/actions/install/struphy_in_container

- name: Compile Struphy
run: |
which python3
source /struphy_c_/env_c_/bin/activate
which python3
struphy compile --status
struphy compile

- name: Model tests
shell: bash
run: |
which python3
source /struphy_c_/env_c_/bin/activate
which python3
struphy compile --status
struphy test LinearMHD
struphy test toy
struphy test models
struphy test verification

- name: Model tests with MPI
shell: bash
run: |
which python3
source /struphy_c_/env_c_/bin/activate
which python3
struphy compile --status
struphy test models
struphy test models --mpi 2
struphy test verification --mpi 1
struphy test verification --mpi 4
struphy test verification --mpi 4 --nclones 2
struphy test VlasovAmpereOneSpecies --mpi 2 --nclones 2
68 changes: 68 additions & 0 deletions .github/workflows/test-PR-unit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: PR - unit tests in Container

on:
pull_request:
branches:
- main
- devel
workflow_dispatch:

defaults:
run:
shell: bash

permissions:
contents: read

# concurrency:
# group: "pages"
# cancel-in-progress: false

jobs:
unit-tests-in-container-with-struphy:
runs-on: ubuntu-latest
container:
image: ghcr.io/struphy-hub/struphy/ubuntu-with-struphy:latest
credentials:
username: spossann
password: ${{ secrets.GHCR_TOKEN }}
steps:

- name: Check for dockerenv file
run: (ls /.dockerenv && echo Found dockerenv) || (echo No dockerenv)

- name: Checkout repo
uses: actions/checkout@v4

- name: Install Struphy in Container
uses: ./.github/actions/install/struphy_in_container

- name: Compile Struphy
run: |
which python3
source /struphy_c_/env_c_/bin/activate
which python3
struphy compile --status
struphy compile

- name: Run unit tests with MPI
shell: bash
run: |
which python3
source /struphy_c_/env_c_/bin/activate
which python3
struphy compile --status
struphy --refresh-models
struphy test unit --mpi 2

- name: Run unit tests
shell: bash
run: |
which python3
source /struphy_c_/env_c_/bin/activate
which python3
struphy compile --status
struphy --refresh-models
pip show mpi4py
pip uninstall -y mpi4py
struphy test unit
19 changes: 5 additions & 14 deletions .github/workflows/ubuntu-latest.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,11 @@
name: Ubuntu
name: Ubuntu latest - cronjob
on:
push:
branches:
- main
- devel
pull_request:
branches:
- main
- devel

# concurrency:
# group: ${{ github.ref }}
# cancel-in-progress: true
schedule:
# run at 1 a.m. on Sunday
- cron: "0 1 * * 0"

jobs:
ubuntu-latest-build:
uses: ./.github/workflows/testing.yml
uses: ./.github/workflows/reusable-testing.yml
with:
os: ubuntu-latest
14 changes: 6 additions & 8 deletions docker/almalinux-latest.dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# Here is how to build the image and upload it to the mpcdf gitlab registry:
# Here is how to build the image and upload it to the Github package registry:
#
# We suppose you are in the struphy repo directory.
# Start the docker engine and run "docker login" with the following token:
# Start the docker engine and login to the Github package registry using a github personal acces token (classic):
#
# TOKEN=gldt-CgMRBMtePbSwdWTxKw4Q; echo "$TOKEN" | docker login gitlab-registry.mpcdf.mpg.de -u gitlab+deploy-token-162 --password-stdin
# export CR_PAT=YOUR_TOKEN
# echo $CR_PAT | docker login ghcr.io -u USERNAME --password-stdin
# docker info
# docker build -t gitlab-registry.mpcdf.mpg.de/struphy/struphy/almalinux-latest --provenance=false -f docker/almalinux-latest.dockerfile .
# docker push gitlab-registry.mpcdf.mpg.de/struphy/struphy/almalinux-latest
# docker build -t ghcr.io/struphy-hub/struphy/almalinux-with-reqs:latest --provenance=false -f docker/almalinux-latest.dockerfile .
# docker push ghcr.io/struphy-hub/struphy/almalinux-with-reqs:latest

FROM almalinux:latest

Expand Down Expand Up @@ -42,9 +43,6 @@ RUN echo "Installing additional tools..." \
&& export CC=`which gcc` \
&& export CXX=`which g++`

# create new working dir
WORKDIR /install_struphy_here/

# allow mpirun as root
ENV OMPI_ALLOW_RUN_AS_ROOT=1
ENV OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1
Expand Down
14 changes: 6 additions & 8 deletions docker/fedora-latest.dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# Here is how to build the image and upload it to the mpcdf gitlab registry:
# Here is how to build the image and upload it to the Github package registry:
#
# We suppose you are in the struphy repo directory.
# Start the docker engine and run "docker login" with the following token:
# Start the docker engine and login to the Github package registry using a github personal acces token (classic):
#
# TOKEN=gldt-CgMRBMtePbSwdWTxKw4Q; echo "$TOKEN" | docker login gitlab-registry.mpcdf.mpg.de -u gitlab+deploy-token-162 --password-stdin
# export CR_PAT=YOUR_TOKEN
# echo $CR_PAT | docker login ghcr.io -u USERNAME --password-stdin
# docker info
# docker build -t gitlab-registry.mpcdf.mpg.de/struphy/struphy/fedora-latest --provenance=false -f docker/fedora-latest.dockerfile .
# docker push gitlab-registry.mpcdf.mpg.de/struphy/struphy/fedora-latest
# docker build -t ghcr.io/struphy-hub/struphy/fedora-with-reqs:latest --provenance=false -f docker/fedora-latest.dockerfile .
# docker push ghcr.io/struphy-hub/struphy/fedora-with-reqs:latest

FROM fedora:latest

Expand Down Expand Up @@ -34,9 +35,6 @@ RUN echo "Installing additional tools..." \
&& export CC=`which gcc` \
&& export CXX=`which g++`

# create new working dir
WORKDIR /install_struphy_here/

# allow mpirun as root
ENV OMPI_ALLOW_RUN_AS_ROOT=1
ENV OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1
Expand Down
56 changes: 0 additions & 56 deletions docker/mpcdf-gcc-openmpi-with-struphy.dockerfile

This file was deleted.

14 changes: 6 additions & 8 deletions docker/opensuse-latest.dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# Here is how to build the image and upload it to the mpcdf gitlab registry:
# Here is how to build the image and upload it to the Github package registry:
#
# We suppose you are in the struphy repo directory.
# Start the docker engine and run "docker login" with the following token:
# Start the docker engine and login to the Github package registry using a github personal acces token (classic):
#
# TOKEN=gldt-CgMRBMtePbSwdWTxKw4Q; echo "$TOKEN" | docker login gitlab-registry.mpcdf.mpg.de -u gitlab+deploy-token-162 --password-stdin
# export CR_PAT=YOUR_TOKEN
# echo $CR_PAT | docker login ghcr.io -u USERNAME --password-stdin
# docker info
# docker build -t gitlab-registry.mpcdf.mpg.de/struphy/struphy/opensuse-latest --provenance=false -f docker/opensuse-latest.dockerfile .
# docker push gitlab-registry.mpcdf.mpg.de/struphy/struphy/opensuse-latest
# docker build -t ghcr.io/struphy-hub/struphy/opensuse-with-reqs:latest --provenance=false -f docker/opensuse-latest.dockerfile .
# docker push ghcr.io/struphy-hub/struphy/opensuse-with-reqs:latest

FROM opensuse/tumbleweed:latest

Expand Down Expand Up @@ -42,9 +43,6 @@ RUN echo "Installing additional tools..." \
&& export CXX=`which g++` \
&& zypper clean --all

# Create a new working directory
WORKDIR /install_struphy_here/

# Allow mpirun to run as root (for OpenMPI)
ENV OMPI_ALLOW_RUN_AS_ROOT=1
ENV OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1
Expand Down
Loading
Loading