Skip to content

Commit 2b5b771

Browse files
authored
CI: Build llvm for xtensa (#3637)
1 parent 9f637e6 commit 2b5b771

2 files changed

Lines changed: 20 additions & 3 deletions

File tree

.github/workflows/build_llvm_libraries.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,14 @@ on:
1414
container_image:
1515
required: false
1616
type: string
17+
extra_build_llvm_options:
18+
required: false
19+
type: string
20+
default: ""
21+
cache_key_suffix:
22+
required: false
23+
type: string
24+
default: ""
1725
outputs:
1826
cache_key:
1927
description: "A cached key of LLVM libraries"
@@ -45,7 +53,7 @@ jobs:
4553

4654
- name: retrieve the last commit ID
4755
id: get_last_commit
48-
run: echo "last_commit=$(GH_TOKEN=${{ secrets.GITHUB_TOKEN }} /usr/bin/env python3 ./build_llvm.py --llvm-ver)" >> $GITHUB_OUTPUT
56+
run: echo "last_commit=$(GH_TOKEN=${{ secrets.GITHUB_TOKEN }} /usr/bin/env python3 ./build_llvm.py ${{ inputs.extra_build_llvm_options }} --llvm-ver)" >> $GITHUB_OUTPUT
4957
working-directory: build-scripts
5058

5159
# Bump the prefix number to evict all previous caches and
@@ -54,7 +62,7 @@ jobs:
5462
# suspect.
5563
- name: form the cache key of libraries
5664
id: create_lib_cache_key
57-
run: echo "key=0-llvm-libraries-${{ inputs.os }}-${{ inputs.arch }}-${{ steps.get_last_commit.outputs.last_commit }}" >> $GITHUB_OUTPUT
65+
run: echo "key=0-llvm-libraries-${{ inputs.os }}-${{ inputs.arch }}-${{ steps.get_last_commit.outputs.last_commit }}${{ inputs.cache_key_suffix }}" >> $GITHUB_OUTPUT
5866

5967
- name: Cache LLVM libraries
6068
id: retrieve_llvm_libs
@@ -101,5 +109,5 @@ jobs:
101109

102110
- name: Build LLVM libraries
103111
if: steps.retrieve_llvm_libs.outputs.cache-hit != 'true'
104-
run: /usr/bin/env python3 ./build_llvm.py --arch ${{ inputs.arch }}
112+
run: /usr/bin/env python3 ./build_llvm.py ${{ inputs.extra_build_llvm_options }} --arch ${{ inputs.arch }}
105113
working-directory: build-scripts

.github/workflows/spec_test_on_nuttx.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,15 @@ jobs:
3939
arch: "ARM RISCV AArch64"
4040
container_image: ghcr.io/no1wudi/nuttx/apache-nuttx-ci-linux@sha256:8c4e00b607d4d6d66ba8f51c4544819a616eac69d3a2ac669e2af2150e2eb0f9
4141

42+
build_llvm_libraries_xtensa:
43+
uses: ./.github/workflows/build_llvm_libraries.yml
44+
with:
45+
os: "ubuntu-22.04"
46+
arch: "Xtensa"
47+
extra_build_llvm_options: "--platform xtensa"
48+
cache_key_suffix: "-xtensa"
49+
container_image: ghcr.io/no1wudi/nuttx/apache-nuttx-ci-linux@sha256:8c4e00b607d4d6d66ba8f51c4544819a616eac69d3a2ac669e2af2150e2eb0f9
50+
4251
spec_test_on_qemu:
4352
runs-on: ubuntu-latest
4453
needs: [build_llvm_libraries]

0 commit comments

Comments
 (0)