Browse Source

Add prebuilt clang and qemu to release workflow

pull/1263/head
alexsifivetw 3 years ago
parent
commit
147bb3eeca
  1. 2
      .github/setup-apt.sh
  2. 15
      .github/workflows/nightly-release.yaml
  3. 2
      README.md

2
.github/setup-apt.sh

@ -3,7 +3,7 @@
# install OS prerequisites
dpkg --add-architecture i386
apt update
apt install -y autoconf automake autotools-dev curl python3 libmpc-dev libmpfr-dev \
apt install -y 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 git ninja-build cmake libglib2.0-dev expect \
device-tree-compiler

15
.github/workflows/nightly-release.yaml

@ -68,8 +68,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]}
sudo make -j $(nproc) ${{ matrix.mode }}
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
$BUILD_TOOLCHAIN --enable-llvm --enable-linux
sudo make -j $(nproc) all build-sim SIM=qemu
else
$BUILD_TOOLCHAIN
sudo make -j $(nproc) ${{ matrix.mode }}
fi
- name: build qemu
if: "${{ matrix.mode }}" == "linux"
run: |
make -j$(nproc) build-sim SIM=qemu
- name: tarball build
run: tar czvf riscv.tar.gz -C /opt/ riscv/

2
README.md

@ -20,7 +20,7 @@ Several standard packages are needed to build the toolchain.
On Ubuntu, executing the following command should suffice:
$ 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
$ 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
On Fedora/CentOS/RHEL OS, executing the following command should suffice:

Loading…
Cancel
Save