Skip to content

namespace-integration-demos/nix-cache-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Cached Nix Builds in GitHub Actions

This example demonstrates how to run Nix builds in GitHub Actions with Namespace.

Namespace dramatically speeds up the build performance by offering:

  • higher performance per runner core
  • flexible runner shapes (vCPU, RAM)
  • local, high-performance Cache Volumes

In the example, we configure the Namespace runner with the following block:

    runs-on:
      - nscloud-ubuntu-22.04-amd64-4x16-with-cache
      - nscloud-cache-size-60gb
      - nscloud-cache-tag-cache-nix

Given this configuration, our workflow will run on a machine with 4 vCPU and 16 GB of RAM. Also, we mount a local, high-performance cache with 60 GB size at mount point /cache.

Next, we bind mount /nix to /cache/nix so that Nix artifacts are fully cached between runs.

Finally, we build netperf with Nix.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages