Skip to content

Commit

Permalink
Update nix workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
4ever2 committed Jan 22, 2025
1 parent 417c4bc commit d4369a9
Show file tree
Hide file tree
Showing 5 changed files with 161 additions and 31 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/nix-action-8.18.yml
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,18 @@ jobs:
name: 'Building/fetching previous CI target: mathcomp-analysis'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.18" --argstr
job "mathcomp-analysis"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: mathcomp-experimental-reals'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.18" --argstr
job "mathcomp-experimental-reals"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: mathcomp-word'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.18" --argstr
job "mathcomp-word"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: mathcomp-zify'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.18" --argstr
job "mathcomp-zify"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: extructures'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.18" --argstr
Expand Down
60 changes: 45 additions & 15 deletions .github/workflows/nix-action-8.19.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,18 @@ jobs:
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
extraPullNames: coq, coq-community, math-comp
name: ssprove
- id: stepGetDerivation
name: Getting derivation for current job (coq)
run: "NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr bundle
\"8.19\" --argstr job \"coq\" \\\n --dry-run 2> err > out || (touch fail;
true)\n"
- name: Error reporting
run: "echo \"out=\"; cat out\necho \"err=\"; cat err\n"
- name: Failure check
run: if [ -e fail ]; then exit 1; else exit 0; fi;
- id: stepCheck
name: Checking presence of CI target coq
run: "nb_dry_run=$(NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr
bundle \"8.19\" --argstr job \"coq\" \\\n --dry-run 2>&1 > /dev/null)\n
echo $nb_dry_run\necho status=$(echo $nb_dry_run | grep \"built:\" | sed \"\
s/.*/built/\") >> $GITHUB_OUTPUT\n"
name: Checking presence of CI target for current job
run: (echo -n status=; cat out | grep "built:" | sed "s/.*/built/") >> $GITHUB_OUTPUT
- if: steps.stepCheck.outputs.status == 'built'
name: Building/fetching current CI target
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.19" --argstr
Expand Down Expand Up @@ -84,12 +90,18 @@ jobs:
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
extraPullNames: coq, coq-community, math-comp
name: ssprove
- id: stepGetDerivation
name: Getting derivation for current job (mathcomp-analysis)
run: "NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr bundle
\"8.19\" --argstr job \"mathcomp-analysis\" \\\n --dry-run 2> err > out
|| (touch fail; true)\n"
- name: Error reporting
run: "echo \"out=\"; cat out\necho \"err=\"; cat err\n"
- name: Failure check
run: if [ -e fail ]; then exit 1; else exit 0; fi;
- id: stepCheck
name: Checking presence of CI target mathcomp-analysis
run: "nb_dry_run=$(NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr
bundle \"8.19\" --argstr job \"mathcomp-analysis\" \\\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"
name: Checking presence of CI target for current job
run: (echo -n status=; cat out | grep "built:" | sed "s/.*/built/") >> $GITHUB_OUTPUT
- 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 "8.19" --argstr
Expand Down Expand Up @@ -153,12 +165,18 @@ jobs:
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
extraPullNames: coq, coq-community, math-comp
name: ssprove
- id: stepGetDerivation
name: Getting derivation for current job (ssprove)
run: "NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr bundle
\"8.19\" --argstr job \"ssprove\" \\\n --dry-run 2> err > out || (touch
fail; true)\n"
- name: Error reporting
run: "echo \"out=\"; cat out\necho \"err=\"; cat err\n"
- name: Failure check
run: if [ -e fail ]; then exit 1; else exit 0; fi;
- id: stepCheck
name: Checking presence of CI target ssprove
run: "nb_dry_run=$(NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr
bundle \"8.19\" --argstr job \"ssprove\" \\\n --dry-run 2>&1 > /dev/null)\n
echo $nb_dry_run\necho status=$(echo $nb_dry_run | grep \"built:\" | sed \"\
s/.*/built/\") >> $GITHUB_OUTPUT\n"
name: Checking presence of CI target for current job
run: (echo -n status=; cat out | grep "built:" | sed "s/.*/built/") >> $GITHUB_OUTPUT
- 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 "8.19" --argstr
Expand All @@ -175,6 +193,18 @@ jobs:
name: 'Building/fetching previous CI target: mathcomp-analysis'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.19" --argstr
job "mathcomp-analysis"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: mathcomp-experimental-reals'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.19" --argstr
job "mathcomp-experimental-reals"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: mathcomp-word'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.19" --argstr
job "mathcomp-word"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: mathcomp-zify'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.19" --argstr
job "mathcomp-zify"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: extructures'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.19" --argstr
Expand Down
60 changes: 45 additions & 15 deletions .github/workflows/nix-action-8.20.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,18 @@ jobs:
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
extraPullNames: coq, coq-community, math-comp
name: ssprove
- id: stepGetDerivation
name: Getting derivation for current job (coq)
run: "NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr bundle
\"8.20\" --argstr job \"coq\" \\\n --dry-run 2> err > out || (touch fail;
true)\n"
- name: Error reporting
run: "echo \"out=\"; cat out\necho \"err=\"; cat err\n"
- name: Failure check
run: if [ -e fail ]; then exit 1; else exit 0; fi;
- id: stepCheck
name: Checking presence of CI target coq
run: "nb_dry_run=$(NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr
bundle \"8.20\" --argstr job \"coq\" \\\n --dry-run 2>&1 > /dev/null)\n
echo $nb_dry_run\necho status=$(echo $nb_dry_run | grep \"built:\" | sed \"\
s/.*/built/\") >> $GITHUB_OUTPUT\n"
name: Checking presence of CI target for current job
run: (echo -n status=; cat out | grep "built:" | sed "s/.*/built/") >> $GITHUB_OUTPUT
- if: steps.stepCheck.outputs.status == 'built'
name: Building/fetching current CI target
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.20" --argstr
Expand Down Expand Up @@ -84,12 +90,18 @@ jobs:
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
extraPullNames: coq, coq-community, math-comp
name: ssprove
- id: stepGetDerivation
name: Getting derivation for current job (mathcomp-analysis)
run: "NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr bundle
\"8.20\" --argstr job \"mathcomp-analysis\" \\\n --dry-run 2> err > out
|| (touch fail; true)\n"
- name: Error reporting
run: "echo \"out=\"; cat out\necho \"err=\"; cat err\n"
- name: Failure check
run: if [ -e fail ]; then exit 1; else exit 0; fi;
- id: stepCheck
name: Checking presence of CI target mathcomp-analysis
run: "nb_dry_run=$(NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr
bundle \"8.20\" --argstr job \"mathcomp-analysis\" \\\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"
name: Checking presence of CI target for current job
run: (echo -n status=; cat out | grep "built:" | sed "s/.*/built/") >> $GITHUB_OUTPUT
- 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 "8.20" --argstr
Expand Down Expand Up @@ -153,12 +165,18 @@ jobs:
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
extraPullNames: coq, coq-community, math-comp
name: ssprove
- id: stepGetDerivation
name: Getting derivation for current job (ssprove)
run: "NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr bundle
\"8.20\" --argstr job \"ssprove\" \\\n --dry-run 2> err > out || (touch
fail; true)\n"
- name: Error reporting
run: "echo \"out=\"; cat out\necho \"err=\"; cat err\n"
- name: Failure check
run: if [ -e fail ]; then exit 1; else exit 0; fi;
- id: stepCheck
name: Checking presence of CI target ssprove
run: "nb_dry_run=$(NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr
bundle \"8.20\" --argstr job \"ssprove\" \\\n --dry-run 2>&1 > /dev/null)\n
echo $nb_dry_run\necho status=$(echo $nb_dry_run | grep \"built:\" | sed \"\
s/.*/built/\") >> $GITHUB_OUTPUT\n"
name: Checking presence of CI target for current job
run: (echo -n status=; cat out | grep "built:" | sed "s/.*/built/") >> $GITHUB_OUTPUT
- 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 "8.20" --argstr
Expand All @@ -175,6 +193,18 @@ jobs:
name: 'Building/fetching previous CI target: mathcomp-analysis'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.20" --argstr
job "mathcomp-analysis"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: mathcomp-experimental-reals'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.20" --argstr
job "mathcomp-experimental-reals"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: mathcomp-word'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.20" --argstr
job "mathcomp-word"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: mathcomp-zify'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.20" --argstr
job "mathcomp-zify"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: extructures'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.20" --argstr
Expand Down
2 changes: 1 addition & 1 deletion .nix/coq-nix-toolbox.nix
Original file line number Diff line number Diff line change
@@ -1 +1 @@
"fb3515feec422e546de863ad0101e2a51ec9b8db"
"78d95509824be9e3339c1c0ee19f9c085f32b23e"
58 changes: 58 additions & 0 deletions .nix/coq-overlays/SSProve/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{ lib, mkCoqDerivation, coq, version ? null
, equations
, mathcomp-ssreflect
, mathcomp-analysis
, mathcomp-experimental-reals
, mathcomp-word
, mathcomp-zify
, extructures
, deriving
}:

(mkCoqDerivation {
pname = "ssprove";
owner = "SSProve";

inherit version;
defaultVersion = with lib.versions; lib.switch [coq.coq-version mathcomp-ssreflect.version] [
{ cases = [(range "8.18" "8.20") "2.3.0"]; out = "0.2.3"; }
{ cases = [(range "8.18" "8.20") (range "2.1.0" "2.2.0")]; out = "0.2.2"; }
# This is the original dependency:
# { cases = ["8.17" "1.18.0"]; out = "0.1.0"; }
# But it is not loadable. The math-comp nixpkgs configuration
# will always only output version 1.18.0 for Coq 8.17.
# Hence, the Coq 8.17 and math-comp 1.17.0 must be explicitly set
# to load it.
# (This version is not on the math-comp CI and hence not checked.)
{ cases = ["8.17" "1.17.0"]; out = "0.1.0"; }
] null;

releaseRev = v: "v${v}";

release."0.2.3".sha256 = "sha256-Y3dmNIF36IuIgrVILteofOv8e5awKfq93S4YN7enswI=";
release."0.2.2".sha256 = "sha256-tBF8equJd6hKZojpe+v9h6Tg9xEnMTVFgOYK7ZnMfxk=";
release."0.2.1".sha256 = "sha256-X00q5QFxdcGWeNqOV/PLTOqQyyfqFEinbGUTO7q8bC4=";
release."0.2.0".sha256 = "sha256-GDkWH0LUsW165vAUoYC5of9ndr0MbfBtmrPhsJVXi3o=";
release."0.1.0".sha256 = "sha256-Yj+k+mBsudi3d6bRVlZLyM4UqQnzAX5tHvxtKoIuNTE=";

propagatedBuildInputs = [equations
mathcomp-ssreflect
mathcomp-analysis
mathcomp-experimental-reals
mathcomp-word
mathcomp-zify
extructures
deriving];

meta = with lib; {
description = "SSProve: A Foundational Framework for Modular Cryptographic Proofs in Coq";
license = licenses.mit;
maintainers = [ {
name = "Sebastian Ertel";
email = "[email protected]";
github = "sertel";
githubId = 3703100;
} ];
};

})

0 comments on commit d4369a9

Please sign in to comment.