-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (45 loc) · 1.38 KB
/
cargo-check.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# SPDX-FileCopyrightText: 2021-2023 Eduardo Robles <edu@sequentech.io>
# SPDX-FileCopyrightText: 2022 Félix Robles <felix@sequentech.io>
#
# SPDX-License-Identifier: AGPL-3.0-only
name: Cargo check
on:
workflow_call:
inputs:
cachix-auth-identity:
description: 'Name of a cachix cache to push and pull/substitute'
required: true
type: string
command:
description: 'Command to execute'
default: 'cargo check'
required: false
type: string
secrets:
cachix-auth-token:
required: true
jobs:
check:
name: 'Static Analysis: cargo check'
strategy:
matrix:
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v19
with:
install_url: https://github.com/numtide/nix-unstable-installer/releases/download/nix-2.10.0pre20220629_b7eb4ac/install
nix_path: nixpkgs=channel:nixos-22.05
extra_nix_config: |
experimental-features = nix-command flakes
- uses: cachix/cachix-action@v12
with:
name: '${{ inputs.cachix-auth-identity }}'
authToken: '${{ secrets.cachix-auth-token }}'
- name: Run cargo check
run: |
nix \
--extra-experimental-features "nix-command flakes" \
develop \
--command bash -c "${{ inputs.command }}"