nix-ci-aarch64.yml 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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. concurrency:
  19. group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }}
  20. cancel-in-progress: true
  21. jobs:
  22. nix-build-aarch64:
  23. runs-on: ubuntu-latest
  24. steps:
  25. - name: Checkout repository
  26. uses: actions/checkout@v4
  27. - name: Install QEMU
  28. # Copy-paste from https://github.com/orgs/community/discussions/8305#discussioncomment-5888654
  29. run: |
  30. sudo apt-get update
  31. sudo apt-get install -y qemu-user-static qemu-system-aarch64
  32. sudo usermod -a -G kvm $USER
  33. - name: Install Nix
  34. uses: DeterminateSystems/nix-installer-action@v9
  35. with:
  36. github-token: ${{ secrets.GITHUB_TOKEN }}
  37. extra-conf: |
  38. extra-platforms = aarch64-linux
  39. extra-system-features = nixos-test kvm
  40. extra-substituters = https://llama-cpp.cachix.org https://cuda-maintainers.cachix.org
  41. extra-trusted-public-keys = llama-cpp.cachix.org-1:H75X+w83wUKTIPSO1KWy9ADUrzThyGs8P5tmAbkWhQc= cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E=
  42. - uses: DeterminateSystems/magic-nix-cache-action@v2
  43. with:
  44. upstream-cache: https://${{ matrix.cachixName }}.cachix.org
  45. - name: Set-up cachix to push the results to
  46. uses: cachix/cachix-action@v13
  47. with:
  48. authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
  49. name: llama-cpp
  50. - name: Show all output paths
  51. run: >
  52. nix run github:nix-community/nix-eval-jobs
  53. -- --gc-roots-dir gcroot
  54. --flake
  55. ".#packages.aarch64-linux"
  56. - name: Build
  57. run: >
  58. nix run github:Mic92/nix-fast-build
  59. -- --skip-cached --no-nom
  60. --systems aarch64-linux
  61. --flake
  62. ".#checks.aarch64-linux"