Skip to content

Commit eebf8d6

Browse files
committed
more improvements
1 parent 616002d commit eebf8d6

File tree

6 files changed

+37
-9
lines changed

6 files changed

+37
-9
lines changed

build1.sh

+23-7
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,36 @@
33
set -e
44
set -x
55

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

9-
cmake .. \
9+
# if we are in a pixi project, use the pixi "host" environment for the dependencies
10+
if [[ ! -z $PIXI_PROJECT_ROOT ]]; then
11+
CMAKE_PREFIX_PATH=$PIXI_PROJECT_ROOT/.pixi/envs/host/
12+
OUTOFTREE=false
13+
14+
if [[ ! -f src/libasr/asr.h ]]; then
15+
pixi run build_0
16+
fi
17+
fi
18+
19+
# if the outoftree env var is set to true, create a build directory
20+
if [[ "$OUTOFTREE" == "true" ]]; then
21+
mkdir -p build
22+
cd build
23+
fi
24+
25+
26+
cmake $SRCDIR \
1027
-GNinja \
1128
-DCMAKE_BUILD_TYPE=Debug \
1229
-DWITH_LLVM=yes \
1330
-DLPYTHON_BUILD_ALL=yes \
1431
-DWITH_STACKTRACE=yes \
1532
-DWITH_RUNTIME_STACKTRACE=yes \
16-
-DWITH_INTRINSIC_MODULES=yes \
1733
-DWITH_LSP=no \
1834
-DWITH_LFORTRAN_BINARY_MODFILES=no \
19-
-DCMAKE_PREFIX_PATH="$PIXI_PROJECT_ROOT/.pixi/envs/host/" \
20-
-DCMAKE_INSTALL_PREFIX=`pwd`/inst \
35+
-DCMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH \
36+
-DCMAKE_INSTALL_PREFIX=`pwd`/inst
2137

22-
cmake --build . --target install
38+
cmake --build . -j --target install

ci/environment.yml

+1
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,6 @@ dependencies:
1818
- zstd=1.5.6
1919
- ninja=1.11.0
2020
- rapidjson=1.1.0
21+
- ninja
2122
# - bison=3.4 [not win]
2223
# - m2-bison=3.4 [win]

environment_unix.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ channels:
44
dependencies:
55
- git
66
- pip
7-
- make
7+
- ninja
88
- re2c
99
- toml
1010
- zlib

integration_tests/run_tests.py

+1
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ def main():
5454

5555
# Setup
5656
global DEFAULT_THREADS_TO_USE, fast_tests, python_libs_req
57+
5758
os.environ["PATH"] = LPYTHON_PATH + os.pathsep + os.environ["PATH"]
5859
# delete previously created directories (if any)
5960
for backend in SUPPORTED_BACKENDS:

pixi.lock

+7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pixi.toml

+4-1
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,13 @@ zstd-static = "1.5.5.*"
3030
cxx-compiler = "*"
3131
cmake = "*"
3232
ninja = "*"
33+
python = "3.10.2.*"
3334

3435
[feature.compiler.tasks]
35-
build_1 = { cmd = "sh build1.sh", depends-on = ["build_0"] }
36+
build_1 = { cmd = "sh build1.sh" }
3637
build = { depends-on = ["build_0", "build_1"] }
38+
test = { cmd = "python ./integration_tests/run_tests.py"}
39+
3740

3841
[environments]
3942
compiler = ["compiler"]

0 commit comments

Comments
 (0)