1
1
name : Sharpy CI
2
2
run-name : ${{ github.actor }} CI for sharpy
3
3
permissions : read-all
4
+
4
5
on :
5
6
push :
6
7
branches :
7
8
- main
8
9
pull_request :
10
+
9
11
defaults :
10
12
run :
11
13
shell : bash -l {0}
14
+
12
15
env :
13
16
IMEX_CACHE_NUMBER : 4 # Increase to reset cache
17
+
14
18
jobs :
15
19
build_and_test :
16
20
runs-on : ubuntu-22.04
22
26
with :
23
27
submodules : recursive
24
28
- name : Setup env
25
- # CONDA_ROOT="$(realpath $GITHUB_WORKSPACE/..)/install/miniconda3"
26
- # echo "CONDA_ROOT=$CONDA_ROOT" >> "$GITHUB_ENV"
27
29
run : |
28
30
INSTALLED_DIR="$(realpath $GITHUB_WORKSPACE)/third_party/install"
29
31
echo "INSTALLED_DIR=$INSTALLED_DIR" >> "$GITHUB_ENV"
@@ -36,56 +38,28 @@ jobs:
36
38
with :
37
39
path : third_party/install/**
38
40
key : ${{ runner.os }}-build-imex-${{ env.IMEX_CACHE_NUMBER }}-${{ env.IMEX_SHA }}
39
- - name : Miniforge
41
+ - name : Setup Miniforge
40
42
uses : conda-incubator/setup-miniconda@v3
41
43
with :
42
44
miniforge-version : latest
43
45
# environment-file: etc/example-environment.yml
44
- - name : Test Conda
45
- run : |
46
- conda create -n testenv conda-build
47
- conda activate testenv
48
- which python
49
- conda deactivate
50
- conda env remove -n testenv
51
- # - name: Miniconda
52
- # run: |
53
- # env
54
- # rm -rf $CONDA_ROOT
55
- # cd $GITHUB_WORKSPACE/..
56
- # rm -f Miniconda3-*.sh
57
- # CPKG=Miniforge3-Linux-x86_64.sh
58
- # wget -q https://github.com/conda-forge/miniforge/releases/latest/download/$CPKG
59
- # bash $CPKG -u -b -f -p $CONDA_ROOT
60
- # export PATH=$CONDA_ROOT/condabin:$CONDA_ROOT/bin:${PATH}
61
- # eval "$($CONDA_ROOT/bin/python -m conda shell.bash hook)"
62
- # conda install -c conda-forge --override-channels python git-lfs 'conda-build<=24.1.2'
63
- # # aahhhh bug in conda somewhere
64
- # sed -i "s,\#\!/usr/bin/env python,#\!$CONDA_ROOT/bin/python," $CONDA_ROOT/*bin/conda
65
- # conda clean --all -y
66
46
- name : Build SHARPY
67
- # export PATH=$CONDA_ROOT/condabin:$CONDA_ROOT/bin:${PATH}
68
- # eval "$($CONDA_ROOT/bin/python -m conda shell.bash hook)"
69
47
run : |
70
48
env
71
49
conda install -y conda-build
72
50
cd conda-recipe
73
- conda build --numpy 1.26 -c conda-forge --override-channels - -no-anaconda-upload --no-test .
51
+ conda build --numpy 1.26 --no-anaconda-upload --no-test .
74
52
- name : Save IMEX cache
75
53
uses : actions/cache/save@v3
76
54
if : steps.cache-imex.outputs.cache-hit != 'true'
77
55
with :
78
56
path : third_party/install/**
79
57
key : ${{ runner.os }}-build-imex-${{ env.IMEX_CACHE_NUMBER }}-${{ env.IMEX_SHA }}
80
58
- name : Install SHARPY
81
- # export PATH=$CONDA_ROOT/condabin:$CONDA_ROOT/bin:${PATH}
82
- # eval "$($CONDA_ROOT/bin/python -m conda shell.bash hook)"
83
59
run : |
84
- conda create --use-local -c conda-forge --override-channels - n sharpy -v sharpy pytest pytest-timeout
60
+ conda create --use-local -n sharpy -v sharpy pytest pytest-timeout
85
61
conda activate sharpy
86
62
- name : Test SHARPY (pytest)
87
- # export PATH=$CONDA_ROOT/condabin:$CONDA_ROOT/bin:${PATH}
88
- # eval "$($CONDA_ROOT/bin/python -m conda shell.bash hook)"
89
63
run : |
90
64
conda activate sharpy
91
65
cd test
96
70
mpirun -n 4 pytest . -v -s --timeout=30
97
71
cd -
98
72
- name : Run examples
99
- # export PATH=$CONDA_ROOT/condabin:$CONDA_ROOT/bin:${PATH}
100
- # eval "$($CONDA_ROOT/bin/python -m conda shell.bash hook)"
101
73
run : |
102
74
conda activate sharpy
103
75
cd examples
0 commit comments