From 4e5e1207e25890491599092d257489ca88378bdd Mon Sep 17 00:00:00 2001 From: Alexander Hampel Date: Fri, 22 Mar 2024 13:57:02 -0400 Subject: [PATCH] [build] update workflows for 3.2.x and pypi --- .github/workflows/build_stable.yml | 25 +++++++++++++++++-------- .github/workflows/publish-to-pypi.yml | 19 +++++++++---------- packaging/pypi/pyproject.toml.in | 3 +-- 3 files changed, 27 insertions(+), 20 deletions(-) diff --git a/.github/workflows/build_stable.yml b/.github/workflows/build_stable.yml index 37564d2f..13ff2275 100644 --- a/.github/workflows/build_stable.yml +++ b/.github/workflows/build_stable.yml @@ -4,6 +4,17 @@ 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: @@ -11,20 +22,18 @@ jobs: 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 diff --git a/.github/workflows/publish-to-pypi.yml b/.github/workflows/publish-to-pypi.yml index 4d253eb5..5eb366e5 100644 --- a/.github/workflows/publish-to-pypi.yml +++ b/.github/workflows/publish-to-pypi.yml @@ -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 @@ -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/ @@ -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/ diff --git a/packaging/pypi/pyproject.toml.in b/packaging/pypi/pyproject.toml.in index e6ef8199..4930809a 100644 --- a/packaging/pypi/pyproject.toml.in +++ b/packaging/pypi/pyproject.toml.in @@ -23,8 +23,7 @@ classifiers = [ dependencies = [ "numpy", "scipy", - "scikit-image", - "argparse" + "scikit-image" ] [project.urls]