Libcc sources are now used to build Electron
in the `electron/electron` repo.
This commit is contained in:
Aleksei Kuzmin 2018-09-08 23:52:01 +02:00
Родитель f3a3f58828
Коммит 7cfa31a13c
4 изменённых файлов: 0 добавлений и 699 удалений

Просмотреть файл

@ -1,519 +0,0 @@
version: 2.0
jobs:
libchromiumcontent-linux-x64-shared:
docker:
- image: electronbuilds/libchromiumcontent:0.0.4
environment:
TARGET_ARCH: x64
COMPONENT: shared_library
resource_class: 2xlarge
steps:
- checkout
- run:
name: Bootstrap
command: script/bootstrap
- run:
name: Update
command: script/update --clean -t $TARGET_ARCH --use-bundled-sccache --use_packaged_src --upload_packaged_src
no_output_timeout: 60m
- run:
name: Build shared library
command: script/build -t $TARGET_ARCH -c $COMPONENT
- run:
name: Build FFmpeg
command: script/build -t $TARGET_ARCH -c ffmpeg
- run:
name: Check sccache stats after build
command: script/sccache -s
- run:
name: Create distribution
command: script/create-dist -t $TARGET_ARCH -c $COMPONENT
no_output_timeout: 20m
- run:
name: Upload to S3
command: |
if [[ -z "${LIBCHROMIUMCONTENT_S3_ACCESS_KEY}" ]]; then
echo "Skipping upload to S3"
else
script/upload -t $TARGET_ARCH
fi
- store_artifacts:
path: libchromiumcontent.tar.bz2
libchromiumcontent-linux-x64-static:
docker:
- image: electronbuilds/libchromiumcontent:0.0.4
environment:
TARGET_ARCH: x64
COMPONENT: static_library
resource_class: 2xlarge
steps:
- checkout
- run:
name: Bootstrap
command: script/bootstrap
- run:
name: Update
command: script/update --clean -t $TARGET_ARCH --use_packaged_src
no_output_timeout: 20m
- run:
name: Build static library
command: script/build -t $TARGET_ARCH -c $COMPONENT
- run:
name: Build FFmpeg
command: script/build -t $TARGET_ARCH -c ffmpeg
- run:
name: Create distribution
command: script/create-dist -t $TARGET_ARCH -c $COMPONENT
no_output_timeout: 20m
- run:
name: Upload to S3
command: |
if [[ -z "${LIBCHROMIUMCONTENT_S3_ACCESS_KEY}" ]]; then
echo "Skipping upload to S3"
else
script/upload -t $TARGET_ARCH
fi
- store_artifacts:
path: libchromiumcontent-static.tar.bz2
libchromiumcontent-linux-x64-test:
docker:
- image: electronbuilds/libchromiumcontent:0.0.4
environment:
TARGET_ARCH: x64
COMPONENT: static_library
DISPLAY: ':99.0'
resource_class: 2xlarge
steps:
- checkout
- run:
name: Bootstrap
command: script/bootstrap
- run:
name: Update
command: script/update --clean -t $TARGET_ARCH --use-bundled-sccache --use_packaged_src
- run:
name: Build static library
command: script/build -t $TARGET_ARCH -c $COMPONENT
- run:
name: Build FFmpeg
command: script/build -t $TARGET_ARCH -c ffmpeg
- run:
name: Build Tests
command: script/build -t $TARGET_ARCH -c tests
- run:
name: Create distribution
command: script/create-dist -t $TARGET_ARCH -c $COMPONENT
no_output_timeout: 20m
- run:
name: Setup for headless testing
command: |
XVFB=/usr/bin/Xvfb
XVFBARGS="$DISPLAY -ac -screen 0 1024x768x16 +extension RANDR"
/sbin/start-stop-daemon --start --quiet --background --exec $XVFB -- $XVFBARGS
- run:
name: Run Tests
command: |
set +e
script/run_tests --generate_report -t $TARGET_ARCH
- store_test_results:
path: test_reports
- store_artifacts:
path: test_reports
libchromiumcontent-linux-ia32-shared:
docker:
- image: electronbuilds/libchromiumcontent:0.0.4
environment:
TARGET_ARCH: ia32
COMPONENT: shared_library
resource_class: 2xlarge
steps:
- checkout
- run:
name: Bootstrap
command: script/bootstrap
- run:
name: Update
command: script/update --clean -t $TARGET_ARCH --use-bundled-sccache --use_packaged_src
no_output_timeout: 20m
- run:
name: Build shared library
command: script/build -t $TARGET_ARCH -c $COMPONENT
- run:
name: Build FFmpeg
command: script/build -t $TARGET_ARCH -c ffmpeg
- run:
name: Check sccache stats after build
command: script/sccache -s
- run:
name: Create distribution
command: script/create-dist -t $TARGET_ARCH -c $COMPONENT
no_output_timeout: 20m
- run:
name: Upload to S3
command: |
if [[ -z "${LIBCHROMIUMCONTENT_S3_ACCESS_KEY}" ]]; then
echo "Skipping upload to S3"
else
script/upload -t $TARGET_ARCH
fi
- store_artifacts:
path: libchromiumcontent.tar.bz2
libchromiumcontent-linux-ia32-static:
docker:
- image: electronbuilds/libchromiumcontent:0.0.4
environment:
TARGET_ARCH: ia32
COMPONENT: static_library
resource_class: 2xlarge
steps:
- checkout
- run:
name: Bootstrap
command: script/bootstrap
- run:
name: Update
command: script/update --clean -t $TARGET_ARCH --use_packaged_src
no_output_timeout: 20m
- run:
name: Build static library
command: script/build -t $TARGET_ARCH -c $COMPONENT
- run:
name: Build FFmpeg
command: script/build -t $TARGET_ARCH -c ffmpeg
- run:
name: Create distribution
command: script/create-dist -t $TARGET_ARCH -c $COMPONENT
no_output_timeout: 20m
- run:
name: Upload to S3
command: |
if [[ -z "${LIBCHROMIUMCONTENT_S3_ACCESS_KEY}" ]]; then
echo "Skipping upload to S3"
else
script/upload -t $TARGET_ARCH
fi
- store_artifacts:
path: libchromiumcontent-static.tar.bz2
libchromiumcontent-linux-ia32-test:
docker:
- image: electronbuilds/libchromiumcontent:0.0.4
environment:
TARGET_ARCH: ia32
COMPONENT: static_library
DISPLAY: ':99.0'
resource_class: 2xlarge
steps:
- checkout
- run:
name: Bootstrap
command: script/bootstrap
- run:
name: Update
command: script/update --clean -t $TARGET_ARCH --use-bundled-sccache --use_packaged_src
- run:
name: Build static library
command: script/build -t $TARGET_ARCH -c $COMPONENT
- run:
name: Build FFmpeg
command: script/build -t $TARGET_ARCH -c ffmpeg
- run:
name: Create distribution
command: script/create-dist -t $TARGET_ARCH -c $COMPONENT
no_output_timeout: 20m
- run:
name: Setup for headless testing
command: |
XVFB=/usr/bin/Xvfb
XVFBARGS="$DISPLAY -ac -screen 0 1024x768x16 +extension RANDR"
/sbin/start-stop-daemon --start --quiet --background --exec $XVFB -- $XVFBARGS
- run:
name: Run Tests
command: |
set +e
script/run_tests --generate_report -t $TARGET_ARCH
- store_test_results:
path: test_reports
- store_artifacts:
path: test_reports
libchromiumcontent-linux-arm-shared:
docker:
- image: electronbuilds/libchromiumcontent:0.0.4
environment:
TARGET_ARCH: arm
COMPONENT: shared_library
resource_class: 2xlarge
steps:
- checkout
- run:
name: Bootstrap
command: script/bootstrap
- run:
name: Update
command: script/update --clean -t $TARGET_ARCH --use-bundled-sccache --use_packaged_src
no_output_timeout: 20m
- run:
name: Build mksnapshot
command: script/build -t $TARGET_ARCH -c native_mksnapshot
- run:
name: Build shared library
command: script/build -t $TARGET_ARCH -c $COMPONENT
- run:
name: Build FFmpeg
command: script/build -t $TARGET_ARCH -c ffmpeg
- run:
name: Check sccache stats after build
command: script/sccache -s
- run:
name: Create shared distribution
command: script/create-dist -t $TARGET_ARCH -c $COMPONENT
no_output_timeout: 20m
- run:
name: Create mksnapshot distribution
command: script/create-dist -t $TARGET_ARCH -c native_mksnapshot
- run:
name: Upload to S3
command: |
if [[ -z "${LIBCHROMIUMCONTENT_S3_ACCESS_KEY}" ]]; then
echo "Skipping upload to S3"
else
script/upload -t $TARGET_ARCH
fi
- store_artifacts:
path: libchromiumcontent.tar.bz2
- store_artifacts:
path: native-mksnapshot.tar.bz2
libchromiumcontent-linux-arm-static:
docker:
- image: electronbuilds/libchromiumcontent:0.0.4
environment:
TARGET_ARCH: arm
COMPONENT: static_library
resource_class: 2xlarge
steps:
- checkout
- run:
name: Bootstrap
command: script/bootstrap
- run:
name: Update
command: script/update --clean -t $TARGET_ARCH --use_packaged_src
no_output_timeout: 20m
- run:
name: Build static library
command: script/build -t $TARGET_ARCH -c $COMPONENT
- run:
name: Build FFmpeg
command: script/build -t $TARGET_ARCH -c ffmpeg
- run:
name: Create distribution
command: script/create-dist -t $TARGET_ARCH -c $COMPONENT
no_output_timeout: 20m
- run:
name: Upload to S3
command: |
if [[ -z "${LIBCHROMIUMCONTENT_S3_ACCESS_KEY}" ]]; then
echo "Skipping upload to S3"
else
script/upload -t $TARGET_ARCH
fi
- store_artifacts:
path: libchromiumcontent-static.tar.bz2
libchromiumcontent-linux-arm64-shared:
docker:
- image: electronbuilds/libchromiumcontent:0.0.4
environment:
TARGET_ARCH: arm64
COMPONENT: shared_library
resource_class: 2xlarge
steps:
- checkout
- run:
name: Bootstrap
command: script/bootstrap
- run:
name: Update
command: script/update --clean -t $TARGET_ARCH --use-bundled-sccache --use_packaged_src
no_output_timeout: 20m
- run:
name: Build mksnapshot
command: script/build -t $TARGET_ARCH -c native_mksnapshot
- run:
name: Build shared library
command: script/build -t $TARGET_ARCH -c $COMPONENT
- run:
name: Build FFmpeg
command: script/build -t $TARGET_ARCH -c ffmpeg
- run:
name: Check sccache stats after build
command: script/sccache -s
- run:
name: Create shared distribution
command: script/create-dist -t $TARGET_ARCH -c $COMPONENT
no_output_timeout: 20m
- run:
name: Create mksnapshot distribution
command: script/create-dist -t $TARGET_ARCH -c native_mksnapshot
- run:
name: Upload to S3
command: |
if [[ -z "${LIBCHROMIUMCONTENT_S3_ACCESS_KEY}" ]]; then
echo "Skipping upload to S3"
else
script/upload -t $TARGET_ARCH
fi
- store_artifacts:
path: libchromiumcontent.tar.bz2
- store_artifacts:
path: native-mksnapshot.tar.bz2
libchromiumcontent-linux-arm64-static:
docker:
- image: electronbuilds/libchromiumcontent:0.0.4
environment:
TARGET_ARCH: arm64
COMPONENT: static_library
resource_class: 2xlarge
steps:
- checkout
- run:
name: Bootstrap
command: script/bootstrap
- run:
name: Update
command: script/update --clean -t $TARGET_ARCH --use_packaged_src
no_output_timeout: 20m
- run:
name: Build static library
command: script/build -t $TARGET_ARCH -c $COMPONENT
- run:
name: Build FFmpeg
command: script/build -t $TARGET_ARCH -c ffmpeg
- run:
name: Create distribution
command: script/create-dist -t $TARGET_ARCH -c $COMPONENT
no_output_timeout: 20m
- run:
name: Upload to S3
command: |
if [[ -z "${LIBCHROMIUMCONTENT_S3_ACCESS_KEY}" ]]; then
echo "Skipping upload to S3"
else
script/upload -t $TARGET_ARCH
fi
- store_artifacts:
path: libchromiumcontent-static.tar.bz2
libchromiumcontent-linux-mips64el-shared:
docker:
- image: electronbuilds/libchromiumcontent:0.0.4
environment:
TARGET_ARCH: mips64el
COMPONENT: shared_library
resource_class: 2xlarge
steps:
- checkout
- run:
name: Bootstrap
command: script/bootstrap
- run:
name: Update
command: script/update --clean -t $TARGET_ARCH --use-bundled-sccache --use_packaged_src
no_output_timeout: 20m
- run:
name: Build shared library
command: script/build -t $TARGET_ARCH -c $COMPONENT
- run:
name: Build FFmpeg
command: script/build -t $TARGET_ARCH -c ffmpeg
- run:
name: Check sccache stats after build
command: script/sccache -s
- run:
name: Create distribution
command: script/create-dist -t $TARGET_ARCH -c $COMPONENT
no_output_timeout: 20m
- run:
name: Upload to S3
command: |
if [[ -z "${LIBCHROMIUMCONTENT_S3_ACCESS_KEY}" ]]; then
echo "Skipping upload to S3"
else
script/upload -t $TARGET_ARCH
fi
- store_artifacts:
path: libchromiumcontent.tar.bz2
libchromiumcontent-linux-mips64el-static:
docker:
- image: electronbuilds/libchromiumcontent:0.0.4
environment:
TARGET_ARCH: mips64el
COMPONENT: static_library
resource_class: 2xlarge
steps:
- checkout
- run:
name: Bootstrap
command: script/bootstrap
- run:
name: Update
command: script/update --clean -t $TARGET_ARCH --use_packaged_src
no_output_timeout: 20m
- run:
name: Build static library
command: script/build -t $TARGET_ARCH -c $COMPONENT
- run:
name: Build FFmpeg
command: script/build -t $TARGET_ARCH -c ffmpeg
- run:
name: Create distribution
command: script/create-dist -t $TARGET_ARCH -c $COMPONENT
no_output_timeout: 20m
- run:
name: Upload to S3
command: |
if [[ -z "${LIBCHROMIUMCONTENT_S3_ACCESS_KEY}" ]]; then
echo "Skipping upload to S3"
else
script/upload -t $TARGET_ARCH
fi
- store_artifacts:
path: libchromiumcontent-static.tar.bz2
workflows:
version: 2
build-x64:
jobs:
- libchromiumcontent-linux-x64-shared
- libchromiumcontent-linux-x64-static
build-ia32:
jobs:
- libchromiumcontent-linux-ia32-shared
- libchromiumcontent-linux-ia32-static
build-arm:
jobs:
- libchromiumcontent-linux-arm-shared
- libchromiumcontent-linux-arm-static
build-arm64:
jobs:
- libchromiumcontent-linux-arm64-shared
- libchromiumcontent-linux-arm64-static
nightly-test:
triggers:
- schedule:
cron: "0 0 * * *"
filters:
branches:
only:
- master
jobs:
- libchromiumcontent-linux-x64-test
- libchromiumcontent-linux-ia32-test

