-
-
Notifications
You must be signed in to change notification settings - Fork 252
/
action.yml
60 lines (57 loc) · 1.68 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: Setup
description: Initial setup for workflows
inputs:
kind:
description: Job kind (for cache key)
required: false
toolchain:
description: Toolchain version
required: false
default: "1.61.0"
components:
description: Toolchain components
required: false
targets:
description: Toolchain targets
required: false
tools:
description: Additional tools to install
required: false
outputs:
cache-key:
description: Cache key
value: ${{inputs.kind}}-${{runner.os}}-${{steps.toolchain.outputs.cachekey}}
runs:
using: composite
steps:
- name: Install Rust nightly # for minimal-versions
uses: dtolnay/rust-toolchain@nightly
- name: Install Rust ${{inputs.toolchain}}
uses: dtolnay/rust-toolchain@master
id: toolchain
with:
toolchain: ${{inputs.toolchain}}
components: ${{inputs.components}}
targets: ${{inputs.targets}}
- name: Install cargo-hack,cargo-minimal-versions
uses: taiki-e/install-action@v1
with:
tool: cargo-hack,cargo-minimal-versions
- name: Install ${{inputs.tools}}
uses: taiki-e/install-action@v1
if: ${{inputs.tools}}
with:
tool: ${{inputs.tools}}
- name: Generate lockfile
run: cargo minimal-versions generate-lockfile
shell: sh
- name: Set up cache
uses: Swatinem/rust-cache@v2
with:
shared-key: ${{inputs.kind}}-${{runner.os}}-${{steps.toolchain.outputs.cachekey}}
- name: Bootstraping Grammars - Building
run: cargo build --package pest_bootstrap
shell: sh
- name: Bootstraping Grammars - Executing
run: cargo run --package pest_bootstrap
shell: sh