Skip to content

Commit 6b7faa3

Browse files
authored
Add option to install Extended LLVM installation (#41)
* Add `extended-llvm` action input * Add CI check for `extended-llvm` input
1 parent 59e0d2d commit 6b7faa3

File tree

3 files changed

+24
-15
lines changed

3 files changed

+24
-15
lines changed

.github/workflows/ci.yaml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
name: Check environmnent
1616
runs-on: ubuntu-latest
1717
steps:
18-
- uses: actions/checkout@v3
18+
- uses: actions/checkout@v4
1919
- uses: ./
2020
name: Install Xtensa Rust
2121
with:
@@ -28,35 +28,37 @@ jobs:
2828
- run: xtensa-esp32s3-elf-gcc --version
2929

3030
check-arguments:
31-
name: Check `buildtarget`, `version`, `override` and `ldproxy` arguments
31+
name: Check `buildtarget`, `version`, `override`, `ldproxy`, and `extended-llvm` arguments
3232
runs-on: ubuntu-latest
3333
steps:
3434
- run: rustup update stable && rustup default stable
35-
- uses: actions/checkout@v3
35+
- uses: actions/checkout@v4
3636
- uses: ./
3737
name: Install Xtensa Rust
3838
with:
3939
override: false
4040
ldproxy: true
4141
buildtargets: esp32,esp32c3
4242
version: 1.64.0.0
43+
extended-llvm: true
4344
- run: rustc +esp --print target-list | grep xtensa
4445
- run: env | grep LIBCLANG_PATH
4546
- run: xtensa-esp32-elf-gcc --version
4647
- run: ls $HOME/.cargo/bin/ldproxy | grep ldproxy
4748
- run: cargo +esp --version | grep 1.64.0
4849
- run: rustup default | grep stable
50+
- run: $CLANG_PATH --version | grep -i espressif
4951

5052
check-host-targets:
5153
name: Check host | ${{ matrix.os }}
5254
strategy:
5355
fail-fast: false
5456
matrix:
55-
os: [windows-latest, macos-latest]
57+
os: [windows-latest, macos-latest]
5658
runs-on: ${{ matrix.os }}
5759
steps:
5860
- run: rustup update stable && rustup default stable
59-
- uses: actions/checkout@v3
61+
- uses: actions/checkout@v4
6062
- uses: ./
6163
name: Install Xtensa Rust
6264
- run: rustc +esp --print target-list | grep xtensa

README.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,15 @@ jobs:
4747
4848
This action can be configured in various ways using its inputs:
4949
50-
| Name | Description | Type | Default |
51-
| :------------: | :-----------------------------------------------: | :----: | :------: |
52-
| `default` | Set installed toolchain as a default toolchain | bool | `false` |
53-
| `buildtargets` | Comma separated list of targets | string | _all_ |
54-
| `version` | Which version of the toolchain to install | string | _latest_ |
55-
| `ldproxy` | Whether to install `ldproxy` (required for `std`) | bool | `true` |
56-
| `override` | Overrides the installed toolchain | bool | `true` |
57-
| `export` | Sources `${ESPUP_EXPORT_FILE}` | bool | `true` |
50+
| Name | Description | Type | Default |
51+
| :-------------: | :--------------------------------------------------------: | :----: | :------: |
52+
| `default` | Set installed toolchain as a default toolchain | bool | `false` |
53+
| `buildtargets` | Comma separated list of targets | string | _all_ |
54+
| `version` | Which version of the toolchain to install | string | _latest_ |
55+
| `ldproxy` | Whether to install `ldproxy` (required for `std`) | bool | `true` |
56+
| `override` | Overrides the installed toolchain | bool | `true` |
57+
| `export` | Sources `${ESPUP_EXPORT_FILE}` | bool | `true` |
58+
| `extended-llvm` | Install the whole LLVM instead of only installing the libs | bool | `false` |
5859

5960
All inputs are optional; if no inputs are provided:
6061

action.yaml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ inputs:
2525
export:
2626
description: Whether to export the `${ESPUP_EXPORT_FILE}` into the GitHub environment
2727
default: true
28+
extended-llvm:
29+
description: Install the whole LLVM instead of only installing the libs
30+
default: false
2831

2932
runs:
3033
using: composite
@@ -66,19 +69,22 @@ runs:
6669
run: |
6770
source "$HOME/.cargo/env"
6871
[[ "${{ inputs.version }}" != latest ]] && version="--toolchain-version ${{ inputs.version }}" || version=""
69-
"$HOME/.cargo/bin/espup" install -l debug --targets ${{ inputs.buildtargets }} $version
72+
[[ "${{ inputs.extended-llvm }}" = true ]] && extended_llvm="-e" || extended_llvm=""
73+
"$HOME/.cargo/bin/espup" install -l debug --targets ${{ inputs.buildtargets }} $extended_llvm $version
7074
source "$HOME/exports"
7175
if [[ "${{ inputs.export }}" = true ]]; then
7276
echo "$PATH" >> "$GITHUB_PATH"
7377
echo "LIBCLANG_PATH=${LIBCLANG_PATH}" >> "$GITHUB_ENV"
78+
echo "CLANG_PATH=${CLANG_PATH}" >> "$GITHUB_ENV"
7479
fi
7580
7681
- name: Install Xtensa toolchain (Windows)
7782
if: env.HOST_TARGET == 'x86_64-pc-windows-msvc'
7883
shell: bash
7984
run: |
8085
[[ "${{ inputs.version }}" != latest ]] && version="--toolchain-version ${{ inputs.version }}" || version=""
81-
"$HOME/.cargo/bin/espup.exe" install -l debug --targets ${{ inputs.buildtargets }} $version
86+
[[ "${{ inputs.extended-llvm }}" = true ]] && extended_llvm="-e" || extended_llvm=""
87+
"$HOME/.cargo/bin/espup.exe" install -l debug --targets ${{ inputs.buildtargets }} $extended_llvm $version
8288
8389
- name: Set default and override
8490
shell: bash

0 commit comments

Comments
 (0)