File tree 3 files changed +59
-27
lines changed
3 files changed +59
-27
lines changed Original file line number Diff line number Diff line change @@ -43,41 +43,23 @@ jobs:
43
43
- name : Checkout
44
44
uses : actions/checkout@v4
45
45
46
- # R may need to run before installing sed:
47
- - name : Set up R
48
- uses : r-lib/actions/setup-r@v2
49
-
50
- # - name: Install deps
51
- # run: |
52
- # dev/github-actions/setup-deps.sh ${{ matrix.os }}
53
-
54
- # # TODO RInside
55
- # - name: Install R requirements
56
- # run: |
57
- # R -e "install.packages('RInside')"
58
- # # run: Rscript install/R-requirements.R
59
-
60
- - uses : r-lib/actions/setup-r-dependencies@v2
61
- with :
62
- extra-packages : any::RInside
46
+ - name : Install deps
47
+ run : |
48
+ dev/github-actions/setup-deps.sh ${{ matrix.os }}
63
49
64
50
- name : Setup Python
65
51
uses : actions/setup-python@v5
66
52
with :
67
53
python-version : ${{ matrix.python-version }}
68
54
69
- # - name: Upgrade pip
70
- # run: python -m pip install -U pip
55
+ - name : Setup R
56
+ run : |
57
+ dev/github-actions/install-R.sh
71
58
72
59
- name : Initialize swift-t settings
73
60
run : |
74
61
dev/build/init-settings.sh
75
- dev/github-actions/edit-settings.sh
76
-
77
- # TODO set swift-t install, R, python, and ??
78
- # sed -i 's/original/new/g' file.txt
79
- # - run:
80
- # - run: sed -i 's/ENABLE_R=0/ENABLE_R=1/g' dev/build/swift-t-settings.sh
62
+ dev/github-actions/edit-settings.sh -r
81
63
82
64
- name : build swift-t
83
65
run : |
Original file line number Diff line number Diff line change 1
- #! /bin/sh
1
+ #! /bin/bash
2
2
set -eu
3
3
4
4
# SETTINGS SH
5
5
# Edit swift-t-settings.sh via settings.sed
6
6
# Assumes PWD is the top of the Swift/T clone
7
7
# We immediately cd into /dev/
8
+ # Provide -r to turn on R support
8
9
9
10
cd dev
10
11
SETTINGS_SH=build/swift-t-settings.sh
12
+ SETTINGS_ORIG=build/swift-t-settings.orig
13
+
14
+ cp -v $SETTINGS_SH $SETTINGS_ORIG
15
+
11
16
echo " Editing $SETTINGS_SH ..."
12
- sed -i -f github-actions/settings.sed build/swift-t-settings.sh
17
+ sed -i -f github-actions/settings.sed $SETTINGS_SH
18
+
19
+ if [[ " $1 " == " -r" ]]
20
+ then
21
+ RHOME=$( R RHOME )
22
+ echo " RHOME=$RHOME "
23
+ sed -i ' s/ENABLE_R=0/ENABLE_R=1/' $SETTINGS_SH
24
+ sed -i " s@# R_INSTALL=.*@R_INSTALL=$RHOME @" $SETTINGS_SH
25
+ fi
26
+
27
+ echo " Settings changed:"
28
+ diff $SETTINGS_ORIG $SETTINGS_SH
Original file line number Diff line number Diff line change
1
+ #! /bin/zsh
2
+ set -eu
3
+
4
+ # INSTALL R SH
5
+ # and RInside
6
+
7
+ MATRIX_OS=$1
8
+
9
+ START=$SECONDS
10
+
11
+ log ()
12
+ {
13
+ printf " install-R.sh: %s\n" " $* "
14
+ }
15
+
16
+ case $MATRIX_OS {
17
+ " ubuntu-latest" ) PKG=" r" ;;
18
+ " macos-14" ) PKG=" emews-r" ;;
19
+ * ) log " unknown OS=$MATRIX_OS "
20
+ exit 1 ;;
21
+ }
22
+
23
+ # For 'set -x' , including newline
24
+ PS4="
25
+ + "
26
+
27
+ () {
28
+ set -x
29
+ conda install --yes --quiet -c conda-forge -c swift-t $PKG
30
+ which Rscript
31
+ Rscript dev/conda/install-RInside.R
32
+ }
33
+
34
+ log OK
You can’t perform that action at this time.
0 commit comments