-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update the Nix setup to rely on the Coq Nix Toolbox.
Use the dynamic workflow generation.
Showing
6 changed files
with
121 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# This file was generated from `meta.yml`, please do not edit manually. | ||
# Follow the instructions on https://github.com/coq-community/templates to regenerate. | ||
name: Nix CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- '**' | ||
|
||
jobs: | ||
setup: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Do nothing | ||
run: echo "No setup, using meta.yml bundles" | ||
"aac-tactics": | ||
name: Main build | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
bundle: | ||
- default | ||
steps: | ||
- name: Cachix install | ||
uses: cachix/install-nix-action@v12 | ||
with: | ||
nix_path: nixpkgs=channel:nixpkgs-unstable | ||
- name: Cachix setup coq | ||
uses: cachix/cachix-action@v8 | ||
with: | ||
# Name of a cachix cache to pull/substitute | ||
name: coq | ||
- name: Cachix setup coq-community | ||
uses: cachix/cachix-action@v8 | ||
with: | ||
# Name of a cachix cache to pull/substitute | ||
name: coq-community | ||
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' | ||
- name: Git checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Building/fetching dependencies | ||
run: nix-build --no-out-link --argstr bundle "${{ matrix.bundle }}" --argstr job "_deps" | ||
- name: Building/fetching current project | ||
run: nix-build --no-out-link --argstr bundle "${{ matrix.bundle }}" --argstr job "aac-tactics" |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# This file was generated from meta.yml, please do not edit manually. | ||
# Follow the instructions on https://github.com/coq-community/templates to regenerate. | ||
"a0c0f3d7deddacbe4575ac3c3c63f43dd103c175" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# This file was generated from `meta.yml`, please do not edit manually. | ||
# Follow the instructions on https://github.com/coq-community/templates to regenerate. | ||
|
||
# *However*, you may copy paste it to `config.nix` | ||
# in the same subdirectory .nix and extend it as needed. | ||
# Note that this would completely deactivate this file. | ||
|
||
{ | ||
## DO NOT CHANGE THE format | ||
format = "1.0.0"; | ||
## unless you made an automated or manual update | ||
## to another supported format. | ||
|
||
## The attribute to build, either from nixpkgs | ||
## of from the overlays located in `.nix/coq-overlays` | ||
attribute = "aac-tactics"; | ||
|
||
## If you want to select a different attribute | ||
## to serve as a basis for nix-shell edit this | ||
# shell-attribute = "aac-tactics"; | ||
|
||
## Maybe the shortname of the library is different from | ||
## the name of the nixpkgs attribute, if so, set it here: | ||
pname = "aac-tactics"; | ||
|
||
## 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/coq-overlays` should be preferred then. | ||
#buildInputs = [ ]; | ||
|
||
## Indicate the relative location of your _CoqProject | ||
## If not specified, it defaults to "_CoqProject" | ||
coqproject = "_CoqProject"; | ||
|
||
## Select a bundle to build by default in the following `bundles` set | ||
## It will be used when typing nix-shell or nix-build without argument | ||
## defaults to "default" | ||
default-bundle = "default"; | ||
bundles."default" = {}; | ||
|
||
bundles."default" = { | ||
coqPackages."coq".override.version = "master"; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,13 @@ | ||
# This file was generated from `meta.yml`, please do not edit manually. | ||
# Follow the instructions on https://github.com/coq-community/templates to regenerate. | ||
|
||
{ pkgs ? (import <nixpkgs> {}), coq-version-or-url, shell ? false }: | ||
|
||
let | ||
coq-version-parts = builtins.match "([0-9]+).([0-9]+)" coq-version-or-url; | ||
coqPackages = | ||
if coq-version-parts == null then | ||
pkgs.mkCoqPackages (import (fetchTarball coq-version-or-url) {}) | ||
else | ||
pkgs."coqPackages_${builtins.concatStringsSep "_" coq-version-parts}"; | ||
in | ||
|
||
with coqPackages; | ||
|
||
pkgs.stdenv.mkDerivation { | ||
|
||
name = "aac-tactics"; | ||
|
||
buildInputs = with coq.ocamlPackages; [ ocaml findlib ] | ||
++ pkgs.lib.optionals shell [ merlin ocp-indent ocp-index ]; | ||
|
||
propagatedBuildInputs = [ | ||
coq | ||
]; | ||
|
||
src = if shell then null else ./.; | ||
|
||
installFlags = "COQMF_COQLIB=$(out)/lib/coq/${coq.coq-version}/"; | ||
} | ||
{ config ? {}, withEmacs ? false, print-env ? false, do-nothing ? false, | ||
update-nixpkgs ? false, ci-matrix ? false, | ||
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)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters