Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
80b2c90
docs: define C++23 migration and optimization roadmap
Alexander-Mitrofanov Aug 15, 2026
ba097ab
build: require strict C++23
Alexander-Mitrofanov Aug 15, 2026
6efc528
test: update Catch for C++23
Alexander-Mitrofanov Aug 15, 2026
199acf6
fix: make public code C++23 portable
Alexander-Mitrofanov Aug 15, 2026
0c09da4
build: repair installed pkg-config metadata
Alexander-Mitrofanov Aug 15, 2026
d3c991a
ci: test GCC 14 and Apple Clang C++23
Alexander-Mitrofanov Aug 15, 2026
fce2abf
ci: quote C++ branch workflow filter
Alexander-Mitrofanov Aug 15, 2026
c4bc260
ci: rely on pull request branch filter
Alexander-Mitrofanov Aug 15, 2026
e0e8625
ci: install Autotools on macOS
Alexander-Mitrofanov Aug 15, 2026
6eaa4ed
ci: sanitize ViennaRNA GNU linker flag on macOS
Alexander-Mitrofanov Aug 15, 2026
a503389
build: export dependency header paths
Alexander-Mitrofanov Aug 15, 2026
7271a46
ci: retain dependency runtime paths for consumer
Alexander-Mitrofanov Aug 15, 2026
1ee6aa0
test: add exhaustive exact predictor oracle
Alexander-Mitrofanov Aug 15, 2026
3a83472
test: add exhaustive seeded predictor oracle
Alexander-Mitrofanov Aug 15, 2026
8fb6304
merge: carry heuristic corrections into C++23
Alexander-Mitrofanov Aug 15, 2026
8bd1676
merge: carry output hub corrections into C++23
Alexander-Mitrofanov Aug 15, 2026
f1fbdf8
docs: finalize C++23 migration evidence
Alexander-Mitrofanov Aug 15, 2026
a1716c0
ci: validate C++23 optimization branches
Alexander-Mitrofanov Aug 15, 2026
159ce2f
ci: quote C++23 branch filter
Alexander-Mitrofanov Aug 15, 2026
321364c
ci: escape C++23 branch glob
Alexander-Mitrofanov Aug 15, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
147 changes: 108 additions & 39 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,53 +2,122 @@ name: C/C++ CI

on:
push:
branches: [ master ]
branches: [master, refactoring, 'refactor-to-c\+\+23']
pull_request:
branches: [ master ]

branches: [master, refactoring, 'refactor-to-c\+\+23']

defaults:
run:
shell: bash -el {0}


jobs:
build:

