-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.yml
More file actions
71 lines (64 loc) · 2.17 KB
/
action.yml
File metadata and controls
71 lines (64 loc) · 2.17 KB
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
61
62
63
64
65
66
67
68
69
70
71
---
name: Setup Rust
description: Setup Rust toolchain and Shipyard registry access
branding:
icon: package
color: purple
inputs:
ssh-private-key:
description: PEM-encoded SSH private key for pulling the Shipyard registry index
required: true
token:
description: Token for pushing to/pulling from the Shipyard registry
required: true
registry:
description: The name of the registry as it appears in the Cargo.toml file
required: false
default: wafflehacks
toolchain:
description: Rust toolchain specification -- see https://rust-lang.github.io/rustup/concepts/toolchains.html#toolchain-specification
required: false
default: stable
components:
description: Comma-separated list of components to be additionally installed
required: false
with-mold:
description: Whether to install the mold linker
required: false
default: true
mold-version:
description: Version of the mold linker to install
required: false
default: "2.31.0"
runs:
using: composite
steps:
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ inputs.toolchain }}
components: ${{ inputs.components }}
- uses: TheHackerApp/setup-ssh@main
with:
private-key: ${{ inputs.ssh-private-key }}
host: |
ssh.shipyard.rs
github.com
- name: Login to Shipyard registry
shell: bash
run: cargo login --registry ${{ inputs.registry }} ${{ inputs.token }}
- name: Set Cargo environment variables
shell: bash
run: |
echo "CARGO_NET_GIT_FETCH_WITH_CLI=true" >> $GITHUB_ENV
echo "CARGO_REGISTRY_GLOBAL_CREDENTIAL_PROVIDERS=cargo:token" >> $GITHUB_ENV
- name: Install mold linker
shell: bash
if: inputs.with-mold == 'true'
run: |
wget -qO /tmp/mold.tar.gz https://github.com/rui314/mold/releases/download/v${{ inputs.mold-version }}/mold-${{ inputs.mold-version }}-x86_64-linux.tar.gz; \
sudo tar -xf /tmp/mold.tar.gz -C /usr/local --strip-components 1; \
rm /tmp/mold.tar.gz
- name: Install clang
shell: bash
if: inputs.with-mold == 'true'
run: sudo apt-get install -y clang libclang-dev