Skip to content

Commit

Permalink
Merge pull request #284 from fnalacceleratormodeling/minor_fix_pixi
Browse files Browse the repository at this point in the history
pixi: add lib64 to pythonpaths
  • Loading branch information
Sajid Ali authored Jun 17, 2024
2 parents 9159d71 + acfbd85 commit 62cb09a
Show file tree
Hide file tree
Showing 4 changed files with 92 additions and 62 deletions.
28 changes: 27 additions & 1 deletion .github/workflows/macos-gcc.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
name: CI:macOS-gcc

on:
workflow_dispatch:
inputs:
debug_cmake_enabled:
description: 'tmate before cmake'
required: false
default: false
debug_tests_enabled:
description: 'tmate before ctest'
required: false
default: false
push:
branches: [ devel3 ]
paths-ignore:
Expand Down Expand Up @@ -47,12 +57,21 @@ jobs:
# Build h5py from source using the Homebrew installed hdf5
HDF5_DIR=$(brew --prefix hdf5) python3 -m pip install --no-binary=h5py h5py
# Debug: checkpoint at which to open tmate session
- name: macos-clang pre CMake
uses: mxschmitt/action-tmate@v3
if: ${{github.event_name == 'workflow_dispatch' && github.event.inputs.debug_cmake_enabled }}
with:
sudo: false

- name: CMake
run: |
uname -a
source ${{github.workspace}}/synergia-env/bin/activate
export LDFLAGS="-L/opt/homebrew/opt/libomp/lib"
export CPPFLAGS="-I/opt/homebrew/opt/libomp/include"
cmake -B ${{github.workspace}}/build \
-DCMAKE_C_COMPILER=gcc-13 -DCMAKE_CXX_COMPILER=g++-13 \
-DCMAKE_C_COMPILER=gcc-14 -DCMAKE_CXX_COMPILER=g++-14 \
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DENABLE_KOKKOS_BACKEND=OpenMP \
-DGSV=DOUBLE \
-DPython_EXECUTABLE=${{github.workspace}}/synergia-env/bin/python${{env.PYTHON_VERSION}} \
Expand All @@ -64,6 +83,13 @@ jobs:
source ${{github.workspace}}/synergia-env/bin/activate
cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
# Debug: checkpoint at which to open tmate session
- name: macos-clang pre ctest
uses: mxschmitt/action-tmate@v3
if: ${{github.event_name == 'workflow_dispatch' && github.event.inputs.debug_tests_enabled }}
with:
sudo: false

- name: ctest
# Execute tests defined by the CMake configuration.
run: |
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,5 @@ compile_commands.json
# created by pixi
.pixi

# created by python virtualenv
synergia-env/**
118 changes: 60 additions & 58 deletions pixi.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions pixi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ platforms = ["linux-64", "osx-arm64"]
cmake = "cmake -S . -B build_pixi -DCMAKE_INSTALL_PREFIX=$(pwd)/install_pixi -DUSE_EXTERNAL_KOKKOS=OFF -DUSE_OPENPMD_IO=ON -DUSE_EXTERNAL_OPENPMD=OFF -DGSV=DOUBLE"
build = { cmd = "cmake --build build_pixi", depends_on = ["cmake"] }
install = { cmd = "cmake --install build_pixi", depends_on = ["build"] }
test = { cmd = "ctest --output-on-failure --test-dir build_pixi", depends_on = ["install"],env = { SYNINSTALL = "$(pwd)/install_pixi", LD_LIBRARY_PATH = "$SYNINSTALL/lib:$SYNINSTALL:lib64:$LD_LIBRARY_PATH",PYTHON_VERSION = "$(python3 -c 'import sys; print(str(sys.version[:4]))')",PYTHONPATH="$SYNINSTALL/lib:$SYNINSTALL/lib/python$PYTHON_VERSION/site-packages:$PYTHONPATH" } }
test-rerun-failed = { cmd = "ctest -V --output-on-failure --rerun-failed --test-dir build_pixi", depends_on = ["install"],env = { SYNINSTALL = "$(pwd)/install_pixi", LD_LIBRARY_PATH = "$SYNINSTALL/lib:$SYNINSTALL:lib64:${LD_LIBRARY_PATH}",PYTHON_VERSION = "$(python3 -c 'import sys; print(str(sys.version[:4]))')",PYTHONPATH="$SYNINSTALL/lib:$SYNINSTALL/lib/python$PYTHON_VERSION/site-packages:$PYTHONPATH" } }
env-test = {cmd = "echo $PYTHONPATH", env = { SYNINSTALL = "$(pwd)/install_pixi", LD_LIBRARY_PATH = "$SYNINSTALL/lib:$SYNINSTALL:lib64:${LD_LIBRARY_PATH}", PYTHON_VERSION = "$(python3 -c 'import sys; print(str(sys.version[:4]))')",PYTHONPATH="$SYNINSTALL/lib:$SYNINSTALL/lib/python$PYTHON_VERSION/site-packages:$PYTHONPATH" } }
test = { cmd = "ctest --output-on-failure --test-dir build_pixi", depends_on = ["install"],env = { SYNINSTALL = "$(pwd)/install_pixi", LD_LIBRARY_PATH = "$SYNINSTALL/lib:$SYNINSTALL:lib64:$LD_LIBRARY_PATH",PYTHON_VERSION = "$(python3 -c 'import sys; print(str(sys.version[:4]))')",PYTHONPATH="$SYNINSTALL/lib:$SYNINSTALL/lib/python$PYTHON_VERSION/site-packages:$SYNINSTALL/lib:$SYNINSTALL/lib64/python$PYTHON_VERSION/site-packages:$PYTHONPATH" } }
test-rerun-failed = { cmd = "ctest -V --output-on-failure --rerun-failed --test-dir build_pixi", depends_on = ["install"],env = { SYNINSTALL = "$(pwd)/install_pixi", LD_LIBRARY_PATH = "$SYNINSTALL/lib:$SYNINSTALL:lib64:${LD_LIBRARY_PATH}",PYTHON_VERSION = "$(python3 -c 'import sys; print(str(sys.version[:4]))')",PYTHONPATH="$SYNINSTALL/lib:$SYNINSTALL/lib/python$PYTHON_VERSION/site-packages:$SYNINSTALL/lib:$SYNINSTALL/lib64/python$PYTHON_VERSION/site-packages:$PYTHONPATH" } }
env-test = {cmd = "echo $PYTHONPATH", env = { SYNINSTALL = "$(pwd)/install_pixi", LD_LIBRARY_PATH = "$SYNINSTALL/lib:$SYNINSTALL:lib64:${LD_LIBRARY_PATH}", PYTHON_VERSION = "$(python3 -c 'import sys; print(str(sys.version[:4]))')",PYTHONPATH="$SYNINSTALL/lib:$SYNINSTALL/lib/python$PYTHON_VERSION/site-packages:$SYNINSTALL/lib:$SYNINSTALL/lib64/python$PYTHON_VERSION/site-packages:$PYTHONPATH" } }
clean = "rm -rf build_pixi/ && rm -rf install_pixi/"

[dependencies]
Expand Down

0 comments on commit 62cb09a

Please sign in to comment.