Skip to content

Commit

Permalink
Merge pull request #132 from biojppm/doxygen
Browse files Browse the repository at this point in the history
Doxygen & tidy compiler annotation macros
  • Loading branch information
biojppm committed Apr 14, 2024
2 parents fae7106 + f6cbf5d commit 98f783e
Show file tree
Hide file tree
Showing 54 changed files with 881 additions and 235 deletions.
15 changes: 15 additions & 0 deletions .github/docker/build_and_push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,19 @@

set -o pipefail

# https://stackoverflow.com/questions/44785585/how-can-i-delete-all-local-docker-images
#
# To delete all containers including its volumes use,
#
# docker rm -vf $(docker ps -aq)
#
# To delete all the images,
#
# docker rmi -f $(docker images -aq)
#
# Remember, you should remove all the containers before removing all
# the images from which those containers were created.

if [ -z "$CR_USR" ] ; then
echo "error: \$CR_USR is not defined. Set it to a user name."
exit 1
Expand All @@ -10,6 +23,8 @@ if [ -z "$CR_PAT" ] ; then
echo "error: \$CR_PAT is not defined. Set it to a personal access token."
exit 1
fi

# see https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry#building-container-images
echo $CR_PAT | docker login ghcr.io -u $CR_USR --password-stdin

mydir=$(cd $(dirname $0) ; pwd)
Expand Down
89 changes: 77 additions & 12 deletions .github/docker/ubuntu18.04/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
FROM ubuntu:18.04

# to build, use the script build_and_push.sh, located above

LABEL org.opencontainers.image.source=https://github.com/biojppm/c4core
LABEL org.opencontainers.image.description="C++ build testing: gcc4.8-gcc11, clang3.9-clang16, arm-eabi-none, swig"
LABEL org.opencontainers.image.licenses=MIT
LABEL maintainer=dev@jpmag.me
LABEL version=1.0
LABEL version=1.1
SHELL ["/bin/bash", "-c"]

RUN apt-get update \
Expand Down Expand Up @@ -82,6 +84,7 @@ RUN apt-get install -y \

