@@ -22,11 +22,11 @@ jobs:
22
22
with :
23
23
submodules : recursive
24
24
- name : Setup env
25
+ # CONDA_ROOT="$(realpath $GITHUB_WORKSPACE/..)/install/miniconda3"
26
+ # echo "CONDA_ROOT=$CONDA_ROOT" >> "$GITHUB_ENV"
25
27
run : |
26
28
INSTALLED_DIR="$(realpath $GITHUB_WORKSPACE)/third_party/install"
27
29
echo "INSTALLED_DIR=$INSTALLED_DIR" >> "$GITHUB_ENV"
28
- CONDA_ROOT="$(realpath $GITHUB_WORKSPACE/..)/install/miniconda3"
29
- echo "CONDA_ROOT=$CONDA_ROOT" >> "$GITHUB_ENV"
30
30
echo 'IMEX_SHA<<EOF' >> $GITHUB_ENV
31
31
cat imex_version.txt >> $GITHUB_ENV
32
32
echo 'EOF' >> $GITHUB_ENV
@@ -36,27 +36,31 @@ jobs:
36
36
with :
37
37
path : third_party/install/**
38
38
key : ${{ runner.os }}-build-imex-${{ env.IMEX_CACHE_NUMBER }}-${{ env.IMEX_SHA }}
39
- - name : Miniconda
40
- run : |
41
- env
42
- rm -rf $CONDA_ROOT
43
- cd $GITHUB_WORKSPACE/..
44
- rm -f Miniconda3-*.sh
45
- # CPKG=Miniconda3-latest-Linux-x86_64.sh
46
- CPKG=Miniconda3-py311_24.3.0-0-Linux-x86_64.sh
47
- wget -q https://repo.anaconda.com/miniconda/$CPKG
48
- bash $CPKG -u -b -f -p $CONDA_ROOT
49
- export PATH=$CONDA_ROOT/condabin:$CONDA_ROOT/bin:${PATH}
50
- eval "$($CONDA_ROOT/bin/python -m conda shell.bash hook)"
51
- conda install -c conda-forge --override-channels python git-lfs 'conda-build<=24.1.2'
52
- # aahhhh bug in conda somewhere
53
- sed -i "s,\#\!/usr/bin/env python,#\!$CONDA_ROOT/bin/python," $CONDA_ROOT/*bin/conda
54
- conda clean --all -y
39
+ - name : Miniforge
40
+ uses : conda-incubator/setup-miniconda@v3
41
+ with :
42
+ miniforge-version : latest
43
+ # environment-file: etc/example-environment.yml
44
+ # - name: Miniconda
45
+ # run: |
46
+ # env
47
+ # rm -rf $CONDA_ROOT
48
+ # cd $GITHUB_WORKSPACE/..
49
+ # rm -f Miniconda3-*.sh
50
+ # CPKG=Miniforge3-Linux-x86_64.sh
51
+ # wget -q https://github.com/conda-forge/miniforge/releases/latest/download/$CPKG
52
+ # bash $CPKG -u -b -f -p $CONDA_ROOT
53
+ # export PATH=$CONDA_ROOT/condabin:$CONDA_ROOT/bin:${PATH}
54
+ # eval "$($CONDA_ROOT/bin/python -m conda shell.bash hook)"
55
+ # conda install -c conda-forge --override-channels python git-lfs 'conda-build<=24.1.2'
56
+ # # aahhhh bug in conda somewhere
57
+ # sed -i "s,\#\!/usr/bin/env python,#\!$CONDA_ROOT/bin/python," $CONDA_ROOT/*bin/conda
58
+ # conda clean --all -y
55
59
- name : Build SHARPY
60
+ # export PATH=$CONDA_ROOT/condabin:$CONDA_ROOT/bin:${PATH}
61
+ # eval "$($CONDA_ROOT/bin/python -m conda shell.bash hook)"
56
62
run : |
57
63
env
58
- export PATH=$CONDA_ROOT/condabin:$CONDA_ROOT/bin:${PATH}
59
- eval "$($CONDA_ROOT/bin/python -m conda shell.bash hook)"
60
64
cd conda-recipe
61
65
conda build --numpy 1.26 -c conda-forge --override-channels --no-anaconda-upload --no-test .
62
66
- name : Save IMEX cache
@@ -66,15 +70,15 @@ jobs:
66
70
path : third_party/install/**
67
71
key : ${{ runner.os }}-build-imex-${{ env.IMEX_CACHE_NUMBER }}-${{ env.IMEX_SHA }}
68
72
- name : Install SHARPY
73
+ # export PATH=$CONDA_ROOT/condabin:$CONDA_ROOT/bin:${PATH}
74
+ # eval "$($CONDA_ROOT/bin/python -m conda shell.bash hook)"
69
75
run : |
70
- export PATH=$CONDA_ROOT/condabin:$CONDA_ROOT/bin:${PATH}
71
- eval "$($CONDA_ROOT/bin/python -m conda shell.bash hook)"
72
76
conda create --use-local -c conda-forge --override-channels -n sharpy -v sharpy pytest pytest-timeout
73
77
conda activate sharpy
74
78
- name : Test SHARPY (pytest)
79
+ # export PATH=$CONDA_ROOT/condabin:$CONDA_ROOT/bin:${PATH}
80
+ # eval "$($CONDA_ROOT/bin/python -m conda shell.bash hook)"
75
81
run : |
76
- export PATH=$CONDA_ROOT/condabin:$CONDA_ROOT/bin:${PATH}
77
- eval "$($CONDA_ROOT/bin/python -m conda shell.bash hook)"
78
82
conda activate sharpy
79
83
cd test
80
84
pytest . -v -s --timeout=30
84
88
mpirun -n 4 pytest . -v -s --timeout=30
85
89
cd -
86
90
- name : Run examples
91
+ # export PATH=$CONDA_ROOT/condabin:$CONDA_ROOT/bin:${PATH}
92
+ # eval "$($CONDA_ROOT/bin/python -m conda shell.bash hook)"
87
93
run : |
88
- export PATH=$CONDA_ROOT/condabin:$CONDA_ROOT/bin:${PATH}
89
- eval "$($CONDA_ROOT/bin/python -m conda shell.bash hook)"
90
94
conda activate sharpy
91
95
cd examples
92
96
SHARPY_FALLBACK=numpy python -u ./stencil-2d.py 5 1024 star 4
0 commit comments