flakebox-ci.yml 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. # THIS FILE IS AUTOGENERATED FROM FLAKEBOX CONFIGURATION
  2. jobs:
  3. build:
  4. name: Build
  5. runs-on: ${{ matrix.runs-on }}
  6. steps:
  7. - uses: actions/checkout@v4
  8. - name: Install Nix
  9. uses: DeterminateSystems/nix-installer-action@v4
  10. - name: Magic Nix Cache
  11. uses: DeterminateSystems/magic-nix-cache-action@v2
  12. - name: Build on ${{ matrix.host }}
  13. run: 'nix flake check -L .#
  14. '
  15. strategy:
  16. matrix:
  17. host:
  18. - macos
  19. - linux
  20. include:
  21. - host: linux
  22. runs-on: ubuntu-latest
  23. timeout: 60
  24. - host: macos
  25. runs-on: macos-12
  26. timeout: 60
  27. timeout-minutes: ${{ matrix.timeout }}
  28. flake:
  29. name: Flake self-check
  30. runs-on: ubuntu-latest
  31. steps:
  32. - uses: actions/checkout@v4
  33. - name: Check Nix flake inputs
  34. uses: DeterminateSystems/flake-checker-action@v5
  35. with:
  36. fail-mode: true
  37. lint:
  38. name: Lint
  39. runs-on: ubuntu-latest
  40. steps:
  41. - uses: actions/checkout@v4
  42. - name: Install Nix
  43. uses: DeterminateSystems/nix-installer-action@v4
  44. - name: Magic Nix Cache
  45. uses: DeterminateSystems/magic-nix-cache-action@v2
  46. - name: Cargo Cache
  47. uses: actions/cache@v3
  48. with:
  49. key: ${{ runner.os }}-${{ hashFiles('Cargo.lock') }}
  50. path: ~/.cargo
  51. - name: Commit Check
  52. run: '# run the same check that git `pre-commit` hook does
  53. nix develop --ignore-environment .#lint --command ./misc/git-hooks/pre-commit
  54. '
  55. name: CI
  56. 'on':
  57. merge_group:
  58. branches:
  59. - master
  60. - main
  61. pull_request:
  62. branches:
  63. - master
  64. - main
  65. push:
  66. branches:
  67. - master
  68. - main
  69. tags:
  70. - v*
  71. workflow_dispatch: {}
  72. # THIS FILE IS AUTOGENERATED FROM FLAKEBOX CONFIGURATION