# cmany
RUN ( \
set -xe ; \
cd /tmp ; \
git clone --recursive https://github.com/biojppm/cmany -b dev ; \
pip install cmany \
Expand All @@ -92,16 +95,78 @@ RUN ( \
RUN apt-get install -y valgrind \
&& echo "valgrind done"

# helper to install compiler versions, etc
ADD c4core-install /usr/bin/c4core-install

RUN \
# Standard Cleanup on Debian images
apt-get -y clean \
&& apt-get -y autoclean \
&& apt-get -y autoremove \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf /var/cache/debconf/*-old \
&& rm -rf /usr/share/doc/* \
&& rm -rf /usr/share/man/?? \
&& rm -rf /usr/share/man/??_* \
&& echo "cleanup done"

## actions/checkout@v4 needs a different version of nodejs:
## node 18 and 20 failed with this:
## error:node: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found (required by node)
RUN cd /tmp \
&& git clone --recursive https://github.com/nodejs/node --branch v20.12.1 \
&& cd node \
&& /usr/bin/c4core-install g++-10 \
&& env CXX=g++-10 ./configure \
&& make -j `nproc` \
&& make install \
&& cd .. \
&& rm -rf node
## actions/checkout@v4 needs a different version of nodejs:
## node 18 and 20 failed with this:
## error:node: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found (required by node)
## see https://tecadmin.net/how-to-install-nvm-on-ubuntu-20-04/
## see https://stackoverflow.com/questions/25899912/how-to-install-nvm-in-docker
## /usr/local/nvm or ~/.nvm , depending
#ENV NVM_DIR /usr/local/nvm
##ENV NVM_DIR ~/.nvm
#ENV NODE_VERSION 20.12.2
#ENV NODE_PATH $NVM_DIR/versions/node/v$NODE_VERSION/lib/node_modules
#ENV PATH $NVM_DIR/versions/node/v$NODE_VERSION/bin:$PATH
#SHELL ["/bin/bash", "--login", "-i", "-c"] # https://stackoverflow.com/questions/25899912/how-to-install-nvm-in-docker/60137919#60137919
#RUN mkdir $NVM_DIR \
# && curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.35.2/install.sh | bash \
# && whoami \
# && echo "NVM_DIR=$NVM_DIR" \
# && . $NVM_DIR/nvm.sh \
# && nvm install $NODE_VERSION \
# && nvm alias default $NODE_VERSION \
# && nvm use default \
# # node 20 doesn't work because it requires glib-2.28
# #&& set -x \
# #&& which node \
# #&& `which node` --version \
# #&& node --version
#
##
## so install glibc-2.28!
##
#RUN echo "glibc-2.28" \
# && apt install -y gawk \
# && cd /tmp \
# && wget -c https://ftp.gnu.org/gnu/glibc/glibc-2.28.tar.gz \
# && tar -zxf glibc-2.28.tar.gz \
# && cd glibc-2.28 \
# && ../configure --prefix=/opt/glibc-2.28 \
# && make -j `nproc` \
# && make install \
# && cd .. \
# && rm -fr glibc-2.28 glibc-2.28.tar.gz
##
## Patch the installed Node 20 to work with /opt/glibc-2.28 instead:
##
#RUN echo "patching node to use glibc 2.28" \
# && apt install -y patchelf \
# && patchelf --set-interpreter \
# #&& /opt/glibc-2.28/lib/ld-linux-x86_64.so.2 --set-rpath /opt/glibc-2.28/lib/:/lib/aarch64-linux-gnu/:/usr/lib/aarch64-linux-gnu/ /usr/local/bin/node


# Standard Cleanup on Debian images
RUN apt-get -y clean \
&& apt-get -y autoclean \
&& apt-get -y autoremove \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf /var/cache/debconf/*-old \
&& rm -rf /usr/share/doc/* \
&& rm -rf /usr/share/man/?? \
&& rm -rf /usr/share/man/??_* \
&& echo "cleanup done"
27 changes: 27 additions & 0 deletions .github/docker/ubuntu18.04/c4core-install
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ case $what in
$script gcc-9
$script gcc-10
$script gcc-11
#$script gcc-12 #not available in ubuntu 18.04
$script gcc-13
;;
clang-all)
$script clang-16
Expand Down Expand Up @@ -116,6 +118,31 @@ case $what in
apt-get install -y \
cpp-11 gcc-11 g++-11 g++-11-multilib libstdc++-11-dev lib32stdc++-11-dev
;;
#not available in ubuntu18.04
#g++-12|gcc-12)
# apt-get update
# apt-get install -y \
# software-properties-common
# apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 6AF7F09730B3F0A4
# apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 40976EAF437D05B5
# apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3B4FE6ACC0B21F32
# apt-add-repository --yes --no-update ppa:ubuntu-toolchain-r/test
# apt-get update
# apt-get install -y \
# cpp-12 gcc-12 g++-12 g++-12-multilib libstdc++-12-dev lib32stdc++-12-dev
# ;;
g++-13|gcc-13)
apt-get update
apt-get install -y \
software-properties-common
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 6AF7F09730B3F0A4
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 40976EAF437D05B5
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3B4FE6ACC0B21F32
apt-add-repository --yes --no-update ppa:ubuntu-toolchain-r/test
apt-get update
apt-get install -y \
cpp-13 gcc-13 g++-13 g++-13-multilib libstdc++-13-dev lib32stdc++-13-dev
;;
clang++-3.9|clang-3.9)
apt-get update
apt-get install -y \
Expand Down
21 changes: 11 additions & 10 deletions .github/docker/ubuntu22.04/c4core-install
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ case $what in
$script gcc-10
$script gcc-11
$script gcc-12
$script gcc-13
;;
clang-all)
$script clang-16
Expand Down Expand Up @@ -116,16 +117,16 @@ case $what in
apt-get install -y \
cpp-12 gcc-12 g++-12 g++-12-multilib libstdc++-12-dev lib32stdc++-12-dev
;;
#g++-13|#gcc-13)
# apt-get update
# apt-get install -y \
# wget \
# software-properties-common
# apt-add-repository --yes --no-update ppa:ubuntu-toolchain-r/test
# apt-get update
# apt-get install -y \
# cpp-13 gcc-13 g++-13 g++-13-multilib libstdc++-13-dev lib32stdc++-13-dev
# ;;
g++-13|gcc-13)
apt-get update
apt-get install -y \
wget \
software-properties-common
apt-add-repository --yes --no-update ppa:ubuntu-toolchain-r/test
apt-get update
apt-get install -y \
cpp-13 gcc-13 g++-13 g++-13-multilib libstdc++-13-dev lib32stdc++-13-dev
;;
#clang++-3.9|clang-3.9)
# apt-get update
# apt-get install -y \
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/emscripten.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
uses: actions/cache@v3
with: {path: "${{env.EM_CACHE_FOLDER}}", key: "${{env.EM_VERSION}}-${{runner.os}}"}
- name: setup emscripten
uses: mymindstorm/setup-emsdk@v11
uses: mymindstorm/setup-emsdk@v14
with: {version: "${{matrix.emver}}", actions-cache-folder: "${{env.EM_CACHE_FOLDER}}"}
- {name: show info, run: source .github/setenv.sh && c4_show_info}
- name: static32-configure---------------------------------------------------
Expand Down
Loading

0 comments on commit 98f783e

Please sign in to comment.