From fb9fdab70357876f074d2ed85da61f509157dc08 Mon Sep 17 00:00:00 2001 From: Alejandro Gallo Date: Tue, 15 Mar 2022 14:25:31 +0100 Subject: [PATCH] Update ci for docs with configure --- .github/workflows/main.yml | 16 +++++++++------- etc/nix/openblas.nix | 1 - shell.nix | 20 +++++++++++++++++--- 3 files changed, 26 insertions(+), 11 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9c2c2a9..488a451 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -46,9 +46,8 @@ jobs: - name: Make configure script env: WITH_SHELL: "nix-shell --argstr compiler ${{matrix.compiler}} --run" - run: test -f ./configure || ${WITH_SHELL} 'autoreconf -sfiv' + run: ${WITH_SHELL} 'autoreconf -sfiv' - ## TODO: do this in a matrix - name: Compiler ${{matrix.compiler}} env: WITH_SHELL: "nix-shell ../../shell.nix --argstr compiler ${{matrix.compiler}} --run" @@ -73,12 +72,15 @@ jobs: - name: Check configure run: test -f configure - - name: Install dependencies + - name: Configure + env: + WITH_SHELL: "nix-shell --argstr compiler gcc6 --run" run: | - cd docs - nix-shell --run 'emacs --version' - nix-shell --run 'python --version' - nix-shell --run 'sphinx-build --version' + ${WITH_SHELL} 'autoreconf -sfiv' + ${WITH_SHELL} './configure --enable-docs' + ${WITH_SHELL} 'emacs --version' + ${WITH_SHELL} 'python --version' + ${WITH_SHELL} 'sphinx-build --version' - name: doxygen run: | diff --git a/etc/nix/openblas.nix b/etc/nix/openblas.nix index 13f4e03..1b9a84d 100644 --- a/etc/nix/openblas.nix +++ b/etc/nix/openblas.nix @@ -7,7 +7,6 @@ ]; shellHook = '' - export OPENBLAS_PATH=${pkgs.openblas} export SCALAPACK_PATH=${pkgs.scalapack} export LD_LIBRARY_PATH=${pkgs.scalapack}/lib:$LD_LIBRARY_PATH ''; diff --git a/shell.nix b/shell.nix index b3a7ece..4db21e5 100644 --- a/shell.nix +++ b/shell.nix @@ -1,4 +1,4 @@ -{ compiler, pkgs ? import {} , with-mkl ? false }: +{ compiler ? "gcc", pkgs ? import {} , with-mkl ? false, docs ? true }: let @@ -8,8 +8,6 @@ let openblas = import ./etc/nix/openblas.nix { inherit pkgs; }; - clang = import ./etc/nix/clang.nix { inherit pkgs; }; - in pkgs.mkShell rec { @@ -33,6 +31,21 @@ pkgs.mkShell rec { else if compiler == "clang5" then pkgs.clang_5 else pkgs.gcc; + docInputs = with pkgs; [ + emacs + emacsPackages.ox-rst + emacsPackages.htmlize + + python3 + python3Packages.breathe + + doxygen + sphinx + + graphviz + ]; + + buildInputs = with pkgs; [ @@ -53,6 +66,7 @@ pkgs.mkShell rec { pkg-config ] ++ (if with-mkl then mkl.buildInputs else openblas.buildInputs) + ++ (if docs then docInputs else []) ; CXX = "${compiler-pkg}/bin/c++";