File tree Expand file tree Collapse file tree 4 files changed +192
-5
lines changed
Expand file tree Collapse file tree 4 files changed +192
-5
lines changed Original file line number Diff line number Diff line change 1- name : " CI"
1+ name : CI Tests
2+
23on :
3- pull_request :
44 push :
5- branches :
6- - main
5+ branches : main
6+ pull_request :
7+ workflow_dispatch :
8+
9+ concurrency :
10+ group : ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
11+ cancel-in-progress : true
12+
713jobs :
8- build :
14+ lean :
15+ name : Lean Build
916 runs-on : ubuntu-latest
1017 steps :
1118 - uses : actions/checkout@v4
1219 - uses : leanprover/lean-action@v1
1320 with :
1421 build-args : " --wfail"
22+
23+ nix :
24+ name : Nix Flake Check
25+ runs-on : ubuntu-latest
26+ steps :
27+ - uses : actions/checkout@v4
28+ - uses : cachix/install-nix-action@v30
29+ with :
30+ nix_path : nixpkgs=channel:nixos-unstable
31+ github_access_token : ${{ secrets.GITHUB_TOKEN }}
32+ - uses : cachix/cachix-action@v14
33+ with :
34+ name : argumentcomputer
35+ authToken : ' ${{ secrets.CACHIX_AUTH_TOKEN }}'
36+ - run : nix build
Original file line number Diff line number Diff line change 11/build
22/lake-packages
33.lake /
4+ /result *
Original file line number Diff line number Diff line change 1+ {
2+ description = "LSpec Nix Flake" ;
3+
4+ inputs = {
5+ nixpkgs . url = "github:nixos/nixpkgs/nixos-unstable" ;
6+ flake-parts . url = "github:hercules-ci/flake-parts" ;
7+ lean4-nix = {
8+ url = "github:argumentcomputer/lean4-nix" ;
9+ inputs . nixpkgs . follows = "nixpkgs" ;
10+ } ;
11+ } ;
12+
13+ outputs = inputs @ {
14+ nixpkgs ,
15+ flake-parts ,
16+ lean4-nix ,
17+ ...
18+ } :
19+ flake-parts . lib . mkFlake { inherit inputs ; } {
20+ systems = [
21+ "aarch64-darwin"
22+ "aarch64-linux"
23+ "x86_64-darwin"
24+ "x86_64-linux"
25+ ] ;
26+
27+ perSystem = {
28+ system ,
29+ pkgs ,
30+ self' ,
31+ config ,
32+ ...
33+ } :
34+ {
35+ _module . args . pkgs = import nixpkgs {
36+ inherit system ;
37+ overlays = [ ( lean4-nix . readToolchainFile ./lean-toolchain ) ] ;
38+ } ;
39+
40+ # Build the library with `nix build`
41+ packages . default = ( ( lean4-nix . lake { inherit pkgs ; } ) . mkPackage {
42+ src = ./. ;
43+ roots = [ "LSpec" ] ;
44+ } ) . modRoot ;
45+
46+ devShells . default = pkgs . mkShell {
47+ packages = with pkgs . lean ; [ lean lean-all ] ;
48+ } ;
49+ } ;
50+ } ;
51+ }
You can’t perform that action at this time.
0 commit comments