nix-ci-aarch64.yml 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. name: Nix aarch64 builds
  2. on:
  3. workflow_dispatch: # allows manual triggering
  4. push:
  5. branches:
  6. - master
  7. paths: ['.github/workflows/**', '**/CMakeLists.txt', '**/Makefile', '**/*.h', '**/*.hpp', '**/*.c', '**/*.cpp', '**/*.cu', '**/*.swift', '**/*.m', '**/*.sh', '**/*.py', '**/*.nix']
  8. pull_request:
  9. types: [opened, synchronize, reopened]
  10. paths: ['**/CMakeLists.txt', '**/Makefile', '**/*.h', '**/*.hpp', '**/*.c', '**/*.cpp', '**/*.cu', '**/*.swift', '**/*.m', '**/*.sh', '**/*.py', '**/*.nix']
  11. jobs:
  12. nix-build-aarch64:
  13. if: ${{ vars.CACHIX_NAME != '' }}
  14. runs-on: ubuntu-latest
  15. steps:
  16. - name: Checkout repository
  17. uses: actions/checkout@v4
  18. - name: Install QEMU
  19. # Copy-paste from https://github.com/orgs/community/discussions/8305#discussioncomment-5888654
  20. run: |
  21. sudo apt-get update
  22. sudo apt-get install -y qemu-user-static qemu-system-aarch64
  23. sudo usermod -a -G kvm $USER
  24. - name: Install Nix
  25. uses: DeterminateSystems/nix-installer-action@v9
  26. with:
  27. github-token: ${{ secrets.GITHUB_TOKEN }}
  28. extra-conf: |
  29. extra-platforms = aarch64-linux
  30. extra-system-features = nixos-test kvm
  31. extra-substituters = https://${{ vars.CACHIX_NAME }}.cachix.org https://cuda-maintainers.cachix.org
  32. extra-trusted-public-keys = ${{ vars.CACHIX_PUBLIC_KEY }} cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E=
  33. - uses: DeterminateSystems/magic-nix-cache-action@v2
  34. with:
  35. upstream-cache: https://${{ matrix.cachixName }}.cachix.org
  36. - name: Set-up cachix to push the results to
  37. uses: cachix/cachix-action@v13
  38. with:
  39. authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
  40. name: ${{ vars.CACHIX_NAME }}
  41. - name: Show all output paths
  42. run: >
  43. nix run github:nix-community/nix-eval-jobs
  44. -- --gc-roots-dir gcroot
  45. --flake
  46. ".#packages.aarch64-linux"
  47. - name: Build
  48. run: >
  49. nix run github:Mic92/nix-fast-build
  50. -- --skip-cached --no-nom
  51. --systems aarch64-linux
  52. --flake
  53. ".#checks.aarch64-linux"