Skip to content

Commit

Permalink
[build] update workflows for 3.2.x and pypi
Browse files Browse the repository at this point in the history
  • Loading branch information
the-hampel committed Mar 22, 2024
1 parent 14201c5 commit 4e5e120
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 20 deletions.
25 changes: 17 additions & 8 deletions .github/workflows/build_stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,36 @@ on:
push:
branches: [ 3.2.x ]

env:
CMAKE_BUILD_PARALLEL_LEVEL: 2
CTEST_PARALLEL_LEVEL: 1
CTEST_OUTPUT_ON_FAILURE: 1
OMPI_ALLOW_RUN_AS_ROOT: 1
OMPI_ALLOW_RUN_AS_ROOT_CONFIRM: 1
OMPI_MCA_rmaps_base_oversubscribe: "yes"

permissions:
contents: write

jobs:
build:

strategy:
fail-fast: false

runs-on: ubuntu-latest
container: materialstheory/solid_dmft_ci:3.2.x
container:
image: ghcr.io/triqs/solid_dmft_github_ci:3.2.x

steps:
- uses: actions/checkout@v2
with:
path: 'solid_dmft.src'
- uses: actions/checkout@v4

- name: Build solid_dmft
run: |
mkdir solid_dmft.build && cd solid_dmft.build && cmake ../solid_dmft.src -DMPIEXEC_PREFLAGS='--allow-run-as-root'
make
cmake -S . -B build/
cmake --build build/ --verbose
- name: Test solid_dmft
run: |
cd solid_dmft.build
ctest --output-on-failure
cmake --build build/ --target test
19 changes: 9 additions & 10 deletions .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,12 @@ jobs:
name: Build distribution 📦
runs-on: ubuntu-latest
container: # we have to provide a working triqs installation to make the cmake step work
# image: materialstheory/solid_dmft_ci:${{github.ref_name}}
image: materialstheory/solid_dmft_ci
image: ghcr.io/triqs/solid_dmft_github_ci:3.2.x

steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Install pypa/build
Expand All @@ -28,15 +27,15 @@ jobs:
--user
- name: prepare python distribution
run: |
mkdir build && cd build
cmake ../
cp packaging/pypi/* ../
mv python/solid_dmft/version.py ../python/solid_dmft/version.py
rm ../python/solid_dmft/version.py.in
git config --global --add safe.directory ${GITHUB_WORKSPACE}
cmake -S . -B build/
cp build/packaging/pypi/* ./
mv build/python/solid_dmft/version.py ./python/solid_dmft/version.py
rm ./python/solid_dmft/version.py.in
- name: Build a binary wheel and a source tarball
run: python3 -m build
- name: Store the distribution packages
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: python-package-distributions
path: dist/
Expand All @@ -54,7 +53,7 @@ jobs:

steps:
- name: Download all the dists
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/
Expand Down
3 changes: 1 addition & 2 deletions packaging/pypi/pyproject.toml.in
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ classifiers = [
dependencies = [
"numpy",
"scipy",
"scikit-image",
"argparse"
"scikit-image"
]

[project.urls]
Expand Down

0 comments on commit 4e5e120

Please sign in to comment.