Skip to content

Commit 92299dc

Browse files
committed
add further debugging sections to workflow
1 parent 8c5c903 commit 92299dc

1 file changed

Lines changed: 25 additions & 14 deletions

File tree

.github/workflows/R-CMD-check.yaml

Lines changed: 25 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -46,20 +46,34 @@ jobs:
4646
4747
- name: Configure clang 16
4848
run: |
49-
echo "/usr/local/opt/llvm@16/bin" >> $GITHUB_PATH
50-
export PATH="/usr/local/opt/llvm@16/bin:$PATH"
51-
echo "CC=/usr/local/opt/llvm@16/bin/clang -mmacos-version-min=13" >> $GITHUB_ENV
52-
echo "CXX=/usr/local/opt/llvm@16/bin/clang++ -mmacos-version-min=13" >> $GITHUB_ENV
53-
echo "LDFLAGS=-L/usr/local/opt/llvm@16/lib" >> $GITHUB_ENV
54-
echo "CPPFLAGS=-I/usr/local/opt/llvm@16/include" >> $GITHUB_ENV
49+
brew_prefix=$(brew --prefix llvm@16)
50+
echo "$brew_prefix/bin" >> $GITHUB_PATH
51+
export PATH="$brew_prefix/bin:$PATH"
52+
# Test compiler
53+
echo "Testing clang installation..."
54+
clang --version
55+
# Configure without flags first
56+
echo "CC=$brew_prefix/bin/clang" >> $GITHUB_ENV
57+
echo "CXX=$brew_prefix/bin/clang++" >> $GITHUB_ENV
58+
echo "LDFLAGS=-L$brew_prefix/lib" >> $GITHUB_ENV
59+
echo "CPPFLAGS=-I$brew_prefix/include" >> $GITHUB_ENV
60+
# Create test program
61+
echo "#include <stdio.h>" > test.c
62+
echo "int main() { printf(\"Hello\\n\"); return 0; }" >> test.c
63+
# Try to compile
64+
$brew_prefix/bin/clang test.c -o test
65+
./test
5566
5667
- name: Download and compile R-devel
5768
run: |
5869
curl -O https://stat.ethz.ch/R/daily/R-devel.tar.gz
5970
tar -xzf R-devel.tar.gz
6071
mkdir r-devel-build
6172
cd r-devel-build
62-
sudo chown -R $(whoami) .
73+
# Print current environment
74+
echo "Current environment:"
75+
env | sort
76+
echo "Configuring R..."
6377
../R-devel/configure \
6478
--with-C23 \
6579
--enable-R-shlib \
@@ -69,13 +83,10 @@ jobs:
6983
--with-readline \
7084
--with-tcltk \
7185
--with-recommended-packages \
72-
--enable-RGBA
73-
make
74-
if [ $? -ne 0 ]; then
75-
echo "R compilation failed. Showing config.log:"
76-
cat config.log
77-
exit 1
78-
fi
86+
--enable-RGBA || (cat config.log && false)
87+
echo "Building R..."
88+
make || (cat config.log && false)
89+
echo "Installing R..."
7990
sudo make install
8091
8192
- uses: r-lib/actions/setup-pandoc@v2

0 commit comments

Comments
 (0)