Skip to content

Commit 4f3af67

Browse files
proux01CohenCyril
andcommitted
[CI] Add a job stdlib-html
Co-authored-by: Cyril Cohen <[email protected]>
1 parent 84c7e1f commit 4f3af67

File tree

3 files changed

+66
-0
lines changed

3 files changed

+66
-0
lines changed

.github/workflows/nix-action-coq-master.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5841,6 +5841,58 @@ jobs:
58415841
name: Building/fetching current CI target
58425842
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-master"
58435843
--argstr job "stdlib"
5844+
stdlib-html:
5845+
needs:
5846+
- coq
5847+
runs-on: ubuntu-latest
5848+
steps:
5849+
- name: Determine which commit to initially checkout
5850+
run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"target_commit=${{\
5851+
\ github.sha }}\" >> $GITHUB_ENV\nelse\n echo \"target_commit=${{ github.event.pull_request.head.sha\
5852+
\ }}\" >> $GITHUB_ENV\nfi\n"
5853+
- name: Git checkout
5854+
uses: actions/checkout@v4
5855+
with:
5856+
fetch-depth: 0
5857+
ref: ${{ env.target_commit }}
5858+
- name: Determine which commit to test
5859+
run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"tested_commit=${{\
5860+
\ github.sha }}\" >> $GITHUB_ENV\nelse\n merge_commit=$(git ls-remote ${{\
5861+
\ github.event.repository.html_url }} refs/pull/${{ github.event.number }}/merge\
5862+
\ | cut -f1)\n mergeable=$(git merge --no-commit --no-ff ${{ github.event.pull_request.base.sha\
5863+
\ }} > /dev/null 2>&1; echo $?; git merge --abort > /dev/null 2>&1 || true)\n\
5864+
\ if [ -z \"$merge_commit\" -o \"x$mergeable\" != \"x0\" ]; then\n echo\
5865+
\ \"tested_commit=${{ github.event.pull_request.head.sha }}\" >> $GITHUB_ENV\n\
5866+
\ else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n fi\nfi\n"
5867+
- name: Git checkout
5868+
uses: actions/checkout@v4
5869+
with:
5870+
fetch-depth: 0
5871+
ref: ${{ env.tested_commit }}
5872+
- name: Cachix install
5873+
uses: cachix/install-nix-action@v27
5874+
with:
5875+
nix_path: nixpkgs=channel:nixpkgs-unstable
5876+
- name: Cachix setup coq-community
5877+
uses: cachix/cachix-action@v15
5878+
with:
5879+
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
5880+
extraPullNames: coq, math-comp
5881+
name: coq-community
5882+
- id: stepCheck
5883+
name: Checking presence of CI target stdlib-html
5884+
run: "nb_dry_run=$(NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr\
5885+
\ bundle \"coq-master\" --argstr job \"stdlib-html\" \\\n --dry-run 2>&1\
5886+
\ > /dev/null)\necho $nb_dry_run\necho status=$(echo $nb_dry_run | grep \"\
5887+
built:\" | sed \"s/.*/built/\") >> $GITHUB_OUTPUT\n"
5888+
- if: steps.stepCheck.outputs.status == 'built'
5889+
name: 'Building/fetching previous CI target: coq'
5890+
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-master"
5891+
--argstr job "coq"
5892+
- if: steps.stepCheck.outputs.status == 'built'
5893+
name: Building/fetching current CI target
5894+
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-master"
5895+
--argstr job "stdlib-html"
58445896
stdlib-refman-html:
58455897
needs:
58465898
- coq

.nix/config.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ with builtins; with (import <nixpkgs> {}).lib;
197197
tlc.override.version = "master-for-coq-ci";
198198
smtcoq-trakt.override.version = "with-trakt-coq-master";
199199
} // {
200+
stdlib-html.job = true;
200201
stdlib-refman-html.job = true;
201202
stdlib-test.job = true;
202203
coq-elpi.override.version = "proux01:stdlib_repo";
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{ graphviz, stdlib, coqPackages }:
2+
3+
coqPackages.lib.overrideCoqDerivation {
4+
pname = "stdlib-html";
5+
6+
overrideBuildInputs = stdlib.buildInputs ++ [ graphviz ];
7+
8+
preBuild = ''
9+
patchShebangs doc/stdlib/make-library-index
10+
'';
11+
12+
buildFlags = [ "stdlib-html" ];
13+
} stdlib

0 commit comments

Comments
 (0)