nix-ci-aarch64.yml 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. name: Nix aarch64 builds
  2. on:
  3. workflow_dispatch: # allows manual triggering
  4. schedule:
  5. # Rebuild daily rather than on every push because QEMU is expensive (e.g.
  6. # 1.5h instead of minutes with the cold cache).
  7. #
  8. # randint(0, 59), randint(0, 23)
  9. - cron: '26 12 * * *'
  10. # But also rebuild if we touched any of the Nix expressions:
  11. push:
  12. branches:
  13. - master
  14. paths: ['**/*.nix', 'flake.lock']
  15. pull_request:
  16. types: [opened, synchronize, reopened]
  17. paths: ['**/*.nix', 'flake.lock']
  18. jobs:
  19. nix-build-aarch64:
  20. runs-on: ubuntu-latest
  21. steps:
  22. - name: Checkout repository
  23. uses: actions/checkout@v4
  24. - name: Install QEMU
  25. # Copy-paste from https://github.com/orgs/community/discussions/8305#discussioncomment-5888654
  26. run: |
  27. sudo apt-get update
  28. sudo apt-get install -y qemu-user-static qemu-system-aarch64
  29. sudo usermod -a -G kvm $USER
  30. - name: Install Nix
  31. uses: DeterminateSystems/nix-installer-action@v9
  32. with:
  33. github-token: ${{ secrets.GITHUB_TOKEN }}
  34. extra-conf: |
  35. extra-platforms = aarch64-linux
  36. extra-system-features = nixos-test kvm
  37. extra-substituters = https://llama-cpp.cachix.org https://cuda-maintainers.cachix.org
  38. extra-trusted-public-keys = llama-cpp.cachix.org-1:H75X+w83wUKTIPSO1KWy9ADUrzThyGs8P5tmAbkWhQc= cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E=
  39. - uses: DeterminateSystems/magic-nix-cache-action@v2
  40. with:
  41. upstream-cache: https://${{ matrix.cachixName }}.cachix.org
  42. - name: Set-up cachix to push the results to
  43. uses: cachix/cachix-action@v13
  44. with:
  45. authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
  46. name: llama-cpp
  47. - name: Show all output paths
  48. run: >
  49. nix run github:nix-community/nix-eval-jobs
  50. -- --gc-roots-dir gcroot
  51. --flake
  52. ".#packages.aarch64-linux"
  53. - name: Build
  54. run: >
  55. nix run github:Mic92/nix-fast-build
  56. -- --skip-cached --no-nom
  57. --systems aarch64-linux
  58. --flake
  59. ".#checks.aarch64-linux"