Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
Prev Previous commit
Next Next commit
more improvements
  • Loading branch information
wolfv committed Jul 25, 2024
commit eebf8d63119ac6003dae5c1254b8c592e44ec339
30 changes: 23 additions & 7 deletions build1.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,36 @@
set -e
set -x

mkdir -p ./build
cd build
SRCDIR=`pwd`
CMAKE_PREFIX_PATH="$CMAKE_PREFIX_PATH_LPYTHON;$CONDA_PREFIX"

cmake .. \
# if we are in a pixi project, use the pixi "host" environment for the dependencies
if [[ ! -z $PIXI_PROJECT_ROOT ]]; then
CMAKE_PREFIX_PATH=$PIXI_PROJECT_ROOT/.pixi/envs/host/
OUTOFTREE=false

if [[ ! -f src/libasr/asr.h ]]; then
pixi run build_0
fi
fi

# if the outoftree env var is set to true, create a build directory
if [[ "$OUTOFTREE" == "true" ]]; then
mkdir -p build
cd build
fi
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this needed for pixi build? If so, why not just move this logic to pixi.toml itself? That way this simple script can stay build system independent.



cmake $SRCDIR \
-GNinja \
-DCMAKE_BUILD_TYPE=Debug \
-DWITH_LLVM=yes \
-DLPYTHON_BUILD_ALL=yes \
-DWITH_STACKTRACE=yes \
-DWITH_RUNTIME_STACKTRACE=yes \
-DWITH_INTRINSIC_MODULES=yes \
-DWITH_LSP=no \
-DWITH_LFORTRAN_BINARY_MODFILES=no \
-DCMAKE_PREFIX_PATH="$PIXI_PROJECT_ROOT/.pixi/envs/host/" \
-DCMAKE_INSTALL_PREFIX=`pwd`/inst \
-DCMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH \
-DCMAKE_INSTALL_PREFIX=`pwd`/inst

cmake --build . --target install
cmake --build . -j --target install
1 change: 1 addition & 0 deletions ci/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@ dependencies:
- zstd=1.5.6
- ninja=1.11.0
- rapidjson=1.1.0
- ninja
# - bison=3.4 [not win]
# - m2-bison=3.4 [win]
2 changes: 1 addition & 1 deletion environment_unix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ channels:
dependencies:
- git
- pip
- make
- ninja
- re2c
- toml
- zlib
Expand Down
1 change: 1 addition & 0 deletions integration_tests/run_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ def main():

# Setup
global DEFAULT_THREADS_TO_USE, fast_tests, python_libs_req

os.environ["PATH"] = LPYTHON_PATH + os.pathsep + os.environ["PATH"]
# delete previously created directories (if any)
for backend in SUPPORTED_BACKENDS:
Expand Down
7 changes: 7 additions & 0 deletions pixi.lock

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

5 changes: 4 additions & 1 deletion pixi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,13 @@ zstd-static = "1.5.5.*"
cxx-compiler = "*"
cmake = "*"
ninja = "*"
python = "3.10.2.*"

[feature.compiler.tasks]
build_1 = { cmd = "sh build1.sh", depends-on = ["build_0"] }
build_1 = { cmd = "sh build1.sh" }
build = { depends-on = ["build_0", "build_1"] }
test = { cmd = "python ./integration_tests/run_tests.py"}


[environments]
compiler = ["compiler"]
Expand Down