-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
84 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# Azure Pipelines CI build configuration | ||
# Documentation at https://aka.ms/yaml | ||
|
||
variables: | ||
# commit reference in https://github.com/riscv/riscv-gnu-toolchain | ||
RISCV_GNU_TOOLCHAIN_COMMIT_ID: 2e334e222d43bcde237c289385c977dcab81eda9 | ||
|
||
trigger: | ||
branches: | ||
include: | ||
- master | ||
|
||
jobs: | ||
- job: "GCC" | ||
displayName: "RV32 GCC" | ||
pool: | ||
vmImage: "ubuntu-16.04" | ||
steps: | ||
- bash: | | ||
# Dependencies as listed at | ||
# https://github.com/riscv/riscv-gnu-toolchain | ||
sudo apt-get install -y autoconf automake autotools-dev curl \ | ||
libmpc-dev libmpfr-dev libgmp-dev gawk build-essential bison \ | ||
flex texinfo gperf libtool patchutils bc zlib1g-dev libexpat-dev | ||
displayName: 'Install build dependencies' | ||
- bash: | | ||
sudo mkdir /tools/riscv && sudo chmod 777 /tools/riscv | ||
./build-gcc.sh | ||
displayName: 'Build GCC toolchain' | ||
env: | ||
ARTIFACT_STAGING_DIR: $(Build.ArtifactStagingDirectory) | ||
- task: GithubRelease@0 | ||
displayName: 'Upload to GitHub releases' | ||
inputs: | ||
gitHubConnection: lowrisc-artifact-upload | ||
repositoryName: lowrisc/lowrisc-toolchains | ||
tagSource: auto | ||
assets: | | ||
$(Build.ArtifactStagingDirectory)/build.log | ||
$(Build.ArtifactStagingDirectory)/*.tar.xz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
set -x | ||
|
||
TOP=$PWD | ||
|
||
TOOLCHAIN_NAME=lowrisc-toolchain-gcc-rv32imc-$(git -C $TOP describe --always) | ||
|
||
mkdir -p build/gcc | ||
cd build/gcc | ||
git clone --recursive https://github.com/riscv/riscv-gnu-toolchain | ||
cd riscv-gnu-toolchain | ||
git checkout $RISCV_GNU_TOOLCHAIN_COMMIT_ID | ||
./configure --prefix=/tools/riscv \ | ||
--with-abi=ilp32 \ | ||
--with-arch=rv32imc \ | ||
--with-cmodel=medany 2>&1 | tee $ARTIFACT_STAGING_DIR/build.log | ||
make -j$(nproc) 2>&1 | tee $ARTIFACT_STAGING_DIR/build.log | ||
# Includes make install | ||
|
||
echo 'Version:' >> /tools/riscv/buildinfo | ||
git -C $TOP describe --always >> /tools/riscv/buildinfo | ||
echo >> /tools/riscv/buildinfo | ||
|
||
echo 'Version of https://github.com/riscv/riscv-gnu-toolchain:' >> /tools/riscv/buildinfo | ||
git -C $TOP/build/gcc/riscv-gnu-toolchain describe --always >> /tools/riscv/buildinfo | ||
echo >> /tools/riscv/buildinfo | ||
|
||
echo 'GCC version:' >> /tools/riscv/buildinfo | ||
/tools/riscv/bin/riscv32-unknown-elf-gcc --version | head -n1 >> /tools/riscv/buildinfo | ||
echo >> /tools/riscv/buildinfo | ||
|
||
echo "Built at $(date -u) on $(hostname)" >> /tools/riscv/buildinfo | ||
echo >> /tools/riscv/buildinfo | ||
|
||
tar -cJ \ | ||
--directory=/tools \ | ||
-f $ARTIFACT_STAGING_DIR/$TOOLCHAIN_NAME.tar.xz \ | ||
--transform="s@riscv@$TOOLCHAIN_NAME@" \ | ||
--owner=0 --group=0 \ | ||
riscv |