Update ci for docs with configure

This commit is contained in:
Alejandro Gallo 2022-03-15 14:25:31 +01:00
parent 764d27d67c
commit fb9fdab703
3 changed files with 26 additions and 11 deletions

View File

@ -46,9 +46,8 @@ jobs:
- name: Make configure script - name: Make configure script
env: env:
WITH_SHELL: "nix-shell --argstr compiler ${{matrix.compiler}} --run" 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}} - name: Compiler ${{matrix.compiler}}
env: env:
WITH_SHELL: "nix-shell ../../shell.nix --argstr compiler ${{matrix.compiler}} --run" WITH_SHELL: "nix-shell ../../shell.nix --argstr compiler ${{matrix.compiler}} --run"
@ -73,12 +72,15 @@ jobs:
- name: Check configure - name: Check configure
run: test -f configure run: test -f configure
- name: Install dependencies - name: Configure
env:
WITH_SHELL: "nix-shell --argstr compiler gcc6 --run"
run: | run: |
cd docs ${WITH_SHELL} 'autoreconf -sfiv'
nix-shell --run 'emacs --version' ${WITH_SHELL} './configure --enable-docs'
nix-shell --run 'python --version' ${WITH_SHELL} 'emacs --version'
nix-shell --run 'sphinx-build --version' ${WITH_SHELL} 'python --version'
${WITH_SHELL} 'sphinx-build --version'
- name: doxygen - name: doxygen
run: | run: |

View File

@ -7,7 +7,6 @@
]; ];
shellHook = '' shellHook = ''
export OPENBLAS_PATH=${pkgs.openblas}
export SCALAPACK_PATH=${pkgs.scalapack} export SCALAPACK_PATH=${pkgs.scalapack}
export LD_LIBRARY_PATH=${pkgs.scalapack}/lib:$LD_LIBRARY_PATH export LD_LIBRARY_PATH=${pkgs.scalapack}/lib:$LD_LIBRARY_PATH
''; '';

View File

@ -1,4 +1,4 @@
{ compiler, pkgs ? import <nixpkgs> {} , with-mkl ? false }: { compiler ? "gcc", pkgs ? import <nixpkgs> {} , with-mkl ? false, docs ? true }:
let let
@ -8,8 +8,6 @@ let
openblas = import ./etc/nix/openblas.nix { inherit pkgs; }; openblas = import ./etc/nix/openblas.nix { inherit pkgs; };
clang = import ./etc/nix/clang.nix { inherit pkgs; };
in in
pkgs.mkShell rec { pkgs.mkShell rec {
@ -33,6 +31,21 @@ pkgs.mkShell rec {
else if compiler == "clang5" then pkgs.clang_5 else if compiler == "clang5" then pkgs.clang_5
else pkgs.gcc; else pkgs.gcc;
docInputs = with pkgs; [
emacs
emacsPackages.ox-rst
emacsPackages.htmlize
python3
python3Packages.breathe
doxygen
sphinx
graphviz
];
buildInputs buildInputs
= with pkgs; [ = with pkgs; [
@ -53,6 +66,7 @@ pkgs.mkShell rec {
pkg-config pkg-config
] ]
++ (if with-mkl then mkl.buildInputs else openblas.buildInputs) ++ (if with-mkl then mkl.buildInputs else openblas.buildInputs)
++ (if docs then docInputs else [])
; ;
CXX = "${compiler-pkg}/bin/c++"; CXX = "${compiler-pkg}/bin/c++";