1# generated `cargo xtask workflows`. Do not edit.
2name: Nix build
3on:
4 workflow_call:
5 inputs:
6 flake-output:
7 type: string
8 default: default
9 cachix-filter:
10 type: string
11jobs:
12 nix-build-linux-x86:
13 if: github.repository_owner == 'zed-industries'
14 runs-on: namespace-profile-16x32-ubuntu-2204
15 env:
16 ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
17 ZED_MINIDUMP_ENDPOINT: ${{ secrets.ZED_MINIDUMP_ENDPOINT }}
18 ZED_CLOUD_PROVIDER_ADDITIONAL_MODELS_JSON: ${{ secrets.ZED_CLOUD_PROVIDER_ADDITIONAL_MODELS_JSON }}
19 GIT_LFS_SKIP_SMUDGE: '1'
20 steps:
21 - name: steps::checkout_repo
22 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
23 with:
24 clean: 'false'
25 - name: steps::nix::install_nix
26 uses: cachix/install-nix-action@02a151ada4993995686f9ed4f1be7cfbb229e56f
27 with:
28 github_access_token: ${{ secrets.GITHUB_TOKEN }}
29 - name: steps::nix::cachix_action
30 uses: cachix/cachix-action@0fc020193b5a1fa3ac4575aa3a7d3aa6a35435ad
31 with:
32 name: zed
33 authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
34 pushFilter: ${{ inputs.cachix-filter }}
35 cachixArgs: -v
36 - name: steps::nix::build
37 run: nix build .#${{ inputs.flake-output }} -L --accept-flake-config
38 shell: bash -euxo pipefail {0}
39 timeout-minutes: 60
40 continue-on-error: true
41 nix-build-mac-arm:
42 if: github.repository_owner == 'zed-industries'
43 runs-on: self-mini-macos
44 env:
45 ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
46 ZED_MINIDUMP_ENDPOINT: ${{ secrets.ZED_MINIDUMP_ENDPOINT }}
47 ZED_CLOUD_PROVIDER_ADDITIONAL_MODELS_JSON: ${{ secrets.ZED_CLOUD_PROVIDER_ADDITIONAL_MODELS_JSON }}
48 GIT_LFS_SKIP_SMUDGE: '1'
49 steps:
50 - name: steps::checkout_repo
51 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
52 with:
53 clean: 'false'
54 - name: steps::nix::set_path
55 run: |
56 echo "/nix/var/nix/profiles/default/bin" >> "$GITHUB_PATH"
57 echo "/Users/administrator/.nix-profile/bin" >> "$GITHUB_PATH"
58 shell: bash -euxo pipefail {0}
59 - name: steps::nix::cachix_action
60 uses: cachix/cachix-action@0fc020193b5a1fa3ac4575aa3a7d3aa6a35435ad
61 with:
62 name: zed
63 authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
64 pushFilter: ${{ inputs.cachix-filter }}
65 cachixArgs: -v
66 - name: steps::nix::build
67 run: nix build .#${{ inputs.flake-output }} -L --accept-flake-config
68 shell: bash -euxo pipefail {0}
69 - name: steps::nix::limit_store
70 run: |-
71 if [ "$(du -sm /nix/store | cut -f1)" -gt 50000 ]; then
72 nix-collect-garbage -d || true
73 fi
74 shell: bash -euxo pipefail {0}
75 timeout-minutes: 60
76 continue-on-error: true