Skip to content

Commit

Permalink
ci: prepare cross toolchain
Browse files Browse the repository at this point in the history
  • Loading branch information
deepak1556 committed Nov 15, 2023
1 parent a1f9239 commit 5bcf075
Show file tree
Hide file tree
Showing 15 changed files with 2,947 additions and 71 deletions.
931 changes: 931 additions & 0 deletions aarch64-gcc-8.5.0-glibc-2.28.config

Large diffs are not rendered by default.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
946 changes: 946 additions & 0 deletions armhf-gcc-8.5.0-glibc-2.28.config

Large diffs are not rendered by default.

173 changes: 103 additions & 70 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,75 +1,108 @@
jobs:
- job: bionic_x64
pool:
vmImage: 'ubuntu-latest'
steps:
- template: build.yml
parameters:
arch: bionic-x64
parameters:
- name: github_release
displayName: Create Github Release
type: boolean
default: false
- name: dockerhub_release
displayName: Create Dockerhub Release
type: boolean
default: false

- job: centos7_devtoolset8_x64
pool:
vmImage: 'ubuntu-latest'
steps:
- template: build.yml
parameters:
arch: centos7-devtoolset8-x64
stages:
- stage: Generate_toolchain
jobs:
- job: aarch64
pool:
vmImage: 'ubuntu-latest'
timeoutInMinutes: 180
steps:
- template: build-toolchain.yml
parameters:
config: aarch64-gcc-8.5.0-glibc-2.28.config
arch: aarch64
pkg: aarch64-vscode-linux-gnu

- job: centos7_devtoolset8_arm64
pool:
vmImage: 'ubuntu-latest'
steps:
- template: build.yml
parameters:
qemu: 'true'
arch: centos7-devtoolset8-arm64
- job: x86_64
pool:
vmImage: 'ubuntu-latest'
timeoutInMinutes: 180
steps:
- template: build-toolchain.yml
parameters:
config: x86_64-gcc-8.5.0-glibc-2.28.config
arch: x86_64
pkg: x86_64-vscode-linux-gnu

- job: alpine_x64
pool:
vmImage: 'ubuntu-latest'
steps:
- template: build.yml
parameters:
arch: alpine-x64
- job: armhf
pool:
vmImage: 'ubuntu-latest'
timeoutInMinutes: 180
steps:
- template: build-toolchain.yml
parameters:
arch: armhf
config: armhf-gcc-8.5.0-glibc-2.28.config
pkg: arm-vscode-linux-gnueabihf

- job: alpine_arm64
pool:
vmImage: 'ubuntu-latest'
steps:
- template: build.yml
parameters:
qemu: 'true'
arch: alpine-arm64
- ${{ if parameters.github_release }}:
- stage: Release_toolchain
dependsOn:
- Generate_toolchain
pool:
vmImage: 'ubuntu-latest'
jobs:
- job: Publish_to_Github
variables:
currentDate: $[ format('{0:yyyy}{0:MM}{0:dd}', pipeline.startTime) ]
steps:
- download: current
patterns: |
**/*.tar.gz
- script: cp $(Pipeline.Workspace)/x86_64/x86_64-vscode-linux-gnu.tar.gz $(Build.ArtifactStagingDirectory)/x86_64-vscode-linux-gnu.tar.gz
displayName: Copy x86_64 toolchain
- script: cp $(Pipeline.Workspace)/aarch64/aarch64-vscode-linux-gnu.tar.gz $(Build.ArtifactStagingDirectory)/aarch64-vscode-linux-gnu.tar.gz
displayName: Copy aarch64 toolchain
- script: cp $(Pipeline.Workspace)/armhf/arm-vscode-linux-gnueabihf.tar.gz $(Build.ArtifactStagingDirectory)/arm-vscode-linux-gnueabihf.tar.gz
displayName: Copy armhf toolchain
- script: (cd $(Build.ArtifactStagingDirectory) ; shasum -a 256 *.tar.gz) > $(Build.ArtifactStagingDirectory)/SHASUMS256.txt
displayName: Compute checksums
- task: GithubRelease@1
displayName: Create GitHub Release
inputs:
gitHubConnection: oauth
repositoryName: microsoft/vscode-linux-build-agent
action: create
addChangeLog: false
tagSource: userSpecifiedTag
tag: v$(currentDate)-$(Build.BuildId)

- job: bionic_arm64
pool:
vmImage: 'ubuntu-latest'
steps:
- template: build.yml
parameters:
arch: bionic-arm64

- job: bionic_armhf
pool:
vmImage: 'ubuntu-latest'
steps:
- template: build.yml
parameters:
arch: bionic-armhf

- job: bionic_arm32v7
pool:
vmImage: 'ubuntu-latest'
steps:
- template: build.yml
parameters:
qemu: 'true'
arch: bionic-arm32v7

- job: snapcraft_x64
pool:
vmImage: 'ubuntu-latest'
steps:
- template: build.yml
parameters:
arch: snapcraft-x64
#- stage: Containers
# dependsOn: []
# jobs:
#- job: alpine_x64
# pool:
# vmImage: 'ubuntu-latest'
# steps:
# - template: build-containers.yml
# parameters:
# arch: alpine-x64
# release: ${{ parameters.dockerhub_release }}
#
#- job: alpine_arm64
# pool:
# vmImage: 'ubuntu-latest'
# steps:
# - template: build-containers.yml
# parameters:
# qemu: 'true'
# arch: alpine-arm64
# release: ${{ parameters.dockerhub_release }}
#
#- job: snapcraft_x64
# pool:
# vmImage: 'ubuntu-latest'
# steps:
# - template: build-containers.yml
# parameters:
# arch: snapcraft-x64
# release: ${{ parameters.dockerhub_release }}
2 changes: 1 addition & 1 deletion build.yml → build-containers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ steps:
repository: 'vscode-linux-build-agent'
tags: ${{ parameters.arch }}
command: push
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main'))
condition: and(succeeded(), eq(${{ parameters.release }}, true))
41 changes: 41 additions & 0 deletions build-toolchain.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
parameters:
- name: config
type: string
- name: arch
type: string
- name: pkg
type: string

steps:
- script: |
set -e
sudo apt-get update
sudo apt-get install -y gcc g++ gperf bison flex texinfo help2man make libncurses5-dev \
python3-dev autoconf automake libtool libtool-bin gawk wget bzip2 xz-utils unzip \
patch rsync meson ninja-build
displayName: 'Prepare dependencies'
- script: |
set -e
wget http://crosstool-ng.org/download/crosstool-ng/crosstool-ng-1.26.0.tar.bz2
tar -xjf crosstool-ng-1.26.0.tar.bz2
cd crosstool-ng-1.26.0
./configure --prefix=`pwd`/out
make
make install
displayName: 'Setup crosstool-ng'
- script: |
set -e
export PATH=$PATH:`pwd`/crosstool-ng-1.26.0/out/bin
mkdir toolchain-dir
cd toolchain-dir
cat ../${{ parameters.config }} > .config
ct-ng build
displayName: 'Build toolchain'
- script: |
set -e
cd toolchain-dir
tar -czf ${{ parameters.pkg }}.tar.gz ${{ parameters.pkg }}
displayName: 'Create pipeline asset'
- publish: toolchain-dir/${{ parameters.pkg }}.tar.gz
artifact: ${{ parameters.arch }}
displayName: 'Publish artifact'
Loading

0 comments on commit 5bcf075

Please sign in to comment.