Просмотреть файл

@ -1,23 +0,0 @@
FROM ubuntu:16.04
RUN groupadd --gid 1000 builduser \
&& useradd --uid 1000 --gid builduser --shell /bin/bash --create-home builduser
# Set up TEMP directory
ENV TEMP=/tmp
RUN chmod a+rwx /tmp
# Install Linux packages
ADD script/docker-install-build-deps.sh /setup/install-build-deps.sh
RUN apt-get update && apt-get -y --force-yes install lsb-release locales
RUN /setup/install-build-deps.sh --syms --no-prompt --no-chromeos-fonts
RUN apt-get install -y python-setuptools
RUN easy_install -U pip
RUN pip install -U crcmod
RUN mkdir /tmp/workspace
RUN chown builduser:builduser /tmp/workspace
USER builduser
WORKDIR /home/builduser

Просмотреть файл

@ -1,23 +0,0 @@
version: 1.0.{build}
build_cloud: libcc-20
image: libcc-20-vs2017-15.4.5
build_script:
- ps: >-
if(($env:APPVEYOR_PULL_REQUEST_HEAD_REPO_NAME -split "/")[0] -eq ($env:APPVEYOR_REPO_NAME -split "/")[0]) {
Write-warning "Skipping PR build for branch"; Exit-AppveyorBuild
} else {
if($env:APPVEYOR_SCHEDULED_BUILD -eq 'True') {
script\cibuild.ps1 -buildTests
} else {
script\cibuild.ps1
}
if ($? -ne 'True') {
throw "Build failed with exit code $?"
} else {
"Build succeeded."
}
}
test: off
artifacts:
- path: libchromiumcontent*
name: libchromiumcontent

