|
1 | 1 | # Azure Pipelines CI build configuration |
2 | 2 | # Documentation at https://aka.ms/yaml |
3 | 3 |
|
4 | | -variables: |
5 | | - # commit reference in https://github.com/riscv/riscv-gnu-toolchain |
6 | | - RISCV_GNU_TOOLCHAIN_COMMIT_ID: 2e334e222d43bcde237c289385c977dcab81eda9 |
7 | | - |
8 | 4 | trigger: |
9 | 5 | batch: true |
10 | 6 | branches: |
|
19 | 15 | - '*' |
20 | 16 |
|
21 | 17 | jobs: |
22 | | -- job: "GCC_Ibex" |
23 | | - displayName: "RV32IMC GCC (Ibex)" |
| 18 | +- job: "Toolchains_RV32IMC" |
| 19 | + displayName: "GCC and Clang/LLVM toolchains targeting RV32IMC (Ibex)" |
24 | 20 | pool: |
25 | 21 | vmImage: "ubuntu-16.04" |
26 | 22 | timeoutInMinutes: 360 |
27 | 23 | steps: |
| 24 | + - template: "_build-deps.yml" |
| 25 | + |
28 | 26 | - bash: | |
29 | | - sudo apt-get install -y build-essential autoconf bison flex \ |
30 | | - texinfo help2man gawk libtool-bin libncurses5-dev git libtool \ |
31 | | - gettext wget curl |
32 | | - displayName: 'Install build dependencies' |
| 27 | + ./build-gcc-with-args.sh \ |
| 28 | + "lowrisc-toolchain-gcc-rv32imc" \ |
| 29 | + "riscv32-unknown-elf" \ |
| 30 | + "/tools/riscv" \ |
| 31 | + "-march=rv32imc" "-mabi=ilp32" "-mcmodel=medany" |
| 32 | + displayName: 'Build GCC toolchain' |
| 33 | + env: |
| 34 | + ARTIFACT_STAGING_DIR: $(Build.ArtifactStagingDirectory) |
33 | 35 |
|
34 | 36 | - bash: | |
35 | | - ./install-crosstool-ng.sh |
36 | | - displayName: 'Build and install crosstool-ng' |
| 37 | + ./build-clang-with-args.sh \ |
| 38 | + "lowrisc-toolchain-rv32imc" \ |
| 39 | + "riscv32-unknown-elf" \ |
| 40 | + "/tools/riscv" \ |
| 41 | + "-march=rv32imc" "-mabi=ilp32" "-mcmodel=medany" |
| 42 | + displayName: "Build Clang toolchain" |
| 43 | + env: |
| 44 | + ARTIFACT_STAGING_DIR: $(Build.ArtifactStagingDirectory) |
| 45 | +
|
| 46 | + - template: "_upload-artifacts.yml" |
| 47 | + parameters: |
| 48 | + azure_name: rv32imc-toolchains |
| 49 | + |
| 50 | +- job: "GCC_Multilib_Baremetal" |
| 51 | + displayName: "RV64 GCC (Multilib Baremetal)" |
| 52 | + condition: false |
| 53 | + pool: |
| 54 | + vmImage: "ubuntu-16.04" |
| 55 | + timeoutInMinutes: 360 |
| 56 | + steps: |
| 57 | + - template: "_build-deps.yml" |
37 | 58 |
|
38 | 59 | - bash: | |
39 | | - # crosstools-NG needs the ability to create and chmod the |
40 | | - # /tools/riscv directory. |
41 | | - sudo mkdir -p /tools \ |
42 | | - && sudo chmod 777 /tools \ |
43 | | - && mkdir -p /tools/riscv \ |
44 | | - && ./build-gcc-ibex.sh |
| 60 | + ./build-gcc-with-args.sh \ |
| 61 | + "lowrisc-toolchain-gcc-multilib-baremetal" \ |
| 62 | + "riscv64-unknown-elf" \ |
| 63 | + "/opt/riscv-baremetal-toolchain" |
45 | 64 | displayName: 'Build GCC toolchain' |
46 | 65 | env: |
47 | 66 | ARTIFACT_STAGING_DIR: $(Build.ArtifactStagingDirectory) |
48 | 67 |
|
49 | | - - publish: $(Build.ArtifactStagingDirectory) |
50 | | - artifact: gcc-ibex |
51 | | - displayName: "Upload GCC for Ibex as Azure artifact" |
| 68 | + - bash: | |
| 69 | + ./build-clang-with-args.sh \ |
| 70 | + "lowrisc-toolchain-gcc-multilib-baremetal" \ |
| 71 | + "riscv64-unknown-elf" \ |
| 72 | + "/opt/riscv-baremetal-toolchain" |
| 73 | + displayName: "Build Clang toolchain" |
| 74 | + env: |
| 75 | + ARTIFACT_STAGING_DIR: $(Build.ArtifactStagingDirectory) |
52 | 76 |
|
53 | | - - task: GithubRelease@0 |
54 | | - displayName: 'Upload to GitHub releases' |
55 | | - condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/')) |
56 | | - inputs: |
57 | | - gitHubConnection: lowrisc-artifact-upload |
58 | | - repositoryName: lowrisc/lowrisc-toolchains |
59 | | - tagSource: manual |
60 | | - tag: "$(ReleaseTag)" |
61 | | - action: edit |
62 | | - addChangeLog: false |
63 | | - assetUploadMode: replace |
64 | | - assets: | |
65 | | - $(Build.ArtifactStagingDirectory)/*.tar.xz |
| 77 | + - template: "_upload-artifacts.yml" |
| 78 | + parameters: |
| 79 | + azure_name: gcc-multilib-baremetal |
66 | 80 |
|
67 | | -- job: "GCC_Multilib" |
68 | | - displayName: "RV64 GCC (Multilib)" |
| 81 | +- job: "GCC_Multilib_Linux" |
| 82 | + displayName: "RV64 GCC (Multilib Linux)" |
69 | 83 | condition: false |
70 | 84 | pool: |
71 | 85 | vmImage: "ubuntu-16.04" |
72 | 86 | timeoutInMinutes: 360 |
73 | 87 | steps: |
74 | | - - bash: | |
75 | | - # Dependencies as listed at |
76 | | - # https://github.com/riscv/riscv-gnu-toolchain |
77 | | - sudo apt-get install -y autoconf automake autotools-dev curl \ |
78 | | - libmpc-dev libmpfr-dev libgmp-dev gawk build-essential bison \ |
79 | | - flex texinfo gperf libtool patchutils bc zlib1g-dev libexpat-dev |
80 | | - displayName: 'Install build dependencies' |
| 88 | + - template: "_build-deps.yml" |
81 | 89 |
|
82 | 90 | - bash: | |
83 | | - sudo mkdir -p /tools/riscv \ |
84 | | - && sudo chmod 777 /tools/riscv \ |
85 | | - && ./build-gcc-multilib.sh |
| 91 | + ./build-gcc-with-args.sh \ |
| 92 | + "lowrisc-toolchain-gcc-multilib-linux" \ |
| 93 | + "riscv64-unknown-linux-gnu" \ |
| 94 | + "/opt/riscv-linux-toolchain" |
86 | 95 | displayName: 'Build GCC toolchain' |
87 | 96 | env: |
88 | 97 | ARTIFACT_STAGING_DIR: $(Build.ArtifactStagingDirectory) |
89 | 98 |
|
90 | | - - publish: $(Build.ArtifactStagingDirectory) |
91 | | - artifact: gcc-multilib |
92 | | - displayName: "Upload multilib GCC builds as Azure artifact" |
| 99 | + - bash: | |
| 100 | + ./build-clang-with-args.sh \ |
| 101 | + "lowrisc-toolchain-gcc-multilib-linux" \ |
| 102 | + "riscv64-unknown-linux-gnu" \ |
| 103 | + "/opt/riscv-linux-toolchain" |
| 104 | + displayName: "Build Clang toolchain" |
| 105 | + env: |
| 106 | + ARTIFACT_STAGING_DIR: $(Build.ArtifactStagingDirectory) |
93 | 107 |
|
94 | | - - task: GithubRelease@0 |
95 | | - displayName: 'Upload to GitHub releases' |
96 | | - condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/')) |
97 | | - inputs: |
98 | | - gitHubConnection: lowrisc-artifact-upload |
99 | | - repositoryName: lowrisc/lowrisc-toolchains |
100 | | - tagSource: manual |
101 | | - tag: "$(ReleaseTag)" |
102 | | - action: edit |
103 | | - addChangeLog: false |
104 | | - assetUploadMode: replace |
105 | | - assets: | |
106 | | - $(Build.ArtifactStagingDirectory)/*.tar.xz |
| 108 | + - template: "_upload-artifacts.yml" |
| 109 | + parameters: |
| 110 | + azure_name: gcc-multilib-linux |
0 commit comments