-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
40 lines (39 loc) · 1.39 KB
/
action.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
name: "cargo-featalign action"
description: "Use `cargo-featalign` to check your crate's features."
branding:
color: "gray-dark"
icon: "check-circle"
inputs:
crate:
description: "The path of the crate root, which will be passed to cargo-featalign directly."
required: true
features:
description: "The features that you want to check, which will be passed to cargo-featalign's `--features` directly."
required: true
ignore:
description: "The specific crates that you want to ignore, which will be passed to cargo-featalign's `--ignore` directly."
required: false
default: "''"
default-std:
description: "If the default features is std or not."
required: false
default: "false"
runs:
using: "composite"
steps:
- name: Setup cargo-featalign
run: |
curl -L https://github.com/hack-ink/cargo-featalign/releases/download/v0.6.2/cargo-featalign-x86_64-unknown-linux-gnu.zst | zstd -o cargo-featalign -d
chmod u+x cargo-featalign
mv cargo-featalign ~/.cargo/bin
shell: bash
- name: Check ${{ inputs.crate }} features
run: |
cargo featalign ${{ inputs.crate }} \
--features ${{ inputs.features }} \
--mode check \
--workspace-only \
--ignore ${{ inputs.ignore }} \
${{ inputs.default-std == 'true' && '--default-std' || '' }} \
--depth -1 | jq
shell: bash