diff options
author | Kito Cheng <kito.cheng@sifive.com> | 2023-06-06 17:55:14 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-06 17:55:14 +0800 |
commit | c407fae2bc765e4e42c5a3f14cd80b144dd1fbf9 (patch) | |
tree | 70d468c0ed753cba5b200aac955bd81614ea23c0 | |
parent | ce6d6ccc492bb17c375e6cac13510181c9afd084 (diff) | |
parent | 45e6d1b73c8cf7ae132915425dcccb1fee1f627c (diff) | |
download | riscv-gnu-toolchain-c407fae2bc765e4e42c5a3f14cd80b144dd1fbf9.zip riscv-gnu-toolchain-c407fae2bc765e4e42c5a3f14cd80b144dd1fbf9.tar.gz riscv-gnu-toolchain-c407fae2bc765e4e42c5a3f14cd80b144dd1fbf9.tar.bz2 |
Merge pull request #1264 from patrick-rivos/llvm-ci
Add LLVM to build CI
-rw-r--r-- | .github/workflows/build.yaml | 15 | ||||
-rw-r--r-- | .github/workflows/nightly-release.yaml | 18 |
2 files changed, 24 insertions, 9 deletions
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 339cecd..00e00ba 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -16,9 +16,14 @@ jobs: os: [ubuntu-20.04, ubuntu-22.04] mode: [newlib, linux, musl] target: [rv32gc-ilp32d, rv64gc-lp64d] + compiler: [gcc, llvm] exclude: - mode: musl target: rv32gc-ilp32d + - mode: newlib + compiler: llvm + - mode: musl + compiler: llvm steps: - uses: actions/checkout@v2 @@ -33,13 +38,19 @@ jobs: - name: build toolchain run: | TARGET_TUPLE=($(echo ${{ matrix.target }} | tr "-" "\n")) - ./configure --prefix=/opt/riscv --with-arch=${TARGET_TUPLE[0]} --with-abi=${TARGET_TUPLE[1]} + BUILD_TOOLCHAIN="./configure --prefix=/opt/riscv --with-arch=${TARGET_TUPLE[0]} --with-abi=${TARGET_TUPLE[1]}" + if [ "${{ matrix.compiler }}" == "llvm" ]; then # build toolchain with llvm + $BUILD_TOOLCHAIN --enable-llvm --enable-linux + else + $BUILD_TOOLCHAIN + fi sudo make -j $(nproc) ${{ matrix.mode }} - name: make report if: | matrix.os == 'ubuntu-20.04' && (matrix.mode == 'linux' || matrix.mode == 'newlib') + && matrix.compiler == 'gcc' run: | sudo make report-${{ matrix.mode }} -j $(nproc) @@ -58,7 +69,7 @@ jobs: *) MODE="elf";; esac - echo ::set-output name=TOOLCHAIN_NAME::riscv$BITS-$MODE-${{ matrix.os }}-nightly + echo ::set-output name=TOOLCHAIN_NAME::riscv$BITS-$MODE-${{ matrix.os }}-${{ matrix.compiler }}-nightly - uses: actions/upload-artifact@v2 with: diff --git a/.github/workflows/nightly-release.yaml b/.github/workflows/nightly-release.yaml index 347c74e..6d3a788 100644 --- a/.github/workflows/nightly-release.yaml +++ b/.github/workflows/nightly-release.yaml @@ -48,12 +48,17 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-20.04, ubuntu-22.04] - mode: [newlib, linux, musl] - target: [rv32gc-ilp32d, rv64gc-lp64d] + os: [ubuntu-20.04, ubuntu-22.04] + mode: [newlib, linux, musl] + target: [rv32gc-ilp32d, rv64gc-lp64d] + compiler: [gcc, llvm] exclude: - mode: musl target: rv32gc-ilp32d + - mode: newlib + compiler: llvm + - mode: musl + compiler: llvm steps: - uses: actions/checkout@v2 @@ -64,18 +69,17 @@ jobs: - name: install apt dependencies run: sudo ./.github/setup-apt.sh - + - name: build toolchain run: | TARGET_TUPLE=($(echo ${{ matrix.target }} | tr "-" "\n")) BUILD_TOOLCHAIN="./configure --prefix=/opt/riscv --with-arch=${TARGET_TUPLE[0]} --with-abi=${TARGET_TUPLE[1]}" - if [ "${{ matrix.mode }}" == "linux" ]; then # build toolchain with llvm + if [ "${{ matrix.compiler }}" == "llvm" ]; then # build toolchain with llvm $BUILD_TOOLCHAIN --enable-llvm --enable-linux - sudo make -j $(nproc) all else $BUILD_TOOLCHAIN - sudo make -j $(nproc) ${{ matrix.mode }} fi + sudo make -j $(nproc) ${{ matrix.mode }} - name: build qemu if: "${{ matrix.mode }}" == "linux" |