provide a binary cache for anyrun (#39)
* upload built binaries to cachix * add cachix instructions to the README
This commit is contained in:
45
.github/workflows/cachix.yml
vendored
Normal file
45
.github/workflows/cachix.yml
vendored
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
name: "Set up binary cache & push binaries"
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
paths-ignore:
|
||||||
|
- .github/**
|
||||||
|
- assets/**
|
||||||
|
- .gitignore
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
cahix:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
package:
|
||||||
|
- default
|
||||||
|
steps:
|
||||||
|
- uses: easimon/maximize-build-space@v6
|
||||||
|
with:
|
||||||
|
overprovision-lvm: true
|
||||||
|
remove-android: true
|
||||||
|
remove-dotnet: true
|
||||||
|
remove-haskell: true
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- uses: cachix/install-nix-action@v20
|
||||||
|
with:
|
||||||
|
extra_nix_config: |
|
||||||
|
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
|
||||||
|
auto-optimise-store = true
|
||||||
|
experimental-features = nix-command flakes
|
||||||
|
nix_path: nixpkgs=channel:nixos-unstable
|
||||||
|
- uses: cachix/cachix-action@v12
|
||||||
|
with:
|
||||||
|
authToken: ${{ secrets.CACHIX_TOKEN }}
|
||||||
|
extraPullNames: nix-community
|
||||||
|
name: anyrun
|
||||||
|
- name: Set default git branch (to reduce log spam)
|
||||||
|
run: git config --global init.defaultBranch main
|
||||||
|
- name: Validate Flakes
|
||||||
|
run: nix flake check
|
||||||
|
- name: Build anyrun with default settings
|
||||||
|
run: nix build .#${{ matrix.package }} --print-build-logs
|
16
README.md
16
README.md
@@ -67,6 +67,22 @@ You can use the flake:
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
You might also want to use the binary cache to avoid building locally.
|
||||||
|
|
||||||
|
```nix
|
||||||
|
nix.settings = {
|
||||||
|
builders-use-substitutes = true;
|
||||||
|
# substituters to use
|
||||||
|
substituters = [
|
||||||
|
https://anyrun.cachix.org
|
||||||
|
];
|
||||||
|
|
||||||
|
trusted-public-keys = [
|
||||||
|
"cache.nixos.org-1:anyrun.cachix.org-1:pqBobmOjI7nKlsUMV25u9QHa9btJK65/C8vnO3p346s="
|
||||||
|
];
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
### Manual installation
|
### Manual installation
|
||||||
|
|
||||||
Make sure all of the dependencies are installed, and then run the following commands in order:
|
Make sure all of the dependencies are installed, and then run the following commands in order:
|
||||||
|
Reference in New Issue
Block a user