Skip to content

Commit

Permalink
Mac conda (#60)
Browse files Browse the repository at this point in the history
Updated parts of the bundled HDF5 configure scripts (config.guess & config.sub) which were very old and didn't recognise Apple arm64 systems when running R installed via conda. (Thanks to @eyalbenda for reporting. Fixes #54.
  • Loading branch information
grimbough authored Feb 7, 2024
1 parent 593720e commit 0a56f04
Show file tree
Hide file tree
Showing 7 changed files with 107 additions and 16 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/mac-conda.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
on:
push:
workflow_dispatch:

name: OSX and Conda

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true

jobs:
test-pkg:
runs-on: macOS-14
name: testing conda

steps:

- uses: actions/checkout@v4

- uses: conda-incubator/setup-miniconda@v3
with:
use-mamba: true
miniconda-version: "latest"
channels: conda-forge,defaults,bioconda
channel-priority: true
activate-environment: foo
architecture: arm64

- name: Bash
shell: bash -el {0}
run: |
conda install -c r r-biocmanager r-remotes
- name: Install Rhdf5lib from source
shell: bash -el {0}
run: |
mkdir ${{ runner.temp }}/R-lib
R CMD INSTALL --library=${{ runner.temp }}/R-lib ${{ github.workspace }}
working-directory: ${{ runner.temp }}


27 changes: 12 additions & 15 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
on:
push:
branches-ignore:
- mac-conda
pull_request:
branches:
- master
- devel

name: R-CMD-check

Expand All @@ -19,10 +21,11 @@ jobs:
fail-fast: false
matrix:
config:
- { os: windows-2022, bioc-version: 'devel'}
- { os: macOS-latest, bioc-version: 'devel'}
- { os: ubuntu-20.04, bioc-version: 'devel', system-libs: 'libcurl4-gnutls-dev libaec-dev'}
- { os: ubuntu-22.04, bioc-version: 'devel', system-libs: 'libcurl4-openssl-dev'}
- { os: windows-2022, bioc-version: 'devel', Ncpus: 4}
- { os: macOS-13, bioc-version: 'devel', Ncpus: 4}
- { os: macOS-14, bioc-version: 'devel', Ncpus: 3}
- { os: ubuntu-20.04, bioc-version: 'devel', Ncpus: 4, system-libs: 'libcurl4-gnutls-dev libaec-dev'}
- { os: ubuntu-22.04, bioc-version: 'devel', Ncpus: 4, system-libs: 'libcurl4-openssl-dev'}

steps:
- name: Configure git
Expand All @@ -41,21 +44,15 @@ jobs:
install.libs("openssl")
shell: Rscript {0}

- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Setup R and Bioconductor
uses: grimbough/bioc-actions/setup-bioc@v1
with:
bioc-version: ${{ matrix.config.bioc-version }}
bioc-mirror: https://ftp.gwdg.de/pub/misc/bioconductor
Ncpus: ${{ matrix.config.Ncpus }}

# - name: Create Makevars
# if: ${{ matrix.config.os == 'macOS-latest' }}
# run: |
# mkdir $HOME/.R
# echo 'LDFLAGS="-L/usr/local/opt/[email protected]/lib"' > $HOME/.R/Makevars
# echo 'CPPFLAGS="-I/usr/local/opt/[email protected]/include"' >> $HOME/.R/Makevars

- uses: r-lib/actions/setup-pandoc@v2

- name: Install dependencies
Expand All @@ -82,14 +79,14 @@ jobs:

- name: Upload check results
if: always()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.config.os }}-results
path: ${{ steps.build-install-check.outputs.check-dir }}

- name: Upload check results
if: ${{ failure() }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.config.os }}-${{ matrix.config.r }}-hdf5_config.log
path: check/*.Rcheck/00_pkg_src/Rhdf5lib/src/hdf5/config.log
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: Rhdf5lib
Type: Package
Title: hdf5 library as an R package
Version: 1.25.1
Version: 1.25.2
Authors@R: c(
person(
"Mike", "Smith",
Expand Down
12 changes: 12 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
Version 1.26
=============

Bug fixes:

o Updated parts of the bundled HDF5 configure scripts (config.guess &
config.sub) which were very old and didn't recognise Apple arm64 systems
when running R installed via conda. (Thanks to @eyalbenda for reporting,
https://github.com/grimbough/Rhdf5lib/issues/54) Backported to
Rhdf5lib version 1.24.2


Version 1.24
=============

Expand Down
39 changes: 39 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -3997,6 +3997,45 @@ else $as_nop
:
fi

elif echo $CC_BASENAME | grep -q 'clang\|gcc'; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -w" >&5
printf %s "checking whether C compiler accepts -w... " >&6; }
if test ${ax_cv_check_cflags___w+y}
then :
printf %s "(cached) " >&6
else $as_nop

ax_check_save_flags=$CFLAGS
CFLAGS="$CFLAGS -w"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
main (void)
{
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ax_cv_check_cflags___w=yes
else $as_nop
ax_cv_check_cflags___w=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
CFLAGS=$ax_check_save_flags
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___w" >&5
printf "%s\n" "$ax_cv_check_cflags___w" >&6; }
if test "x$ax_cv_check_cflags___w" = xyes
then :
CFLAGS="$CFLAGS -w"; CXXFLAGS="-w $CXXFLAGS"
else $as_nop
:
fi

fi

###########################
Expand Down
2 changes: 2 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ echo "COMPILER = $CC_BASENAME"

if test "X$CC_BASENAME" = "Xgcc" -o "X$CC_BASENAME" = "Xclang"; then
AX_CHECK_COMPILE_FLAG([-w], [CFLAGS="$CFLAGS -w"; CXXFLAGS="-w $CXXFLAGS"])
elif echo $CC_BASENAME | grep -q 'clang\|gcc'; then
AX_CHECK_COMPILE_FLAG([-w], [CFLAGS="$CFLAGS -w"; CXXFLAGS="-w $CXXFLAGS"])
fi

###########################
Expand Down
Binary file modified src/hdf5small_cxx_hl_1.10.7.tar.gz
Binary file not shown.

0 comments on commit 0a56f04

Please sign in to comment.