|
36 | 36 | ./configure --prefix=/opt/riscv --with-arch=${TARGET_TUPLE[0]} --with-abi=${TARGET_TUPLE[1]} |
37 | 37 | sudo make -j $(nproc) ${{ matrix.mode }} |
38 | 38 |
|
| 39 | + - name: make report |
| 40 | + if: | |
| 41 | + matrix.os == 'ubuntu-20.04' |
| 42 | + && (matrix.mode == 'linux' || matrix.mode == 'newlib') |
| 43 | + && matrix.target == 'rv64gc-lp64d' |
| 44 | + run: | |
| 45 | + sudo make report-${{ matrix.mode }} -j $(nproc) |
| 46 | +
|
39 | 47 | - name: tarball build |
40 | 48 | run: tar czvf riscv.tar.gz -C /opt/ riscv/ |
41 | 49 |
|
|
57 | 65 | with: |
58 | 66 | name: ${{ steps.toolchain-name-generator.outputs.TOOLCHAIN_NAME }} |
59 | 67 | path: riscv.tar.gz |
| 68 | + |
| 69 | + build-multilib: |
| 70 | + runs-on: ${{ matrix.os }} |
| 71 | + strategy: |
| 72 | + matrix: |
| 73 | + os: [ubuntu-20.04] |
| 74 | + mode: [newlib, linux] |
| 75 | + target: [rv64gc-lp64d] |
| 76 | + steps: |
| 77 | + - uses: actions/checkout@v2 |
| 78 | + |
| 79 | + - name: initialize submodules |
| 80 | + run: | |
| 81 | + git submodule init |
| 82 | + git submodule update --recursive --progress --recommend-shallow |
| 83 | +
|
| 84 | + - name: install dependencies |
| 85 | + run: sudo ./.github/setup-apt.sh |
| 86 | + |
| 87 | + - name: build toolchain |
| 88 | + run: | |
| 89 | + TARGET_TUPLE=($(echo ${{ matrix.target }} | tr "-" "\n")) |
| 90 | + ./configure --prefix=/opt/riscv --with-arch=${TARGET_TUPLE[0]} --with-abi=${TARGET_TUPLE[1]} --enable-multilib |
| 91 | + sudo make -j $(nproc) ${{ matrix.mode }} |
| 92 | +
|
| 93 | + - name: make report |
| 94 | + run: | |
| 95 | + sudo make report-${{ matrix.mode }} -j $(nproc) |
| 96 | +
|
| 97 | + - name: tarball build |
| 98 | + run: tar czvf riscv.tar.gz -C /opt/ riscv/ |
| 99 | + |
| 100 | + - name: generate prebuilt toolchain name |
| 101 | + id: toolchain-name-generator |
| 102 | + run: | |
| 103 | + if [[ "${{ matrix.target }}" == *"32"* ]]; then BITS=32; else BITS=64; fi |
| 104 | + case "${{ matrix.mode }}" in |
| 105 | + "linux") |
| 106 | + MODE="glibc";; |
| 107 | + "musl") |
| 108 | + MODE="musl";; |
| 109 | + *) |
| 110 | + MODE="elf";; |
| 111 | + esac |
| 112 | + echo ::set-output name=TOOLCHAIN_NAME::riscv$BITS-$MODE-${{ matrix.os }}-multilib-nightly |
| 113 | +
|
| 114 | + - uses: actions/upload-artifact@v2 |
| 115 | + with: |
| 116 | + name: ${{ steps.toolchain-name-generator.outputs.TOOLCHAIN_NAME }} |
| 117 | + path: riscv.tar.gz |
0 commit comments