134
vsts.yml
Просмотреть файл

@ -1,134 +0,0 @@
resources:
- repo: self
phases:
- phase: Build_libchromiumcontent
condition: or(eq(variables['System.PullRequest.IsFork'], 'True'), ne(variables['Build.Reason'], 'PullRequest'))
queue:
timeoutInMinutes: 180
steps:
- bash: |
set -e
if [[ -z "${SYSTEM_PULLREQUEST_PULLREQUESTNUMBER}" ]] || "${SYSTEM_PULLREQUEST_ISFORK}" == "True"; then
echo "##vso[task.setvariable variable=gitcommit]$BUILD_SOURCEVERSION"
else
tmp="${BUILD_SOURCEVERSIONMESSAGE/#Merge /}"
PR_COMMIT_ID="${tmp%% into*}"
echo "PR is for repo branch, using original commit $PR_COMMIT_ID"
echo "##vso[task.setvariable variable=gitcommit]$PR_COMMIT_ID"
echo "Checking out $PR_COMMIT_ID"
git checkout $PR_COMMIT_ID
echo "Now switched to `git rev-parse HEAD`"
fi
name: Get_commit
- bash: |
set -e
echo "===Bootstrapping===" > >(tee -a buildlog.txt) 2> >(tee -a buildlog.txt >&2)
script/bootstrap > >(tee -a buildlog.txt) 2> >(tee -a buildlog.txt >&2)
mkdir s3files
name: Bootstrap
- bash: |
set -e
echo "===Updating for $TARGET_ARCH===" > >(tee -a buildlog.txt) 2> >(tee -a buildlog.txt >&2)
if [ "${COMPONENT}" == "shared_library" ]; then
if [ "${TARGET_TYPE}" == "osx" ]; then
# Only upload packaged source once, so use osx shared_library build to do so
echo "===Updating for $TARGET_ARCH=== uploading packaged src" > >(tee -a buildlog.txt) 2> >(tee -a buildlog.txt >&2)
echo "##vso[task.setvariable variable=ChromiumVersion]`cat VERSION`"
script/update --clean -t $TARGET_ARCH --use-bundled-sccache --use_packaged_src --upload_packaged_src > >(tee -a buildlog.txt) 2> >(tee -a buildlog.txt >&2)
if [ -f src.tar.bz2 ]; then
echo "Packaged source exists, setting it up for upload"
mv src.tar.bz2 s3files
echo "##vso[task.setvariable variable=UploadPackagedSrc]True"
echo "UploadPackagedSrc has value: $(UploadPackagedSrc)"
else
echo "Packaged source does NOT exist, skipping upload"
ls -la *
fi
else
script/update --clean -t $TARGET_ARCH --use-bundled-sccache --use_packaged_src > >(tee -a buildlog.txt) 2> >(tee -a buildlog.txt >&2)
fi
else
script/update --clean -t $TARGET_ARCH --use_packaged_src > >(tee -a buildlog.txt) 2> >(tee -a buildlog.txt >&2)
fi
name: Update
- task: AmazonWebServices.aws-vsts-tools.S3Upload.S3Upload@1
inputs:
awsCredentials: 'Libchromium Content S3'
regionName: 'us-east-1'
bucketName: 'github-janky-artifacts'
sourceFolder: s3files
globExpressions: 'src.tar.*'
targetFolder: 'libchromiumcontent/$(TARGET_TYPE)/src/$(ChromiumVersion)'
filesAcl: 'public-read'
logRequest: true
logResponse: true
condition: and(succeeded(), eq(variables['UploadPackagedSrc'], 'True'))
- bash: |
set -e
if [ "${COMPONENT}" == "shared_library" ]; then
script/sccache --start-server --azure_container "$(SCCACHE_AZURE_BLOB_CONTAINER)" --azure_connection "$(SCCACHE_AZURE_CONNECTION_STRING)" > >(tee -a buildlog.txt) 2> >(tee -a buildlog.txt >&2)
script/sccache -s > >(tee -a buildlog.txt) 2> >(tee -a buildlog.txt >&2)
fi
echo "===Building $COMPONENT for $TARGET_ARCH===" > >(tee -a buildlog.txt) 2> >(tee -a buildlog.txt >&2)
script/build -t $TARGET_ARCH -c $COMPONENT > >(tee -a buildlog.txt) 2> >(tee -a buildlog.txt >&2)
echo "===Building ffmpeg for $TARGET_ARCH===" > >(tee -a buildlog.txt) 2> >(tee -a buildlog.txt >&2)
script/build -t $TARGET_ARCH -c ffmpeg > >(tee -a buildlog.txt) 2> >(tee -a buildlog.txt >&2)
if [ "${COMPONENT}" == "shared_library" ]; then
script/sccache --stop-server > >(tee -a buildlog.txt) 2> >(tee -a buildlog.txt >&2)
else
if [ "${BUILD_REASON}" == "Schedule" ]; then
script/build -t $TARGET_ARCH -c tests > >(tee -a buildlog.txt) 2> >(tee -a buildlog.txt >&2)
fi
fi
name: Build
- bash: |
set -e
echo "===Create $COMPONENT distribution for $TARGET_ARCH===" > >(tee -a buildlog.txt) 2> >(tee -a buildlog.txt >&2)
script/create-dist -t $TARGET_ARCH -c $COMPONENT > >(tee -a buildlog.txt) 2> >(tee -a buildlog.txt >&2)
mv libchromiumcontent* s3files
mv buildlog.txt s3files
name: Create_distribution
- bash: |
set +e
echo "===Run tests against $COMPONENT distribution for $TARGET_ARCH===" > >(tee -a buildlog.txt) 2> >(tee -a buildlog.txt >&2)
script/run_tests --generate_report > >(tee -a buildlog.txt) 2> >(tee -a buildlog.txt >&2)
cp -r test_reports s3files
name: Run_tests
condition: and(succeeded(), eq(variables['Build.Reason'], 'Schedule'), eq(variables['COMPONENT'], 'static_library'))
- task: PublishTestResults@2
inputs:
testResultsFiles: '*.xml'
searchFolder: '$(System.DefaultWorkingDirectory)/test_reports'
testRunTitle: 'Libchromiumcontent Tests'
condition: and(always(), eq(variables['Build.Reason'], 'Schedule'), eq(variables['COMPONENT'], 'static_library'))
- task: AmazonWebServices.aws-vsts-tools.S3Upload.S3Upload@1
inputs:
awsCredentials: 'Libchromium Content S3'
regionName: 'us-east-1'
bucketName: 'github-janky-artifacts'
sourceFolder: s3files
globExpressions: 'libchromiumcontent*'
targetFolder: 'libchromiumcontent/$(TARGET_TYPE)/$(TARGET_ARCH)/$(gitcommit)'
filesAcl: 'public-read'
logRequest: true
logResponse: true
- task: mspremier.PostBuildCleanup.PostBuildCleanup-task.PostBuildCleanup@3
condition: always()
- phase: Skip_libchromiumcontent_PR_build
condition: and(eq(variables['System.PullRequest.IsFork'], 'False'), eq(variables['Build.Reason'], 'PullRequest'))
steps:
- bash: |
echo "Skipping PR build for PR requested from branch."
- task: mspremier.PostBuildCleanup.PostBuildCleanup-task.PostBuildCleanup@3
condition: always()