Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
217 changes: 217 additions & 0 deletions .github/workflows/nix-action-9.2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,217 @@
jobs:
coq:
needs:
- rocq-core
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@v6
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@v6
with:
fetch-depth: 0
ref: ${{ env.tested_commit }}
- name: Cachix install
uses: cachix/install-nix-action@v31
with:
nix_path: nixpkgs=channel:nixpkgs-unstable
- name: Cachix setup ssprove
uses: cachix/cachix-action@v16
with:
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
\"9.2\" --argstr job \"coq\" \\\n --dry-run 2> err > out || (touch fail;
true)\ncat out err\nif [ -e fail ]; then echo \"Error: getting derivation
failed\"; exit 1; fi\n"
- id: stepCheck
name: Checking presence of CI target for current job
run: "if $(cat out err | grep -q \"built:\") ; then\n echo \"CI target needs
actual building\"\n if $(cat out err | grep -q \"derivations will be built:\"\
) ; then\n echo \"waiting a bit for derivations that should be in cache\"\
\n sleep 30\n fi\nelse\n echo \"CI target already built\"\n echo \"\
status=fetched\" >> $GITHUB_OUTPUT\nfi\n"
- if: steps.stepCheck.outputs.status != 'fetched'
name: 'Building/fetching previous CI target: rocq-core'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "9.2"
--argstr job "rocq-core"
- if: steps.stepCheck.outputs.status != 'fetched'
name: Building/fetching current CI target
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "9.2"
--argstr job "coq"
rocq-core:
needs: []
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@v6
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@v6
with:
fetch-depth: 0
ref: ${{ env.tested_commit }}
- name: Cachix install
uses: cachix/install-nix-action@v31
with:
nix_path: nixpkgs=channel:nixpkgs-unstable
- name: Cachix setup ssprove
uses: cachix/cachix-action@v16
with:
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
extraPullNames: coq, coq-community, math-comp
name: ssprove
- id: stepGetDerivation
name: Getting derivation for current job (rocq-core)
run: "NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr bundle
\"9.2\" --argstr job \"rocq-core\" \\\n --dry-run 2> err > out || (touch
fail; true)\ncat out err\nif [ -e fail ]; then echo \"Error: getting derivation
failed\"; exit 1; fi\n"
- id: stepCheck
name: Checking presence of CI target for current job
run: "if $(cat out err | grep -q \"built:\") ; then\n echo \"CI target needs
actual building\"\n if $(cat out err | grep -q \"derivations will be built:\"\
) ; then\n echo \"waiting a bit for derivations that should be in cache\"\
\n sleep 30\n fi\nelse\n echo \"CI target already built\"\n echo \"\
status=fetched\" >> $GITHUB_OUTPUT\nfi\n"
- if: steps.stepCheck.outputs.status != 'fetched'
name: Building/fetching current CI target
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "9.2"
--argstr job "rocq-core"
ssprove:
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@v6
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@v6
with:
fetch-depth: 0
ref: ${{ env.tested_commit }}
- name: Cachix install
uses: cachix/install-nix-action@v31
with:
nix_path: nixpkgs=channel:nixpkgs-unstable
- name: Cachix setup ssprove
uses: cachix/cachix-action@v16
with:
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
\"9.2\" --argstr job \"ssprove\" \\\n --dry-run 2> err > out || (touch fail;
true)\ncat out err\nif [ -e fail ]; then echo \"Error: getting derivation
failed\"; exit 1; fi\n"
- id: stepCheck
name: Checking presence of CI target for current job
run: "if $(cat out err | grep -q \"built:\") ; then\n echo \"CI target needs
actual building\"\n if $(cat out err | grep -q \"derivations will be built:\"\
) ; then\n echo \"waiting a bit for derivations that should be in cache\"\
\n sleep 30\n fi\nelse\n echo \"CI target already built\"\n echo \"\
status=fetched\" >> $GITHUB_OUTPUT\nfi\n"
- if: steps.stepCheck.outputs.status != 'fetched'
name: 'Building/fetching previous CI target: coq'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "9.2"
--argstr job "coq"
- if: steps.stepCheck.outputs.status != 'fetched'
name: 'Building/fetching previous CI target: mathcomp-boot'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "9.2"
--argstr job "mathcomp-boot"
- if: steps.stepCheck.outputs.status != 'fetched'
name: 'Building/fetching previous CI target: mathcomp-analysis'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "9.2"
--argstr job "mathcomp-analysis"
- if: steps.stepCheck.outputs.status != 'fetched'
name: 'Building/fetching previous CI target: mathcomp-experimental-reals'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "9.2"
--argstr job "mathcomp-experimental-reals"
- if: steps.stepCheck.outputs.status != 'fetched'
name: 'Building/fetching previous CI target: mathcomp-word'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "9.2"
--argstr job "mathcomp-word"
- if: steps.stepCheck.outputs.status != 'fetched'
name: 'Building/fetching previous CI target: extructures'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "9.2"
--argstr job "extructures"
- if: steps.stepCheck.outputs.status != 'fetched'
name: 'Building/fetching previous CI target: deriving'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "9.2"
--argstr job "deriving"
- if: steps.stepCheck.outputs.status != 'fetched'
name: Building/fetching current CI target
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "9.2"
--argstr job "ssprove"
name: Nix CI for bundle 9.2
on:
pull_request:
paths:
- .github/workflows/nix-action-9.2.yml
pull_request_target:
paths-ignore:
- .github/workflows/nix-action-9.2.yml
- '**.md'
- '**.gitignore'
- '**.opam'
- 'LICENSE'
types:
- opened
- synchronize
- reopened
push:
branches:
- main
workflow_dispatch:
60 changes: 44 additions & 16 deletions .nix/config.nix
Original file line number Diff line number Diff line change
Expand Up @@ -69,27 +69,55 @@
rocq-core.override.version = "9.1";
};
};
bundles."MC-dev".coqPackages = {
coq.override.version = "9.0";
mathcomp.job = false;
mathcomp.override.version = "master";
mathcomp-analysis.job = false;
mathcomp-analysis.override.version = "master";
mathcomp-finmap.job = false;
mathcomp-finmap.override.version = "master";
mathcomp-word.job = false;
mathcomp-word.override.version = "main";
extructures.job = false;
extructures.override.version = "master";
deriving.job = false;
deriving.override.version = "master";
mathcomp-bigenough.job = false;
mathcomp-bigenough.override.version = "master";
bundles."9.2" = { coqPackages = {
coq.override.version = "9.2";

## Test against master for all dependencies until we get 9.2 compatible releases
mathcomp.job = false;
mathcomp.override.version = "master";
mathcomp-analysis.job = false;
mathcomp-analysis.override.version = "master";
mathcomp-finmap.job = false;
mathcomp-finmap.override.version = "master";
mathcomp-word.job = false;
mathcomp-word.override.version = "main";
extructures.job = false;
extructures.override.version = "master";
deriving.job = false;
deriving.override.version = "master";
mathcomp-bigenough.job = false;
mathcomp-bigenough.override.version = "master";
equations.job = false;
equations.override.version = "757662b9c875d7169a07b861d48e82157520ab1a";
}; rocqPackages = {
rocq-core.override.version = "9.2";
};
};
bundles."MC-dev" = { coqPackages = {
coq.override.version = "9.1";
mathcomp.job = false;
mathcomp.override.version = "master";
mathcomp-analysis.job = false;
mathcomp-analysis.override.version = "master";
mathcomp-finmap.job = false;
mathcomp-finmap.override.version = "master";
mathcomp-word.job = false;
mathcomp-word.override.version = "main";
extructures.job = false;
extructures.override.version = "master";
deriving.job = false;
deriving.override.version = "master";
mathcomp-bigenough.job = false;
mathcomp-bigenough.override.version = "master";
}; rocqPackages = {
rocq-core.override.version = "9.1";
};
};

bundles."8.20".push-branches = ["main"];
bundles."9.0".push-branches = ["main"];
bundles."9.1".push-branches = ["main"];
bundles."9.2".push-branches = ["main"];

## Cachix caches to use in CI
## Below we list some standard ones
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 @@
"cd9fc801a4dadb59f1bb215732f38117a01c87f9"
"57c5358d8077aa70ac4c11257a8137a1aebea01d"
4 changes: 2 additions & 2 deletions .nix/nixpkgs.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
fetchTarball {
url = "https://github.com/NixOS/nixpkgs/archive/62dab73c6aa5a9da858ef26d29600541c85eed6d.tar.gz";
sha256 = "1mj9v5s2129h6ffg0awc9b39mh3l41nqm0mpnyvn8idmhxja8wbq";
url = "https://github.com/NixOS/nixpkgs/archive/09ac1a4dd614f93d8588def74847f810cc9b329c.tar.gz";
sha256 = "1k8zxrfkqgab5kscn2nkn48g7qgjb2qjqrgv48gpq9dx5848pbnd";
}
Loading