Skip to content
Open

CI #66

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
6 changes: 5 additions & 1 deletion .github/workflows/docker-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,12 @@ jobs:
- 'mathcomp/mathcomp:2.4.0-coq-8.19'
- 'mathcomp/mathcomp:2.4.0-coq-8.20'
- 'mathcomp/mathcomp:2.4.0-rocq-prover-9.0'
- 'mathcomp/mathcomp:2.4.0-rocq-prover-dev'
- 'mathcomp/mathcomp:2.4.0-rocq-prover-9.1'
- 'mathcomp/mathcomp:2.5.0-coq-8.20'
- 'mathcomp/mathcomp:2.5.0-rocq-prover-9.0'
- 'mathcomp/mathcomp:2.5.0-rocq-prover-9.1'
- 'mathcomp/mathcomp-dev:rocq-prover-9.0'
- 'mathcomp/mathcomp-dev:rocq-prover-9.1'
- 'mathcomp/mathcomp-dev:rocq-prover-dev'
fail-fast: false
steps:
Expand Down
491 changes: 491 additions & 0 deletions .github/workflows/nix-action-8.18-2.3.0.yml

Large diffs are not rendered by default.

495 changes: 495 additions & 0 deletions .github/workflows/nix-action-8.19-2.3.0.yml

Large diffs are not rendered by default.

495 changes: 495 additions & 0 deletions .github/workflows/nix-action-8.19-2.4.0.yml

Large diffs are not rendered by default.

428 changes: 428 additions & 0 deletions .github/workflows/nix-action-8.20-2.3.0.yml

Large diffs are not rendered by default.

428 changes: 428 additions & 0 deletions .github/workflows/nix-action-8.20-2.4.0.yml

Large diffs are not rendered by default.

428 changes: 428 additions & 0 deletions .github/workflows/nix-action-8.20-2.5.0.yml

Large diffs are not rendered by default.

444 changes: 444 additions & 0 deletions .github/workflows/nix-action-9.0-2.4.0.yml

Large diffs are not rendered by default.

444 changes: 444 additions & 0 deletions .github/workflows/nix-action-9.0-2.5.0.yml

Large diffs are not rendered by default.

444 changes: 444 additions & 0 deletions .github/workflows/nix-action-9.0-master.yml

Large diffs are not rendered by default.

444 changes: 444 additions & 0 deletions .github/workflows/nix-action-9.1-2.4.0.yml

Large diffs are not rendered by default.

444 changes: 444 additions & 0 deletions .github/workflows/nix-action-9.1-2.5.0.yml

Large diffs are not rendered by default.

444 changes: 444 additions & 0 deletions .github/workflows/nix-action-9.1-master.yml

Large diffs are not rendered by default.

202 changes: 202 additions & 0 deletions .github/workflows/nix-action-master-master.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,202 @@
jobs:
coq:
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 coq
uses: cachix/cachix-action@v16
with:
extraPullNames: coq-community, math-comp
name: coq
- id: stepGetDerivation
name: Getting derivation for current job (coq)
run: "NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr bundle
\"master-master\" --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
"master-master" --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
"master-master" --argstr job "coq"
mathcomp-ssreflect:
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 coq
uses: cachix/cachix-action@v16
with:
extraPullNames: coq-community, math-comp
name: coq
- id: stepGetDerivation
name: Getting derivation for current job (mathcomp-ssreflect)
run: "NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr bundle
\"master-master\" --argstr job \"mathcomp-ssreflect\" \\\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
"master-master" --argstr job "coq"
- if: steps.stepCheck.outputs.status != 'fetched'
name: 'Building/fetching previous CI target: hierarchy-builder'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle
"master-master" --argstr job "hierarchy-builder"
- if: steps.stepCheck.outputs.status != 'fetched'
name: Building/fetching current CI target
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle
"master-master" --argstr job "mathcomp-ssreflect"
mathcomp-zify:
needs:
- coq
- mathcomp-ssreflect
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 coq
uses: cachix/cachix-action@v16
with:
extraPullNames: coq-community, math-comp
name: coq
- id: stepGetDerivation
name: Getting derivation for current job (mathcomp-zify)
run: "NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link \\\n --argstr bundle
\"master-master\" --argstr job \"mathcomp-zify\" \\\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
"master-master" --argstr job "coq"
- if: steps.stepCheck.outputs.status != 'fetched'
name: 'Building/fetching previous CI target: mathcomp-ssreflect'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle
"master-master" --argstr job "mathcomp-ssreflect"
- if: steps.stepCheck.outputs.status != 'fetched'
name: 'Building/fetching previous CI target: stdlib'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle
"master-master" --argstr job "stdlib"
- if: steps.stepCheck.outputs.status != 'fetched'
name: Building/fetching current CI target
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle
"master-master" --argstr job "mathcomp-zify"
name: Nix CI for bundle master-master
on:
pull_request:
paths:
- .github/workflows/nix-action-master-master.yml
pull_request_target:
paths-ignore:
- .github/workflows/nix-action-master-master.yml
types:
- opened
- synchronize
- reopened
push:
branches:
- master
90 changes: 90 additions & 0 deletions .nix/config.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
with (import <nixpkgs> {}).lib;
{
## DO NOT CHANGE THIS
format = "1.0.0";
## unless you made an automated or manual update
## to another supported format.

## The attribute to build from the local sources,
## either using nixpkgs data or the overlays located in `.nix/rocq-overlays`
## and `.nix/coq-overlays`
## Will determine the default main-job of the bundles defined below
attribute = "mathcomp-zify";

## The attribute for coq compat shim, default to attribute
## set this when you need both to differ
## (for instance "rocq-elpi" and "coq-elpi")
# coq-attribute = "mathcomp-zify";

## Set this when the package has no rocqPackages version yet
## (either in nixpkgs or in .nix/rocq-overlays)
# no-rocq-yet = true;

## If you want to select a different attribute (to build from the local sources as well)
## when calling `nix-shell` and `nix-build` without the `--argstr job` argument
# shell-attribute = "{{nix_name}}";

## Maybe the shortname of the library is different from
## the name of the nixpkgs attribute, if so, set it here:
# pname = "{{shortname}}";

## Lists the dependencies, phrased in terms of nix attributes.
## No need to list Coq, it is already included.
## These dependencies will systematically be added to the currently
## known dependencies, if any more than Coq.
## /!\ Remove this field as soon as the package is available on nixpkgs.
## /!\ Manual overlays in `.nix/rocq-overlays` or `.nix/coq-overlays`
## should be preferred then.
# buildInputs = [ ];

## Indicate the relative location of your _CoqProject
## If not specified, it defaults to "_CoqProject"
# coqproject = "_CoqProject";

## select an entry to build in the following `bundles` set
## defaults to "default"
default-bundle = "9.0-2.5.0";

## write one `bundles.name` attribute set per
## alternative configuration
## When generating GitHub Action CI, one workflow file
## will be created per bundle
bundles = let
## The combinations of MathComp and Rocq versions we test
matrix = {
"2.3.0" = ["8.18" "8.19" "8.20"];
"2.4.0" = ["8.19" "8.20" "9.0" "9.1"];
"2.5.0" = ["8.20" "9.0" "9.1"];
"master" = ["9.0" "9.1" "master"];
};
## The versions of packages we need for each version of Rocq
rocq-bundles = {};
## The versions of packages we need for each version of MathComp
mc-bundles = {}; in
attrsets.concatMapAttrs (mc: lists.foldr (rocq: bs: bs // {
${rocq + "-" + mc}.coqPackages =
{ coq.override.version = rocq;
mathcomp-ssreflect.override.version = mc; }
// rocq-bundles.${rocq} or {} // mc-bundles.${mc} or {};
}) {}) matrix;

