Skip to content

Commit

Permalink
fixing CI dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
CohenCyril authored and proux01 committed Sep 23, 2024
1 parent c97d6bc commit 8940eb4
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 18 deletions.
38 changes: 34 additions & 4 deletions .github/workflows/nix-action-coq-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5827,7 +5827,8 @@ jobs:
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-master"
--argstr job "stdlib"
stdlib-html:
needs: []
needs:
- coq
runs-on: ubuntu-latest
steps:
- name: Determine which commit to initially checkout
Expand Down Expand Up @@ -5869,12 +5870,18 @@ jobs:
\ bundle \"coq-master\" --argstr job \"stdlib-html\" \\\n --dry-run 2>&1\
\ > /dev/null)\necho $nb_dry_run\necho status=$(echo $nb_dry_run | grep \"\
built:\" | sed \"s/.*/built/\") >> $GITHUB_OUTPUT\n"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: coq'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-master"
--argstr job "coq"
- if: steps.stepCheck.outputs.status == 'built'
name: Building/fetching current CI target
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-master"
--argstr job "stdlib-html"
stdlib-refman-html:
needs: []
needs:
- coq
- stdlib
runs-on: ubuntu-latest
steps:
- name: Determine which commit to initially checkout
Expand Down Expand Up @@ -5916,12 +5923,21 @@ jobs:
\ bundle \"coq-master\" --argstr job \"stdlib-refman-html\" \\\n --dry-run\
\ 2>&1 > /dev/null)\necho $nb_dry_run\necho status=$(echo $nb_dry_run | grep\
\ \"built:\" | sed \"s/.*/built/\") >> $GITHUB_OUTPUT\n"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: coq'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-master"
--argstr job "coq"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: stdlib'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-master"
--argstr job "stdlib"
- if: steps.stepCheck.outputs.status == 'built'
name: Building/fetching current CI target
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-master"
--argstr job "stdlib-refman-html"
stdlib-subcomponents:
needs: []
needs:
- coq
runs-on: ubuntu-latest
steps:
- name: Determine which commit to initially checkout
Expand Down Expand Up @@ -5963,12 +5979,18 @@ jobs:
\ bundle \"coq-master\" --argstr job \"stdlib-subcomponents\" \\\n --dry-run\
\ 2>&1 > /dev/null)\necho $nb_dry_run\necho status=$(echo $nb_dry_run | grep\
\ \"built:\" | sed \"s/.*/built/\") >> $GITHUB_OUTPUT\n"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: coq'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-master"
--argstr job "coq"
- if: steps.stepCheck.outputs.status == 'built'
name: Building/fetching current CI target
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-master"
--argstr job "stdlib-subcomponents"
stdlib-test:
needs: []
needs:
- coq
- stdlib
runs-on: ubuntu-latest
steps:
- name: Determine which commit to initially checkout
Expand Down Expand Up @@ -6010,6 +6032,14 @@ jobs:
\ bundle \"coq-master\" --argstr job \"stdlib-test\" \\\n --dry-run 2>&1\
\ > /dev/null)\necho $nb_dry_run\necho status=$(echo $nb_dry_run | grep \"\
built:\" | sed \"s/.*/built/\") >> $GITHUB_OUTPUT\n"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: coq'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-master"
--argstr job "coq"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: stdlib'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-master"
--argstr job "stdlib"
- if: steps.stepCheck.outputs.status == 'built'
name: Building/fetching current CI target
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-master"
Expand Down
11 changes: 7 additions & 4 deletions .nix/coq-overlays/stdlib-html/default.nix
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
{ graphviz, stdlib }:
stdlib.overrideAttrs (o: {
buildInputs = o.buildInputs ++ [ graphviz ];
{ graphviz, stdlib, coqPackages }:

coqPackages.lib.overrideCoqDerivation {
pname = "stdlib-html";

overrideBuildInputs = stdlib.buildInputs ++ [ graphviz ];

preBuild = ''
patchShebangs doc/stdlib/make-library-index
'';

buildFlags = [ "stdlib-html" ];
})
} stdlib
10 changes: 6 additions & 4 deletions .nix/coq-overlays/stdlib-refman-html/default.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{ antlr4_9, python311, coq, stdlib }:
{ antlr4_9, python311, coq, stdlib, coqPackages }:

stdlib.overrideAttrs (o: {
buildInputs = o.buildInputs ++ [ coq.ocamlPackages.ocaml coq.ocamlPackages.dune_3 stdlib ]
coqPackages.lib.overrideCoqDerivation {
pname = "stdlib-refman-html";

overrideBuildInputs = stdlib.buildInputs ++ [ coq.ocamlPackages.ocaml coq.ocamlPackages.dune_3 stdlib ]
++ [
# Sphinx doc dependencies
(python311.withPackages
Expand All @@ -16,4 +18,4 @@ stdlib.overrideAttrs (o: {
echo "nothing to install"
touch $out
'';
})
} stdlib
6 changes: 3 additions & 3 deletions .nix/coq-overlays/stdlib-subcomponents/default.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# CI job to test that we don't break the subcomponent structure of the stdlib,
# as described in the graph doc/stdlib/depends

{ stdlib }:
{ stdlib, coqPackages }:

let
# stdlib subcomponents with their dependencies
Expand Down Expand Up @@ -53,7 +53,7 @@ let
stdlib_ = component: let
pname = "stdlib-${component}";
stdlib-deps = map stdlib_ components.${component};
in stdlib.overrideAttrs ({
in coqPackages.lib.overrideCoqDerivation ({
inherit pname;
propagatedBuildInputs = stdlib-deps;
} // (if component != "all" then {
Expand All @@ -66,5 +66,5 @@ let
installPhase = ''
echo "nothing left to install"
'';
}));
})) stdlib;
in stdlib_ "all"
9 changes: 6 additions & 3 deletions .nix/coq-overlays/stdlib-test/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{ rsync, coq, stdlib }:
{ rsync, coq, stdlib, coqPackages }:

coqPackages.lib.overrideCoqDerivation {

pname = "stdlib-test";

stdlib.overrideAttrs {
propagatedBuildInputs = [ rsync stdlib ]
++ (with coq.ocamlPackages; [ ocaml findlib zarith ]);

Expand All @@ -11,4 +14,4 @@ stdlib.overrideAttrs {
installPhase = ''
echo "nothing to install"
'';
}
} stdlib

0 comments on commit 8940eb4

Please sign in to comment.