Skip to content

Commit 45e6d1b

Browse files
committed
Add llvm to PR ci
1 parent 9f73648 commit 45e6d1b

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

.github/workflows/build.yaml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,14 @@ jobs:
1616
os: [ubuntu-20.04, ubuntu-22.04]
1717
mode: [newlib, linux, musl]
1818
target: [rv32gc-ilp32d, rv64gc-lp64d]
19+
compiler: [gcc, llvm]
1920
exclude:
2021
- mode: musl
2122
target: rv32gc-ilp32d
23+
- mode: newlib
24+
compiler: llvm
25+
- mode: musl
26+
compiler: llvm
2227
steps:
2328
- uses: actions/checkout@v2
2429

@@ -33,13 +38,19 @@ jobs:
3338
- name: build toolchain
3439
run: |
3540
TARGET_TUPLE=($(echo ${{ matrix.target }} | tr "-" "\n"))
36-
./configure --prefix=/opt/riscv --with-arch=${TARGET_TUPLE[0]} --with-abi=${TARGET_TUPLE[1]}
41+
BUILD_TOOLCHAIN="./configure --prefix=/opt/riscv --with-arch=${TARGET_TUPLE[0]} --with-abi=${TARGET_TUPLE[1]}"
42+
if [ "${{ matrix.compiler }}" == "llvm" ]; then # build toolchain with llvm
43+
$BUILD_TOOLCHAIN --enable-llvm --enable-linux
44+
else
45+
$BUILD_TOOLCHAIN
46+
fi
3747
sudo make -j $(nproc) ${{ matrix.mode }}
3848
3949
- name: make report
4050
if: |
4151
matrix.os == 'ubuntu-20.04'
4252
&& (matrix.mode == 'linux' || matrix.mode == 'newlib')
53+
&& matrix.compiler == 'gcc'
4354
run: |
4455
sudo make report-${{ matrix.mode }} -j $(nproc)
4556
@@ -58,7 +69,7 @@ jobs:
5869
*)
5970
MODE="elf";;
6071
esac
61-
echo ::set-output name=TOOLCHAIN_NAME::riscv$BITS-$MODE-${{ matrix.os }}-nightly
72+
echo ::set-output name=TOOLCHAIN_NAME::riscv$BITS-$MODE-${{ matrix.os }}-${{ matrix.compiler }}-nightly
6273
6374
- uses: actions/upload-artifact@v2
6475
with:

0 commit comments

Comments
 (0)