## Cachix caches to use in CI
## Below we list some standard ones
cachix.coq = {};
cachix.math-comp = {};
cachix.coq-community = {};

## If you have write access to one of these caches you can
## provide the auth token or signing key through a secret
## variable on GitHub. Then, you should give the variable
## name here. For instance, coq-community projects can use
## the following line instead of the one above:
# cachix.coq-community.authToken = "CACHIX_AUTH_TOKEN";

## Or if you have a signing key for a given Cachix cache:
# cachix.my-cache.signingKey = "CACHIX_SIGNING_KEY"

## Note that here, CACHIX_AUTH_TOKEN and CACHIX_SIGNING_KEY
## are the names of secret variables. They are set in
## GitHub's web interface.
}
1 change: 1 addition & 0 deletions .nix/coq-nix-toolbox.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"3a71d8318b495d464d04ac8bca80b38320448436"
10 changes: 10 additions & 0 deletions .nix/coq-overlays/mathcomp-zify/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{ mkCoqDerivation, coq, mathcomp-ssreflect, mathcomp-algebra, stdlib,
version ? null,
}:

mkCoqDerivation {
pname = "zify";
defaultVersion = "null";
inherit version;
propagatedBuildInputs = [ mathcomp-ssreflect mathcomp-algebra stdlib ];
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

8.18-2.3.0 / mathcomp-zify is failing because it uses Coq 8.18 with the Rocq standard library 9.0.0...

12 changes: 12 additions & 0 deletions default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{ config ? {}, withEmacs ? false, print-env ? false, do-nothing ? false,
update-nixpkgs ? false, ci-matrix ? false,
override ? {}, coq-override ? {}, ocaml-override ? {}, global-override ? {},
bundle ? null, job ? null, inNixShell ? null, src ? ./.,
}@args:
let auto = fetchGit {
url = "https://github.com/coq-community/coq-nix-toolbox.git";
ref = "master";
rev = import .nix/coq-nix-toolbox.nix;
};
in
import auto ({inherit src;} // args)
10 changes: 9 additions & 1 deletion meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,18 @@ tested_coq_opam_versions:
repo: 'mathcomp/mathcomp'
- version: '2.4.0-rocq-prover-9.0'
repo: 'mathcomp/mathcomp'
- version: '2.4.0-rocq-prover-dev'
- version: '2.4.0-rocq-prover-9.1'
repo: 'mathcomp/mathcomp'
- version: '2.5.0-coq-8.20'
repo: 'mathcomp/mathcomp'
- version: '2.5.0-rocq-prover-9.0'
repo: 'mathcomp/mathcomp'
- version: '2.5.0-rocq-prover-9.1'
repo: 'mathcomp/mathcomp'
- version: 'rocq-prover-9.0'
repo: 'mathcomp/mathcomp-dev'
- version: 'rocq-prover-9.1'
repo: 'mathcomp/mathcomp-dev'
- version: 'rocq-prover-dev'
repo: 'mathcomp/mathcomp-dev'

Expand Down
Loading