runs-on: ubuntu-latest
name: Build and test (${{ matrix.name }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- name: GCC 14 release
os: ubuntu-24.04
compiler: gcc
configure_debug: --disable-debug
- name: GCC 14 debug
os: ubuntu-24.04
compiler: gcc
configure_debug: --enable-debug
- name: Apple Clang release
os: macos-15
compiler: apple-clang
configure_debug: --disable-debug

steps:
- name: Check out sources
uses: actions/checkout@v4

- name: Set up conda environment
uses: conda-incubator/setup-miniconda@v4
with:
miniconda-version: latest
environment-file: conda-build-env.yml
activate-environment: intarna-build-env

- name: Install and select GCC 14
if: matrix.compiler == 'gcc'
run: |
sudo apt-get update
sudo apt-get install --yes gcc-14 g++-14
echo "CC=gcc-14" >> "$GITHUB_ENV"
echo "CXX=g++-14" >> "$GITHUB_ENV"
echo "LDFLAGS=-L${CONDA_PREFIX}/lib -Wl,-rpath,${CONDA_PREFIX}/lib" >> "$GITHUB_ENV"

- name: Verify GCC 14
if: matrix.compiler == 'gcc'
run: |
"$CC" --version
"$CXX" --version
test "$("$CC" -dumpfullversion | cut -d. -f1)" = 14
test "$("$CXX" -dumpfullversion | cut -d. -f1)" = 14

- name: Set up Apple Clang with OpenMP
if: matrix.compiler == 'apple-clang'
run: |
brew install libomp
libomp_prefix="$(brew --prefix libomp)"
echo "CC=/usr/bin/clang" >> "$GITHUB_ENV"
echo "CXX=/usr/bin/clang++" >> "$GITHUB_ENV"
echo "CPPFLAGS=-I${libomp_prefix}/include" >> "$GITHUB_ENV"
echo "CXXFLAGS=-Xpreprocessor -fopenmp" >> "$GITHUB_ENV"
echo "LDFLAGS=-L${libomp_prefix}/lib -Wl,-rpath,${libomp_prefix}/lib -L${CONDA_PREFIX}/lib -Wl,-rpath,${CONDA_PREFIX}/lib" >> "$GITHUB_ENV"
echo "LIBS=-lomp" >> "$GITHUB_ENV"
vrna_libs="$(pkg-config --libs RNAlib2)"
vrna_libs="${vrna_libs//-Wl,-fno-lto/}"
echo "VRNA_LIBS=${vrna_libs}" >> "$GITHUB_ENV"

- name: Verify Apple Clang
if: matrix.compiler == 'apple-clang'
run: |
"$CC" --version
"$CXX" --version
"$CXX" --version | grep -q "Apple clang"

- name: Bootstrap and configure
run: |
bash autotools-init.sh
./configure \
--prefix="$RUNNER_TEMP/intarna-install" \
--with-vrna="$CONDA_PREFIX" \
--with-boost="$CONDA_PREFIX" \
--with-boost-libdir="$CONDA_PREFIX/lib" \
--with-zlib="$CONDA_PREFIX" \
${{ matrix.configure_debug }}
grep -Eq '^CXX = .* -std=c\+\+23([[:space:]]|$)' Makefile
grep -q '^#define INTARNA_MULITHREADING 1' src/config.h

- name: Build, install, and run full test suite
run: |
make -j 2
make install
make tests -j 2
"$RUNNER_TEMP/intarna-install/bin/IntaRNA" -h

- name: Compile every installed public header independently
run: |
header_probe="$RUNNER_TEMP/intarna-header-probe.cpp"
for header in "$RUNNER_TEMP/intarna-install/include/IntaRNA/"*.h; do
printf '#include <IntaRNA/%s>\nint main() { return 0; }\n' "$(basename "$header")" > "$header_probe"
"$CXX" -std=c++23 ${CPPFLAGS:-} ${CXXFLAGS:-} \
-I"$RUNNER_TEMP/intarna-install/include" \
-I"$CONDA_PREFIX/include" \
-fsyntax-only "$header_probe"
done

- name: Check out sources from github
uses: actions/checkout@v2

- name: Setup conda environment
uses: conda-incubator/setup-miniconda@v2
with:
miniconda-version: "latest"
environment-file: conda-build-env.yml
activate-environment: conda-build-env

- name: Build and test IntaRNA
run: |
##### start IntaRNA build #####
pwd
# generate autotools's files
bash autotools-init.sh
# run configure (without boost checks)
ENVPREFIX=`conda info --base`/envs/conda-build-env
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ENVPREFIX/lib
./configure \
--prefix=$HOME/IntaRNA \
--with-vrna=$ENVPREFIX \
--with-boost=$ENVPREFIX \
--with-boost-libdir=$ENVPREFIX/lib \
--with-zlib=$ENVPREFIX
# compile documentation
# - make doxygen-doc
# compile, test and install IntaRNA
make -j 2 && make install
make tests -j 2
##### check IntaRNA build #####
# run installed IntaRNA with help output
$HOME/IntaRNA/bin/IntaRNA -h
- name: Compile and link an installed pkg-config consumer
run: |
consumer="$RUNNER_TEMP/intarna-consumer.cpp"
printf '#include <IntaRNA/RnaSequence.h>\nint main() { IntaRNA::RnaSequence rna("test", "ACGU"); return rna.size() == 4 ? 0 : 1; }\n' > "$consumer"
export PKG_CONFIG_PATH="$RUNNER_TEMP/intarna-install/lib/pkgconfig"
"$CXX" -std=c++23 ${CPPFLAGS:-} ${CXXFLAGS:-} "$consumer" \
${LDFLAGS:-} $(pkg-config --cflags --libs IntaRNA) \
-o "$RUNNER_TEMP/intarna-consumer"
"$RUNNER_TEMP/intarna-consumer"
20 changes: 10 additions & 10 deletions IntaRNA.pc.in
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
prefix=@PREFIX_PATH@
exec_prefix=${prefix}/bin
libdir=${prefix}/lib
includedir=${prefix}/include
Name: IntaRNA
Description: RNA-RNA interaction prediction C++ library
Version: @VERSION@
Libs: @LIBS@
Cflags:
prefix=@prefix@
exec_prefix=${prefix}
libdir=${prefix}/lib
includedir=${prefix}/include

Name: IntaRNA
Description: RNA-RNA interaction prediction C++ library
Version: @VERSION@
Libs: -L${libdir} -lIntaRNA @LIBS@
Cflags: -I${includedir} @BOOST_CPPFLAGS@ @VRNA_CFLAGS@
67 changes: 21 additions & 46 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ you with an encapsulated IntaRNA installation.
If you are going to compile IntaRNA from source, ensure you meet the following
dependencies:

- compiler supporting C++11 standard and OpenMP
- compiler supporting C++23 and OpenMP (GCC 14 or Apple Clang)
- [boost C++ library](http://www.boost.org/) version >= 1.50.0
(ensure the following libraries are installed for development (not just runtime libraries!); or install all e.g. in Ubuntu via package `libboost-all-dev`)
- libboost_regex
Expand Down Expand Up @@ -312,57 +312,34 @@ directory to your [`Path` System variable](http://www.computerhope.com/issues/ch
<br /><br />
<a name="instosx" />

## OS X installation with homebrew (thanks to Lars Barquist)
## macOS installation with Homebrew

If you do not want to or can use the pre-compiled binaries for OS X available from
[bioconda](https://anaconda.org/bioconda/intarna), you can compile `IntaRNA`
locally.
The [Bioconda package](https://anaconda.org/bioconda/intarna) is the simplest
installation route. To build locally with the system Apple Clang compiler,
install the dependencies and the OpenMP runtime:

The following wraps up how to build `IntaRNA-2.0.2` under OS X (Sierra 10.12.4) using homebrew.

First, install homebrew! :)

```[bash]
brew install gcc --without-multilib
```

`--without-multilib` is necessary for OpenMP multithreading support -- note
OS X default `gcc`/`clang` doesn't support OpenMP, so we need to install standard
`gcc`/`g++`

```[bash]
brew install boost --cc=gcc-6
```

`--cc=gcc-6` is necessary to build `boost` with standard `gcc`, rather than the
default bottle which appears to have been built with the system `clang`.
Brew installs `gcc`/`g++` as `/usr/local/bin/gcc-VERSION` by default to avoid
clashing with the system's `gcc`/`clang`. `6` is the current version as of
writing, but may change.

```[bash]
brew install viennarna
brew install doxygen
```

Download and extract the IntaRNA source code package (e.g. `intaRNA-2.0.2.tar.gz`) from the [release page](https://github.com/BackofenLab/IntaRNA/releases/latest).

```[bash]
./configure CC=gcc-6 CXX=g++-6
```bash
brew install autoconf automake boost libtool libomp pkg-config viennarna
```

This sets up makefiles to use standard `gcc`/`g++` from brew, which will
need an update to the appropriate compiler version if not still `6`.
You might also want to
set `--prefix=INSTALLPATH` if you dont want to install IntaRNA globally.

Apple Clang needs the Homebrew `libomp` headers, library and preprocessing flag.
The following keeps the normal optimized, multithreaded build:

```[bash]
make
make tests
```bash
LIBOMP_PREFIX="$(brew --prefix libomp)"
CPPFLAGS="-I${LIBOMP_PREFIX}/include" \
CXXFLAGS="-Xpreprocessor -fopenmp" \
LDFLAGS="-L${LIBOMP_PREFIX}/lib -Wl,-rpath,${LIBOMP_PREFIX}/lib" \
LIBS="-lomp" \
./configure CC=clang CXX=clang++
make -j2
make tests -j2
make install
```

Use `--prefix=INSTALLPATH` with `./configure` when a system-wide installation
is not desired.


[![up](doc/figures/icon-up.28.png) back to overview](#overview)

Expand Down Expand Up @@ -2255,5 +2232,3 @@ flags are used within the IntaRNA configuration:
[![up](doc/figures/icon-up.38.png)](https://www.freepik.com/free-vector/colored-arrows_794372.htm)
Designed by Freepik



9 changes: 4 additions & 5 deletions conda-build-env.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

name: intarna-build-env

channels:
Expand All @@ -7,10 +6,10 @@ channels:
- defaults

dependencies:
- gcc_linux-64
- gxx_linux-64
- autoconf
- automake
- libtool
- pkgconfig
- zlib
- boost-cpp
- boost-cpp
- viennarna>=2.4.14

12 changes: 4 additions & 8 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

AC_PREREQ([2.65])
AC_PREREQ([2.69])
# 5 argument version only available with aclocal >= 2.64
AC_INIT([IntaRNA], [3.4.1], [], [intaRNA], [http://www.bioinf.uni-freiburg.de] )

Expand Down Expand Up @@ -54,8 +54,8 @@ AM_INIT_AUTOMAKE([1.11])
# use the C++ compiler for the following checks
AC_LANG([C++])

# ensure we are using c11 C++ standard
AX_CXX_COMPILE_STDCXX([11], [noext], [mandatory])
# ensure we are using the C++23 standard
AX_CXX_COMPILE_STDCXX([23], [noext], [mandatory])

# check if python is available
AM_PATH_PYTHON([$PYTHON_REQUIRED_VERSION],, [:])
Expand Down Expand Up @@ -197,7 +197,7 @@ AS_IF([test x"$enable_multiprecision" = x"yes"], [
# Vienna RNA package library path support, if not installed in usual directories
###############################################################################
AC_ARG_WITH([vrna],
[AC_HELP_STRING(
[AS_HELP_STRING(
[--with-vrna=PREFIX],
[alternative prefix path to Vienna RNA library]
)],
Expand Down Expand Up @@ -306,10 +306,6 @@ AX_CHECK_ZLIB([], [])
# Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_SIZE_T

# Checks for header files.
AC_HEADER_STDC


##########################################################################
# check boost test results
##########################################################################
Expand Down
Loading
Loading