Skip to content

Commit bc1b4e3

Browse files
committed
[CI] Add infotheo
1 parent e224b1a commit bc1b4e3

File tree

3 files changed

+147
-0
lines changed

3 files changed

+147
-0
lines changed

.github/workflows/nix-action-9.0.yml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -449,6 +449,78 @@ jobs:
449449
name: Building/fetching current CI target
450450
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "9.0" --argstr
451451
job "mathcomp-experimental-reals"
452+
mathcomp-infotheo:
453+
needs:
454+
- coq
455+
- mathcomp-analysis-stdlib
456+
runs-on: ubuntu-latest
457+
steps:
458+
- name: Determine which commit to initially checkout
459+
run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"target_commit=${{
460+
github.sha }}\" >> $GITHUB_ENV\nelse\n echo \"target_commit=${{ github.event.pull_request.head.sha
461+
}}\" >> $GITHUB_ENV\nfi\n"
462+
- name: Git checkout
463+
uses: actions/checkout@v4
464+
with:
465+
fetch-depth: 0
466+
ref: ${{ env.target_commit }}
467+
- name: Determine which commit to test
468+
run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"tested_commit=${{
469+
github.sha }}\" >> $GITHUB_ENV\nelse\n merge_commit=$(git ls-remote ${{ github.event.repository.html_url
470+
}} refs/pull/${{ github.event.number }}/merge | cut -f1)\n mergeable=$(git
471+
merge --no-commit --no-ff ${{ github.event.pull_request.base.sha }} > /dev/null
472+
2>&1; echo $?; git merge --abort > /dev/null 2>&1 || true)\n if [ -z \"$merge_commit\"\
473+
\ -o \"x$mergeable\" != \"x0\" ]; then\n echo \"tested_commit=${{ github.event.pull_request.head.sha
474+
}}\" >> $GITHUB_ENV\n else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n\
475+
\ fi\nfi\n"
476+
- name: Git checkout
477+
uses: actions/checkout@v4
478+
with:
479+
fetch-depth: 0
480+
ref: ${{ env.tested_commit }}
481+
- name: Cachix install
482+
uses: cachix/install-nix-action@v31
483+
with:
484+
nix_path: nixpkgs=channel:nixpkgs-unstable
485+
- name: Cachix setup math-comp
486+
uses: cachix/cachix-action@v16
487+
with:
488+
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
489+
extraPullNames: coq, coq-community
490+
name: math-comp
491+
- id: stepGetDerivation
492+
name: Getting derivation for current job (mathcomp-infotheo)
493+
run: "NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr bundle
494+
\"9.0\" --argstr job \"mathcomp-infotheo\" \\\n --dry-run 2> err > out ||
495+
(touch fail; true)\ncat out err\nif [ -e fail ]; then echo \"Error: getting
496+
derivation failed\"; exit 1; fi\n"
497+
- id: stepCheck
498+
name: Checking presence of CI target for current job
499+
run: "if $(cat out err | grep -q \"built:\") ; then\n echo \"CI target needs
500+
actual building\"\n if $(cat out err | grep -q \"derivations will be built:\"\
501+
) ; then\n echo \"waiting a bit for derivations that should be in cache\"\
502+
\n sleep 30\n fi\nelse\n echo \"CI target already built\"\n echo \"\
503+
status=fetched\" >> $GITHUB_OUTPUT\nfi\n"
504+
- if: steps.stepCheck.outputs.status != 'fetched'
505+
name: 'Building/fetching previous CI target: coq'
506+
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "9.0" --argstr
507+
job "coq"
508+
- if: steps.stepCheck.outputs.status != 'fetched'
509+
name: 'Building/fetching previous CI target: mathcomp-analysis-stdlib'
510+
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "9.0" --argstr
511+
job "mathcomp-analysis-stdlib"
512+
- if: steps.stepCheck.outputs.status != 'fetched'
513+
name: 'Building/fetching previous CI target: mathcomp-algebra-tactics'
514+
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "9.0" --argstr
515+
job "mathcomp-algebra-tactics"
516+
- if: steps.stepCheck.outputs.status != 'fetched'
517+
name: 'Building/fetching previous CI target: interval'
518+
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "9.0" --argstr
519+
job "interval"
520+
- if: steps.stepCheck.outputs.status != 'fetched'
521+
name: Building/fetching current CI target
522+
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "9.0" --argstr
523+
job "mathcomp-infotheo"
452524
mathcomp-reals:
453525
needs:
454526
- coq

