nix-ci-aarch64.yml 2.1 KB

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