Skip to content

Commit

Permalink
Merge pull request #1246 from patrick-rivos/make-report-ci
Browse files Browse the repository at this point in the history
Add ci jobs for make-report and make-report multilib
  • Loading branch information
kito-cheng authored May 18, 2023
2 parents ac4e8dd + 92b89b6 commit 2c4d31f
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/setup-apt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ dpkg --add-architecture i386
apt update
apt install -y autoconf automake autotools-dev curl python3 libmpc-dev libmpfr-dev \
libgmp-dev gawk build-essential bison flex texinfo gperf libtool \
patchutils bc zlib1g-dev libexpat-dev git
patchutils bc zlib1g-dev libexpat-dev git ninja-build expect
58 changes: 58 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,14 @@ jobs:
./configure --prefix=/opt/riscv --with-arch=${TARGET_TUPLE[0]} --with-abi=${TARGET_TUPLE[1]}
sudo make -j $(nproc) ${{ matrix.mode }}
- name: make report
if: |
matrix.os == 'ubuntu-20.04'
&& (matrix.mode == 'linux' || matrix.mode == 'newlib')
&& matrix.target == 'rv64gc-lp64d'
run: |
sudo make report-${{ matrix.mode }} -j $(nproc)
- name: tarball build
run: tar czvf riscv.tar.gz -C /opt/ riscv/

Expand All @@ -57,3 +65,53 @@ jobs:
with:
name: ${{ steps.toolchain-name-generator.outputs.TOOLCHAIN_NAME }}
path: riscv.tar.gz

build-multilib:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04]
mode: [newlib, linux]
target: [rv64gc-lp64d]
steps:
- uses: actions/checkout@v2

- name: initialize submodules
run: |
git submodule init
git submodule update --recursive --progress --recommend-shallow
- name: install dependencies
run: sudo ./.github/setup-apt.sh

- 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]} --enable-multilib
sudo make -j $(nproc) ${{ matrix.mode }}
- name: make report
run: |
sudo make report-${{ matrix.mode }} -j $(nproc)
- name: tarball build
run: tar czvf riscv.tar.gz -C /opt/ riscv/

- name: generate prebuilt toolchain name
id: toolchain-name-generator
run: |
if [[ "${{ matrix.target }}" == *"32"* ]]; then BITS=32; else BITS=64; fi
case "${{ matrix.mode }}" in
"linux")
MODE="glibc";;
"musl")
MODE="musl";;
*)
MODE="elf";;
esac
echo ::set-output name=TOOLCHAIN_NAME::riscv$BITS-$MODE-${{ matrix.os }}-multilib-nightly
- uses: actions/upload-artifact@v2
with:
name: ${{ steps.toolchain-name-generator.outputs.TOOLCHAIN_NAME }}
path: riscv.tar.gz
2 changes: 1 addition & 1 deletion scripts/testsuite-filter
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ def filter_result(tool, libc, white_list_base_dir, unexpected_results):
fail_count = summary[config][tool]
print ("%13d |" % fail_count, end='')
print ("")
if any_fail:
if any_fail or len(summary.items()) == 0:
return 1
else:
return 0
Expand Down

0 comments on commit 2c4d31f

Please sign in to comment.