.github/workflows/nix-action-9.1.yml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -449,6 +449,78 @@ jobs:
449449
name: Building/fetching current CI target
450450
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "9.1" --argstr
451451
job "mathcomp-experimental-reals"
452+
mathcomp-infotheo:
453+
needs:
454+
- coq
455+
- mathcomp-analysis-stdlib
456+
runs-on: ubuntu-latest
457+
steps:
458+
- name: Determine which commit to initially checkout
459+
run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"target_commit=${{
460+
github.sha }}\" >> $GITHUB_ENV\nelse\n echo \"target_commit=${{ github.event.pull_request.head.sha
461+
}}\" >> $GITHUB_ENV\nfi\n"
462+
- name: Git checkout
463+
uses: actions/checkout@v4
464+
with:
465+
fetch-depth: 0
466+
ref: ${{ env.target_commit }}
467+
- name: Determine which commit to test
468+
run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"tested_commit=${{
469+
github.sha }}\" >> $GITHUB_ENV\nelse\n merge_commit=$(git ls-remote ${{ github.event.repository.html_url
470+
}} refs/pull/${{ github.event.number }}/merge | cut -f1)\n mergeable=$(git
471+
merge --no-commit --no-ff ${{ github.event.pull_request.base.sha }} > /dev/null
472+
2>&1; echo $?; git merge --abort > /dev/null 2>&1 || true)\n if [ -z \"$merge_commit\"\
473+
\ -o \"x$mergeable\" != \"x0\" ]; then\n echo \"tested_commit=${{ github.event.pull_request.head.sha
474+
}}\" >> $GITHUB_ENV\n else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n\
475+
\ fi\nfi\n"
476+
- name: Git checkout
477+
uses: actions/checkout@v4
478+
with:
479+
fetch-depth: 0
480+
ref: ${{ env.tested_commit }}
481+
- name: Cachix install
482+
uses: cachix/install-nix-action@v31
483+
with:
484+
nix_path: nixpkgs=channel:nixpkgs-unstable
485+
- name: Cachix setup math-comp
486+
uses: cachix/cachix-action@v16
487+
with:
488+
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
489+
extraPullNames: coq, coq-community
490+
name: math-comp
491+
- id: stepGetDerivation
492+
name: Getting derivation for current job (mathcomp-infotheo)
493+
run: "NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr bundle
494+
\"9.1\" --argstr job \"mathcomp-infotheo\" \\\n --dry-run 2> err > out ||
495+
(touch fail; true)\ncat out err\nif [ -e fail ]; then echo \"Error: getting
496+
derivation failed\"; exit 1; fi\n"
497+
- id: stepCheck
498+
name: Checking presence of CI target for current job
499+
run: "if $(cat out err | grep -q \"built:\") ; then\n echo \"CI target needs
500+
actual building\"\n if $(cat out err | grep -q \"derivations will be built:\"\
501+
) ; then\n echo \"waiting a bit for derivations that should be in cache\"\
502+
\n sleep 30\n fi\nelse\n echo \"CI target already built\"\n echo \"\
503+
status=fetched\" >> $GITHUB_OUTPUT\nfi\n"
504+
- if: steps.stepCheck.outputs.status != 'fetched'
505+
name: 'Building/fetching previous CI target: coq'
506+
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "9.1" --argstr
507+
job "coq"
508+
- if: steps.stepCheck.outputs.status != 'fetched'
509+
name: 'Building/fetching previous CI target: mathcomp-analysis-stdlib'
510+
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "9.1" --argstr
511+
job "mathcomp-analysis-stdlib"
512+
- if: steps.stepCheck.outputs.status != 'fetched'
513+
name: 'Building/fetching previous CI target: mathcomp-algebra-tactics'
514+
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "9.1" --argstr
515+
job "mathcomp-algebra-tactics"
516+
- if: steps.stepCheck.outputs.status != 'fetched'
517+
name: 'Building/fetching previous CI target: interval'
518+
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "9.1" --argstr
519+
job "interval"
520+
- if: steps.stepCheck.outputs.status != 'fetched'
521+
name: Building/fetching current CI target
522+
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "9.1" --argstr
523+
job "mathcomp-infotheo"
452524
mathcomp-reals:
453525
needs:
454526
- coq

.nix/config.nix

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ let
77
mathcomp-reals-stdlib.job = true;
88
mathcomp-analysis-stdlib.job = true;
99
ssprove.override.version = "main";
10+
mathcomp-infotheo.override.version = "master";
1011
};
1112
in {
1213
## DO NOT CHANGE THIS
@@ -55,6 +56,7 @@ in {
5556
bundles."8.20-2.4.0".coqPackages = common-bundle // {
5657
coq.override.version = "8.20";
5758
mathcomp.override.version = "2.4.0";
59+
mathcomp-infotheo.job = false;
5860
};
5961

6062
bundles."9.0" = {
@@ -94,6 +96,7 @@ in {
9496
mathcomp-bigenough.override.version = "master";
9597
mathcomp-finmap.override.version = "master";
9698
ssprove.job = false;
99+
mathcomp-infotheo.job = false;
97100
};
98101
};
99102

0 commit comments

Comments
 (0)