Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade base image to Focal #688

Merged
merged 1 commit into from
Apr 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
92 changes: 38 additions & 54 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ env:
jobs:
lint:
name: Lint sources
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
steps:
- name: Check out sources
uses: actions/checkout@v3
- name: Prepare container
run: ./scripts/prepare-container-bionic.sh
run: ./scripts/prepare-container-focal.sh
- run: bundle install
- run: bundle exec danger || true
- run: BML_OPENMP=no EMACS=emacs27 ./build.sh --debug check_indent
Expand All @@ -42,12 +42,12 @@ jobs:

docs:
name: Build docs
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
steps:
- name: Check out sources
uses: actions/checkout@v3
- name: Prepare container
run: ./scripts/prepare-container-bionic.sh
run: ./scripts/prepare-container-focal.sh
- name: Build docs
run: ./build.sh --debug docs

Expand Down Expand Up @@ -90,55 +90,39 @@ jobs:

build:
name: Build and test the library (${{ matrix.JOBNAME }})
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
include:
- JOBNAME: gcc-4.8 C single real
TEST_SCRIPT: ./scripts/ci-gcc-4.8-C-single-real.sh
- JOBNAME: gcc-4.8 C double real
TEST_SCRIPT: ./scripts/ci-gcc-4.8-C-double-real.sh
- JOBNAME: gcc-4.8 C single complex
TEST_SCRIPT: ./scripts/ci-gcc-4.8-C-single-complex.sh
- JOBNAME: gcc-4.8 C double complex
TEST_SCRIPT: ./scripts/ci-gcc-4.8-C-double-complex.sh
- JOBNAME: gcc-4.8 Fortran single real
TEST_SCRIPT: ./scripts/ci-gcc-4.8-Fortran-single-real.sh
- JOBNAME: gcc-4.8 Fortran double real
TEST_SCRIPT: ./scripts/ci-gcc-4.8-Fortran-double-real.sh
- JOBNAME: gcc-4.8 Fortran single complex
TEST_SCRIPT: ./scripts/ci-gcc-4.8-Fortran-single-complex.sh
- JOBNAME: gcc-4.8 Fortran double complex
TEST_SCRIPT: ./scripts/ci-gcc-4.8-Fortran-double-complex.sh
- JOBNAME: gcc-11 C single real
TEST_SCRIPT: ./scripts/ci-gcc-11-C-single-real.sh
- JOBNAME: gcc-11 C double real
TEST_SCRIPT: ./scripts/ci-gcc-11-C-double-real.sh
- JOBNAME: gcc-11 C single complex
TEST_SCRIPT: ./scripts/ci-gcc-11-C-single-complex.sh
- JOBNAME: gcc-11 C double complex
TEST_SCRIPT: ./scripts/ci-gcc-11-C-double-complex.sh
- JOBNAME: gcc-11 C single real (OpenBLAS)
- JOBNAME: gcc-10 C single real
TEST_SCRIPT: ./scripts/ci-gcc-10-C-single-real.sh
- JOBNAME: gcc-10 C double real
TEST_SCRIPT: ./scripts/ci-gcc-10-C-double-real.sh
- JOBNAME: gcc-10 C single complex
TEST_SCRIPT: ./scripts/ci-gcc-10-C-single-complex.sh
- JOBNAME: gcc-10 C double complex
TEST_SCRIPT: ./scripts/ci-gcc-10-C-double-complex.sh
- JOBNAME: gcc-10 C single real (OpenBLAS)
BLAS_VENDOR: OpenBLAS
TEST_SCRIPT: ./scripts/ci-gcc-11-C-single-real.sh
- JOBNAME: gcc-11 C double real (OpenBLAS)
TEST_SCRIPT: ./scripts/ci-gcc-10-C-single-real.sh
- JOBNAME: gcc-10 C double real (OpenBLAS)
BLAS_VENDOR: OpenBLAS
TEST_SCRIPT: ./scripts/ci-gcc-11-C-double-real.sh
- JOBNAME: gcc-11 C single complex (OpenBLAS)
TEST_SCRIPT: ./scripts/ci-gcc-10-C-double-real.sh
- JOBNAME: gcc-10 C single complex (OpenBLAS)
BLAS_VENDOR: OpenBLAS
TEST_SCRIPT: ./scripts/ci-gcc-11-C-single-complex.sh
- JOBNAME: gcc-11 C double complex (OpenBLAS)
TEST_SCRIPT: ./scripts/ci-gcc-10-C-single-complex.sh
- JOBNAME: gcc-10 C double complex (OpenBLAS)
BLAS_VENDOR: OpenBLAS
TEST_SCRIPT: ./scripts/ci-gcc-11-C-double-complex.sh
- JOBNAME: gcc-11 Fortran single real
TEST_SCRIPT: ./scripts/ci-gcc-11-Fortran-single-real.sh
- JOBNAME: gcc-11 Fortran double real
TEST_SCRIPT: ./scripts/ci-gcc-11-Fortran-double-real.sh
- JOBNAME: gcc-11 Fortran single complex
TEST_SCRIPT: ./scripts/ci-gcc-11-Fortran-single-complex.sh
- JOBNAME: gcc-11 Fortran double complex
TEST_SCRIPT: ./scripts/ci-gcc-11-Fortran-double-complex.sh
TEST_SCRIPT: ./scripts/ci-gcc-10-C-double-complex.sh
- JOBNAME: gcc-10 Fortran single real
TEST_SCRIPT: ./scripts/ci-gcc-10-Fortran-single-real.sh
- JOBNAME: gcc-10 Fortran double real
TEST_SCRIPT: ./scripts/ci-gcc-10-Fortran-double-real.sh
- JOBNAME: gcc-10 Fortran single complex
TEST_SCRIPT: ./scripts/ci-gcc-10-Fortran-single-complex.sh
- JOBNAME: gcc-10 Fortran double complex
TEST_SCRIPT: ./scripts/ci-gcc-10-Fortran-double-complex.sh
- JOBNAME: MPI single real
TEST_SCRIPT: ./scripts/ci-MPI-single-real.sh
- JOBNAME: MPI double real
Expand All @@ -147,21 +131,21 @@ jobs:
TEST_SCRIPT: ./scripts/ci-MPI-single-complex.sh
- JOBNAME: MPI double complex
TEST_SCRIPT: ./scripts/ci-MPI-double-complex.sh
- JOBNAME: clang-12 / gfortran-11 C single real
TEST_SCRIPT: ./scripts/ci-clang-12-gfortran-11-C-single-real.sh
- JOBNAME: clang-12 / gfortran-11 C double real
TEST_SCRIPT: ./scripts/ci-clang-12-gfortran-11-C-double-real.sh
- JOBNAME: clang-12 / gfortran-11 C single complex
TEST_SCRIPT: ./scripts/ci-clang-12-gfortran-11-C-single-complex.sh
- JOBNAME: clang-12 / gfortran-11 C double complex
TEST_SCRIPT: ./scripts/ci-clang-12-gfortran-11-C-double-complex.sh
- JOBNAME: clang-16 / gfortran-10 C single real
TEST_SCRIPT: ./scripts/ci-clang-16-gfortran-10-C-single-real.sh
- JOBNAME: clang-16 / gfortran-10 C double real
TEST_SCRIPT: ./scripts/ci-clang-16-gfortran-10-C-double-real.sh
- JOBNAME: clang-16 / gfortran-10 C single complex
TEST_SCRIPT: ./scripts/ci-clang-16-gfortran-10-C-single-complex.sh
- JOBNAME: clang-16 / gfortran-10 C double complex
TEST_SCRIPT: ./scripts/ci-clang-16-gfortran-10-C-double-complex.sh
steps:
- name: Check out sources
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Prepare container
run: ./scripts/prepare-container-bionic.sh
run: ./scripts/prepare-container-focal.sh
- name: Build and test library
env:
BLAS_VENDOR: ${{ matrix.BLAS_VENDOR || env.BLAS_VENDOR }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/container.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
context: .
file: Dockerfile-bionic
push: true
tags: nicolasbock/bml:latest, nicolasbock/bml:bionic
tags: nicolasbock/bml:bionic
- name: Image digest
run: |
echo "Default image: ${{ steps.docker_build_bionic.outputs.digest }}"
Expand All @@ -55,7 +55,7 @@ jobs:
context: .
file: Dockerfile-focal
push: true
tags: nicolasbock/bml:focal
tags: nicolasbock/bml:latest, nicolasbock/bml:focal
- name: Image digest
run: |
echo "Focal image: ${{ steps.docker_build_focal.outputs.digest }}"
10 changes: 9 additions & 1 deletion Dockerfile-focal
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@ FROM ubuntu:focal
LABEL org.opencontainers.image.authors="nicolasbock@gmail.com"

COPY scripts/prepare-container-focal.sh /usr/sbin
RUN /usr/sbin/prepare-container-focal.sh

RUN /usr/sbin/prepare-container-focal.sh install_base
RUN /usr/sbin/prepare-container-focal.sh configure_llvm
RUN /usr/sbin/prepare-container-focal.sh configure_gcc
RUN /usr/sbin/prepare-container-focal.sh configure_emacs
RUN /usr/sbin/prepare-container-focal.sh set_timezone
RUN /usr/sbin/prepare-container-focal.sh install_base_packages
RUN /usr/sbin/prepare-container-focal.sh install_compilers
RUN /usr/sbin/prepare-container-focal.sh install_linters

WORKDIR /root
8 changes: 4 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,12 @@ Alternatively, you can run one of the CI tests by executing e.g.

.. code-block:: console

I have no name!@6ea3f4937c0d:/bml$ ./scripts/ci-gcc-11-C-single-real.sh
+++ dirname ./scripts/ci-gcc-11-C-single-real.sh
I have no name!@6ea3f4937c0d:/bml$ ./scripts/ci-gcc-10-C-single-real.sh
+++ dirname ./scripts/ci-gcc-10-C-single-real.sh
++ readlink --canonicalize ./scripts/..
+ basedir=/bml
+ export CC=gcc-11
+ CC=gcc-11
+ export CC=gcc-10
+ CC=gcc-10
+ export CXX=g++-11
+ CXX=g++-11
+ export FC=gfortran-11
Expand Down
10 changes: 5 additions & 5 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ compile - Compile the sources
install - Install the compiled sources
testing - Run the test suite
docs - Generate the API documentation
indent - Check the indentation of the sources
indent - Indent sources
check_indent - Check the indentation of the sources
tags - Create tags file for vim and emacs
dist - Generate a tar file (this only works with git)
Expand Down Expand Up @@ -315,9 +315,9 @@ testing() {
cd "${TOP_DIR}"
}

check_indent() {
indent() {
cd "${TOP_DIR}"
"${TOP_DIR}/scripts/indent.sh" 2>&1 | tee -a "${LOG_FILE}"
"${TOP_DIR}/scripts/indent.sh" "$@" 2>&1 | tee -a "${LOG_FILE}"
check_pipe_error
}

Expand Down Expand Up @@ -399,10 +399,10 @@ if [[ $# -gt 0 ]]; then
docs
;;
"indent")
check_indent
indent
;;
"check_indent")
check_indent
indent check
;;
"tags")
tags
Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ Inside the container:

Alternatively, you can run one of the CI tests by executing e.g.

$ ./scripts/ci-gcc-11-C-single-real.sh
$ ./scripts/ci-gcc-10-C-single-real.sh

# Build Instructions

Expand Down
1 change: 1 addition & 0 deletions scripts/ci-MPI-double-complex.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export BML_MPI=${BML_MPI:-yes}
export TESTING_EXTRA_ARGS=${TESTING_EXTRA_ARGS:-"-R MPI-C-.*-double_complex"}
export BML_SCALAPACK=${BML_SCALAPACK:-yes}
export SCALAPACK_LIBRARIES=${SCALAPACK_LIBRARIES:=scalapack-openmpi.so}
export BML_MPIEXEC_PREFLAGS=--oversubscribe

[[ -f ${basedir}/scripts/ci-defaults.sh ]] && . ${basedir}/scripts/ci-defaults.sh

Expand Down
1 change: 1 addition & 0 deletions scripts/ci-MPI-double-real.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export BML_MPI=${BML_MPI:-yes}
export TESTING_EXTRA_ARGS=${TESTING_EXTRA_ARGS:-"-R MPI-C-.*-double_real"}
export BML_SCALAPACK=${BML_SCALAPACK:-yes}
export SCALAPACK_LIBRARIES=${SCALAPACK_LIBRARIES:=scalapack-openmpi.so}
export BML_MPIEXEC_PREFLAGS=--oversubscribe

[[ -f ${basedir}/scripts/ci-defaults.sh ]] && . ${basedir}/scripts/ci-defaults.sh

Expand Down
1 change: 1 addition & 0 deletions scripts/ci-MPI-single-complex.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export BML_MPI=${BML_MPI:-yes}
export TESTING_EXTRA_ARGS=${TESTING_EXTRA_ARGS:-"-R MPI-C-.*-single_complex"}
export BML_SCALAPACK=${BML_SCALAPACK:-yes}
export SCALAPACK_LIBRARIES=${SCALAPACK_LIBRARIES:=scalapack-openmpi.so}
export BML_MPIEXEC_PREFLAGS=--oversubscribe

[[ -f ${basedir}/scripts/ci-defaults.sh ]] && . ${basedir}/scripts/ci-defaults.sh

Expand Down
1 change: 1 addition & 0 deletions scripts/ci-MPI-single-real.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export BML_MPI=${BML_MPI:-yes}
export TESTING_EXTRA_ARGS=${TESTING_EXTRA_ARGS:-"-R MPI-C-.*-single_real"}
export BML_SCALAPACK=${BML_SCALAPACK:-yes}
export SCALAPACK_LIBRARIES=${SCALAPACK_LIBRARIES:=scalapack-openmpi.so}
export BML_MPIEXEC_PREFLAGS=--oversubscribe

[[ -f ${basedir}/scripts/ci-defaults.sh ]] && . ${basedir}/scripts/ci-defaults.sh

Expand Down
18 changes: 18 additions & 0 deletions scripts/ci-clang-16-gfortran-10-C-double-complex.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

set -e -u -x

basedir=$(readlink --canonicalize $(dirname $0)/..)

export CC=${CC:-clang-16}
export CXX=${CXX:-clang++-16}
export FC=${FC:-gfortran-10}
export BUILD_SHARED_LIBS=${BUILD_SHARED_LIBS:-no}
export BML_OPENMP=${BML_OPENMP:-no}
export BML_INTERNAL_BLAS=${BML_INTERNAL_BLAS:-no}
export TESTING_EXTRA_ARGS=${TESTING_EXTRA_ARGS:-"-R C-.*-double_complex"}
export BML_VALGRIND=${BML_VALGRIND:-yes}

[[ -f ${basedir}/scripts/ci-defaults.sh ]] && . ${basedir}/scripts/ci-defaults.sh

${basedir}/build.sh testing
18 changes: 18 additions & 0 deletions scripts/ci-clang-16-gfortran-10-C-double-real.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

set -e -u -x

basedir=$(readlink --canonicalize $(dirname $0)/..)

export CC=${CC:-clang-16}
export CXX=${CXX:-clang++-16}
export FC=${FC:-gfortran-10}
export BUILD_SHARED_LIBS=${BUILD_SHARED_LIBS:-no}
export BML_OPENMP=${BML_OPENMP:-no}
export BML_INTERNAL_BLAS=${BML_INTERNAL_BLAS:-no}
export TESTING_EXTRA_ARGS=${TESTING_EXTRA_ARGS:-"-R C-.*-double_real"}
export BML_VALGRIND=${BML_VALGRIND:-yes}

[[ -f ${basedir}/scripts/ci-defaults.sh ]] && . ${basedir}/scripts/ci-defaults.sh

${basedir}/build.sh testing
18 changes: 18 additions & 0 deletions scripts/ci-clang-16-gfortran-10-C-single-complex.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

set -e -u -x

basedir=$(readlink --canonicalize $(dirname $0)/..)

export CC=${CC:-clang-16}
export CXX=${CXX:-clang++-16}
export FC=${FC:-gfortran-10}
export BUILD_SHARED_LIBS=${BUILD_SHARED_LIBS:-no}
export BML_OPENMP=${BML_OPENMP:-no}
export BML_INTERNAL_BLAS=${BML_INTERNAL_BLAS:-no}
export TESTING_EXTRA_ARGS=${TESTING_EXTRA_ARGS:-"-R C-.*-single_complex"}
export BML_VALGRIND=${BML_VALGRIND:-yes}

[[ -f ${basedir}/scripts/ci-defaults.sh ]] && . ${basedir}/scripts/ci-defaults.sh

${basedir}/build.sh testing
18 changes: 18 additions & 0 deletions scripts/ci-clang-16-gfortran-10-C-single-real.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

set -e -u -x

basedir=$(readlink --canonicalize $(dirname $0)/..)

export CC=${CC:-clang-16}
export CXX=${CXX:-clang++-16}
export FC=${FC:-gfortran-10}
export BUILD_SHARED_LIBS=${BUILD_SHARED_LIBS:-no}
export BML_OPENMP=${BML_OPENMP:-no}
export BML_INTERNAL_BLAS=${BML_INTERNAL_BLAS:-no}
export TESTING_EXTRA_ARGS=${TESTING_EXTRA_ARGS:-"-R C-.*-single_real"}
export BML_VALGRIND=${BML_VALGRIND:-yes}

[[ -f ${basedir}/scripts/ci-defaults.sh ]] && . ${basedir}/scripts/ci-defaults.sh

${basedir}/build.sh testing
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ set -e -u -x

basedir=$(readlink --canonicalize $(dirname $0)/..)

export CC=${CC:-clang-12}
export CXX=${CXX:-clang++-12}
export CC=${CC:-clang-16}
export CXX=${CXX:-clang++-16}
export FC=${FC:-gfortran-11}
export BUILD_SHARED_LIBS=${BUILD_SHARED_LIBS:-no}
export BML_OPENMP=${BML_OPENMP:-no}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ set -e -u -x

basedir=$(readlink --canonicalize $(dirname $0)/..)

export CC=${CC:-clang-12}
export CXX=${CXX:-clang++-12}
export CC=${CC:-clang-16}
export CXX=${CXX:-clang++-16}
export FC=${FC:-gfortran-11}
export BUILD_SHARED_LIBS=${BUILD_SHARED_LIBS:-no}
export BML_OPENMP=${BML_OPENMP:-no}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ set -e -u -x

basedir=$(readlink --canonicalize $(dirname $0)/..)

export CC=${CC:-clang-12}
export CXX=${CXX:-clang++-12}
export CC=${CC:-clang-16}
export CXX=${CXX:-clang++-16}
export FC=${FC:-gfortran-11}
export BUILD_SHARED_LIBS=${BUILD_SHARED_LIBS:-no}
export BML_OPENMP=${BML_OPENMP:-no}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ set -e -u -x

basedir=$(readlink --canonicalize $(dirname $0)/..)

export CC=${CC:-clang-12}
export CXX=${CXX:-clang++-12}
export CC=${CC:-clang-16}
export CXX=${CXX:-clang++-16}
export FC=${FC:-gfortran-11}
export BUILD_SHARED_LIBS=${BUILD_SHARED_LIBS:-no}
export BML_OPENMP=${BML_OPENMP:-no}
Expand Down
Loading