Skip to content

Commit

Permalink
WIP perennial
Browse files Browse the repository at this point in the history
  • Loading branch information
proux01 committed Jul 27, 2024
1 parent 9366fa8 commit 0858c33
Show file tree
Hide file tree
Showing 3 changed files with 82 additions and 55 deletions.
109 changes: 57 additions & 52 deletions .github/workflows/nix-action-coq-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -356,58 +356,6 @@ jobs:
name: Building/fetching current CI target
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-master"
--argstr job "StructTact"
UniMath:
needs:
- coq
runs-on: ubuntu-latest
steps:
- name: Determine which commit to initially checkout
run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"target_commit=${{\
\ github.sha }}\" >> $GITHUB_ENV\nelse\n echo \"target_commit=${{ github.event.pull_request.head.sha\
\ }}\" >> $GITHUB_ENV\nfi\n"
- name: Git checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ env.target_commit }}
- name: Determine which commit to test
run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"tested_commit=${{\
\ github.sha }}\" >> $GITHUB_ENV\nelse\n merge_commit=$(git ls-remote ${{\
\ github.event.repository.html_url }} refs/pull/${{ github.event.number }}/merge\
\ | cut -f1)\n mergeable=$(git merge --no-commit --no-ff ${{ github.event.pull_request.base.sha\
\ }} > /dev/null 2>&1; echo $?; git merge --abort > /dev/null 2>&1 || true)\n\
\ if [ -z \"$merge_commit\" -o \"x$mergeable\" != \"x0\" ]; then\n echo\
\ \"tested_commit=${{ github.event.pull_request.head.sha }}\" >> $GITHUB_ENV\n\
\ else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n fi\nfi\n"
- name: Git checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ env.tested_commit }}
- name: Cachix install
uses: cachix/install-nix-action@v27
with:
nix_path: nixpkgs=channel:nixpkgs-unstable
- name: Cachix setup coq-community
uses: cachix/cachix-action@v15
with:
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
extraPullNames: coq, math-comp
name: coq-community
- id: stepCheck
name: Checking presence of CI target UniMath
run: "nb_dry_run=$(NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr\
\ bundle \"coq-master\" --argstr job \"UniMath\" \\\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"
- 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 "UniMath"
Verdi:
needs:
- coq
Expand Down Expand Up @@ -4180,6 +4128,63 @@ jobs:
name: Building/fetching current CI target
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "coq-master"
--argstr job "parsec"
perennial:
needs:
- coq
- stdlib
runs-on: ubuntu-latest
steps:
- name: Determine which commit to initially checkout
run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"target_commit=${{\
\ github.sha }}\" >> $GITHUB_ENV\nelse\n echo \"target_commit=${{ github.event.pull_request.head.sha\
\ }}\" >> $GITHUB_ENV\nfi\n"
- name: Git checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ env.target_commit }}
- name: Determine which commit to test
run: "if [ ${{ github.event_name }} = \"push\" ]; then\n echo \"tested_commit=${{\
\ github.sha }}\" >> $GITHUB_ENV\nelse\n merge_commit=$(git ls-remote ${{\
\ github.event.repository.html_url }} refs/pull/${{ github.event.number }}/merge\
\ | cut -f1)\n mergeable=$(git merge --no-commit --no-ff ${{ github.event.pull_request.base.sha\
\ }} > /dev/null 2>&1; echo $?; git merge --abort > /dev/null 2>&1 || true)\n\
\ if [ -z \"$merge_commit\" -o \"x$mergeable\" != \"x0\" ]; then\n echo\
\ \"tested_commit=${{ github.event.pull_request.head.sha }}\" >> $GITHUB_ENV\n\
\ else\n echo \"tested_commit=$merge_commit\" >> $GITHUB_ENV\n fi\nfi\n"
- name: Git checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ env.tested_commit }}
- name: Cachix install
uses: cachix/install-nix-action@v27
with:
nix_path: nixpkgs=channel:nixpkgs-unstable
- name: Cachix setup coq-community
uses: cachix/cachix-action@v15
with:
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
extraPullNames: coq, math-comp
name: coq-community
- id: stepCheck
name: Checking presence of CI target perennial
run: "nb_dry_run=$(NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr\
\ bundle \"coq-master\" --argstr job \"perennial\" \\\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 "perennial"
relation-algebra:
needs:
- coq
Expand Down
7 changes: 4 additions & 3 deletions .nix/config.nix
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ with builtins; with (import <nixpkgs> {}).lib;
# "coq-hammer" -> overlay
# "flocq" -> overlay
# "coq-performance-tests" -> overlay
# "coq-tools" -> overlay
# TODO coq-tools -> Docker
"coquelicot"
# "compcert" -> overlay
# "vst" -> overlay
Expand All @@ -137,7 +137,7 @@ with builtins; with (import <nixpkgs> {}).lib;
# "coq-elpi" -> overlay
"hierarchy-builder"
# "engine bench" -> overlay
# TODO fcsl_pcm -> not ported to MC 2, to remove
# TODO fcsl_pcm -> wait for MC 2 port
# "coq-ext-lib" -> overlay
# "simple-io" -> overlay
# "QuickChick" -> overlay
Expand All @@ -161,7 +161,7 @@ with builtins; with (import <nixpkgs> {}).lib;
"VerdiRaft"
# TODO argosy -> Docker
# "atbr" -> overlay
# TODO perennial -> Docker
# "perennial" -> overlay
# "sf" -> overlay
"deriving"
# "category-theory" -> overlay
Expand Down Expand Up @@ -228,6 +228,7 @@ with builtins; with (import <nixpkgs> {}).lib;
engine-bench.override.version = "proux01:split_stdlib";
coq-performance-tests.override.version = "proux01:split_stdlib";
coq-tools.override.version = "proux01:split_stdlib";
perennial.override.version = "proux01:split_stdlib";
};
in {
"coq-master".coqPackages = common-bundles // {
Expand Down
21 changes: 21 additions & 0 deletions .nix/coq-overlays/perennial/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{ lib, mkCoqDerivation, coq, stdlib, version ? null }:

let
fetcher = { domain, owner, repo, rev, sha256 ? null, ...}:
fetchGit {
url = "https://${domain}/${owner}/${repo}";
ref = rev;
submodules = true;
};
in

mkCoqDerivation {
pname = "perennial";
owner = "mit-pdos";
inherit version fetcher;
defaultVersion = null; # no released version

propagatedBuildInputs = [ stdlib ];

buildFlags = [ "TIMED=false" "lite" ];
}

0 comments on commit 0858c33

Please sign in to comment.