Skip to content

Commit 147bb3e

Browse files
committed
Add prebuilt clang and qemu to release workflow
1 parent 4cce1a0 commit 147bb3e

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
lines changed

.github/setup-apt.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# install OS prerequisites
44
dpkg --add-architecture i386
55
apt update
6-
apt install -y autoconf automake autotools-dev curl python3 libmpc-dev libmpfr-dev \
6+
apt install -y autoconf automake autotools-dev curl python3 python3-pip libmpc-dev libmpfr-dev \
77
libgmp-dev gawk build-essential bison flex texinfo gperf libtool \
88
patchutils bc zlib1g-dev libexpat-dev git ninja-build cmake libglib2.0-dev expect \
99
device-tree-compiler

.github/workflows/nightly-release.yaml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,19 @@ jobs:
6868
- name: build toolchain
6969
run: |
7070
TARGET_TUPLE=($(echo ${{ matrix.target }} | tr "-" "\n"))
71-
./configure --prefix=/opt/riscv --with-arch=${TARGET_TUPLE[0]} --with-abi=${TARGET_TUPLE[1]}
72-
sudo make -j $(nproc) ${{ matrix.mode }}
71+
BUILD_TOOLCHAIN="./configure --prefix=/opt/riscv --with-arch=${TARGET_TUPLE[0]} --with-abi=${TARGET_TUPLE[1]}"
72+
if [ "${{ matrix.mode }}" == "linux" ]; then # build toolchain with llvm
73+
$BUILD_TOOLCHAIN --enable-llvm --enable-linux
74+
sudo make -j $(nproc) all build-sim SIM=qemu
75+
else
76+
$BUILD_TOOLCHAIN
77+
sudo make -j $(nproc) ${{ matrix.mode }}
78+
fi
79+
80+
- name: build qemu
81+
if: "${{ matrix.mode }}" == "linux"
82+
run: |
83+
make -j$(nproc) build-sim SIM=qemu
7384
7485
- name: tarball build
7586
run: tar czvf riscv.tar.gz -C /opt/ riscv/

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Several standard packages are needed to build the toolchain.
2020

2121
On Ubuntu, executing the following command should suffice:
2222

23-
$ sudo apt-get install 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 ninja-build git cmake libglib2.0-dev
23+
$ sudo apt-get install autoconf automake autotools-dev curl python3 python3-pip libmpc-dev libmpfr-dev libgmp-dev gawk build-essential bison flex texinfo gperf libtool patchutils bc zlib1g-dev libexpat-dev ninja-build git cmake libglib2.0-dev
2424

2525
On Fedora/CentOS/RHEL OS, executing the following command should suffice:
2626

0 commit comments

Comments
 (0)