fork/eza

git clone https://git.julia.blue/fork/eza

Christina SørensenMerge pull request #622 from eza-community/dependabot/github_actions/DeterminateSystems/nix-installer-action-7ea5c1e0a

v0.16.1
1.6 KiB64 linesraw
1on:
2  workflow_dispatch:
3  pull_request:
4    branches: [ main ]
5    paths:
6      - '.github/workflows/flake.yml'
7      - 'src/**'
8      - 'Cargo.*'
9      - "*.toml"
10      - "flake.*"
11      - "*.nix"
12      - "*.rs"
13  push:
14    branches: [main]
15    paths:
16      - '.github/workflows/flake.yml'
17      - 'src/**'
18      - 'Cargo.*'
19      - "*.toml"
20      - "flake.*"
21      - "*.nix"
22      - "*.rs"
23
24concurrency:
25  group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
26  cancel-in-progress: true
27
28jobs:
29  flake-checker:
30    name: Flake Checker
31    runs-on: ubuntu-22.04
32    steps:
33      - uses: actions/checkout@v4
34      - name: Check Nix flake inputs
35        uses: DeterminateSystems/flake-checker-action@v5
36
37  check:
38    name: Check Nix Flake
39    runs-on: ubuntu-22.04
40    steps:
41      - uses: actions/checkout@v4
42      - name: Install Nix
43        uses: DeterminateSystems/nix-installer-action@v7
44      - name: Setup Nix cache
45        uses: DeterminateSystems/magic-nix-cache-action@main
46      - name: Nix Flake Check
47        run: nix flake check --all-systems
48
49  build:
50    name: Build Nix package
51
52    # if cross compilation is desired add 'aarch64-linux', 'x86_64-darwin' and 'aarch64-darwin' and fix the flake to support cross compilation.
53    strategy:
54      matrix:
55        target: [x86_64-linux]
56    runs-on: ubuntu-22.04
57    steps:
58      - uses: actions/checkout@v4
59      - name: Install Nix
60        uses: DeterminateSystems/nix-installer-action@v7
61      - name: Setup Nix cache
62        uses: DeterminateSystems/magic-nix-cache-action@main
63      - name: Nix Build
64        run: nix build .#packages.${{ matrix.target }}.default