From 056fc0260b4d5a66fdcc945d7ca56013cf2aee1d Mon Sep 17 00:00:00 2001 From: Samuel Burnham <45365069+samuelburnham@users.noreply.github.com> Date: Wed, 19 Feb 2025 16:41:23 -0500 Subject: [PATCH] ci: Cache Lean packages in Cachix --- .github/workflows/ci.yml | 26 ++++++++++++++++++++++++++ .gitignore | 1 - flake.nix | 2 +- 3 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..dfe47ff --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,26 @@ +# Build and upload Lean binaries to Cachix cache +name: Nix CI + +on: + push: + branches: main + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +jobs: + build: + name: Build and cache Lean + runs-on: warp-ubuntu-latest-x64-16x + steps: + - uses: actions/checkout@v4 + - uses: DeterminateSystems/nix-installer-action@main + - uses: cachix/cachix-action@v14 + with: + name: argumentcomputer + authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' + - run: | + nix build .#cacheRoots + diff --git a/.gitignore b/.gitignore index 5bdcc34..898762e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,2 @@ -.* !.gitignore /result diff --git a/flake.nix b/flake.nix index b99af67..607fda7 100644 --- a/flake.nix +++ b/flake.nix @@ -38,7 +38,7 @@ }; packages = { - inherit (pkgs.lean) leanshared lean leanc lean-all lake; + inherit (pkgs.lean) leanshared lean leanc lean-all lake cacheRoots; }; checks = import ./checks.nix {inherit pkgs;};