-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from NethermindEth/build-with-GitHub-Actions
Use GitHub Actions to check that building succeeds
- Loading branch information
Showing
2 changed files
with
45 additions
and
0 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,38 @@ | ||
name: Build | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/[email protected] | ||
- name: The Determinate Nix Installer | ||
uses: DeterminateSystems/nix-installer-action@v14 | ||
- name: Magic Nix Cache | ||
uses: DeterminateSystems/magic-nix-cache-action@v8 | ||
- name: Cache Lean toolchain | ||
uses: actions/[email protected] | ||
with: | ||
path: ~/.elan/toolchains | ||
key: ${{ runner.os }}-lean-toolchain-${{ hashFiles('lean-toolchain') }} | ||
- name: Cache Lean packages | ||
id: cache-lean-packages | ||
uses: actions/[email protected] | ||
with: | ||
path: .lake/packages | ||
key: ${{ runner.os }}-lean-packages-${{ hashFiles('lake-manifest.json') }} | ||
- if: ${{ steps.cache-lean-packages.outputs.cache-hit != 'true' }} | ||
name: Get Mathlib cache | ||
run: nix-shell --run "lake exe cache get" | ||
- name: Build vc tool | ||
run: nix-shell --run "cd vc; stack --nix build" | ||
- name: Build Lean files | ||
run: nix-shell --run "lake build" |
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,7 @@ | ||
{ pkgs ? import <nixpkgs> {} }: | ||
pkgs.mkShell { | ||
packages = with pkgs; [ | ||
elan | ||
stack | ||
]; | ||
} |