@@ -465,6 +465,63 @@ jobs:
465465 name : Building/fetching current CI target
466466 run : NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-master"
467467 --argstr job "hierarchy-builder"
468+ hierarchy-builder-test :
469+ needs :
470+ - coq
471+ - coq-elpi
472+ runs-on : ubuntu-latest
473+ steps :
474+ - name : Determine which commit to initially checkout
475+ run : " if [ ${{ github.event_name }} = \" push\" ]; then\n echo \" target_commit=${{\
476+ \ github.sha }}\" >> $GITHUB_ENV\n else\n echo \" target_commit=${{ github.event.pull_request.head.sha\
477+ \ }}\" >> $GITHUB_ENV\n fi\n "
478+ - name : Git checkout
479+ uses : actions/checkout@v4
480+ with :
481+ fetch-depth : 0
482+ ref : ${{ env.target_commit }}
483+ - name : Determine which commit to test
484+ run : " if [ ${{ github.event_name }} = \" push\" ]; then\n echo \" tested_commit=${{\
485+ \ github.sha }}\" >> $GITHUB_ENV\n else\n merge_commit=$(git ls-remote ${{\
486+ \ github.event.repository.html_url }} refs/pull/${{ github.event.number }}/merge\
487+ \ | cut -f1)\n mergeable=$(git merge --no-commit --no-ff ${{ github.event.pull_request.base.sha\
488+ \ }} > /dev/null 2>&1; echo $?; git merge --abort > /dev/null 2>&1 || true)\n \
489+ \ if [ -z \" $merge_commit\" -o \" x$mergeable\" != \" x0\" ]; then\n echo\
490+ \ \" tested_commit=${{ github.event.pull_request.head.sha }}\" >> $GITHUB_ENV\n \
491+ \ else\n echo \" tested_commit=$merge_commit\" >> $GITHUB_ENV\n fi\n fi\n "
492+ - name : Git checkout
493+ uses : actions/checkout@v4
494+ with :
495+ fetch-depth : 0
496+ ref : ${{ env.tested_commit }}
497+ - name : Cachix install
498+ uses : cachix/install-nix-action@v27
499+ with :
500+ nix_path : nixpkgs=channel:nixpkgs-unstable
501+ - name : Cachix setup math-comp
502+ uses : cachix/cachix-action@v15
503+ with :
504+ authToken : ${{ secrets.CACHIX_AUTH_TOKEN }}
505+ extraPullNames : coq, coq-community
506+ name : math-comp
507+ - id : stepCheck
508+ name : Checking presence of CI target hierarchy-builder-test
509+ run : " nb_dry_run=$(NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr\
510+ \ bundle \" coq-master\" --argstr job \" hierarchy-builder-test\" \\\n --dry-run\
511+ \ 2>&1 > /dev/null)\n echo $nb_dry_run\n echo status=$(echo $nb_dry_run | grep\
512+ \ \" built:\" | sed \" s/.*/built/\" ) >> $GITHUB_OUTPUT\n "
513+ - if : steps.stepCheck.outputs.status == 'built'
514+ name : ' Building/fetching previous CI target: coq'
515+ run : NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-master"
516+ --argstr job "coq"
517+ - if : steps.stepCheck.outputs.status == 'built'
518+ name : ' Building/fetching previous CI target: coq-elpi'
519+ run : NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-master"
520+ --argstr job "coq-elpi"
521+ - if : steps.stepCheck.outputs.status == 'built'
522+ name : Building/fetching current CI target
523+ run : NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-master"
524+ --argstr job "hierarchy-builder-test"
468525 mathcomp :
469526 needs :
470527 - coq
0 commit comments