-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yaml
44 lines (41 loc) · 1.37 KB
/
action.yaml
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
name: 'setup-compiler'
description: 'Download and Deploy a compiler'
inputs:
compiler:
description: 'compiler choice (gcc or clang)'
type: choice
options:
- gcc
- clang
triple:
description: 'target triple (e.g. arm-none-eabi)'
type: string
required: true
ref:
description: 'compiler version (this may depends on the compiler provider)'
type: string
required: true
workspace:
description: 'current workspace path value (see GH checkout issue #785'
type: string
required: true
runs:
using: 'composite'
steps:
- name: 'Fetch compiler ${{ inputs.triple }}-${{ inputs.compiler }} ${{ inputs.ref }}'
if: ${{ inputs.compiler == 'gcc' && inputs.triple == 'arm-none-eabi' }}
uses: carlosperate/arm-none-eabi-gcc-action@v1
with:
release: ${{ inputs.ref }}
path-env-var: TOOLCHAIN_PATH
- name: 'Fetch clang compiler for target ${{ inputs.triple }}, ${{ inputs.ref }}'
if: ${{ inputs.compiler == 'clang' && inputs.triple == 'arm-none-eabi' }}
uses: stellar-aria/llvm-embedded-toolchain-for-arm-action@v1
with:
release: ${{ inputs.ref }}
path-env-var: TOOLCHAIN_PATH
- name: Link toolchain dir to predictable path in container
run: |
source=$(dirname $TOOLCHAIN_PATH)
ln -s $source ${{ inputs.workspace }}/${{ inputs.triple }}
shell: bash