Merge pull request #756 from electron/move-mac-to-circle-2-0-x

ci: Move MacOS builds to CircleCI (2-0-x)
This commit is contained in:
John Kleinschmidt 2019-03-13 19:32:27 -04:00 коммит произвёл GitHub
Родитель 1f6a271a1a 650da9e566
Коммит 3122dcbb78
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 99 добавлений и 80 удалений

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

@ -296,13 +296,13 @@ jobs:
- 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
libchromiumcontent-osx-shared:
macos:
xcode: "8.3.3"
resource_class: large
environment:
TARGET_ARCH: x64
COMPONENT: shared_library
steps:
- checkout
- run:
@ -311,6 +311,82 @@ jobs:
- run:
name: Update
command: script/update --clean -t $TARGET_ARCH
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: 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-osx-static:
macos:
xcode: "8.3.3"
resource_class: large
environment:
TARGET_ARCH: x64
COMPONENT: static_library
steps:
- checkout
- run:
name: Bootstrap
command: script/bootstrap
- run:
name: Update
command: script/update --clean -t $TARGET_ARCH
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-mas-shared:
macos:
xcode: "8.3.3"
resource_class: large
environment:
TARGET_ARCH: x64
COMPONENT: shared_library
MAS_BUILD: 1
steps:
- checkout
- run:
name: Bootstrap
command: script/bootstrap
- run:
name: Update
command: script/update --clean -t $TARGET_ARCH
no_output_timeout: 60m
- run:
name: Build shared library
command: script/build -t $TARGET_ARCH -c $COMPONENT
@ -331,13 +407,14 @@ jobs:
- 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
libchromiumcontent-mas-static:
macos:
xcode: "8.3.3"
resource_class: large
environment:
TARGET_ARCH: x64
COMPONENT: static_library
MAS_BUILD: 1
steps:
- checkout
- run:
@ -384,3 +461,11 @@ workflows:
jobs:
- libchromiumcontent-linux-arm64-shared
- libchromiumcontent-linux-arm64-static
build-osx:
jobs:
- libchromiumcontent-osx-shared
- libchromiumcontent-osx-static
build-mas:
jobs:
- libchromiumcontent-mas-shared
- libchromiumcontent-mas-static

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

@ -1,66 +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: |
echo "===Updating for $TARGET_ARCH===" > >(tee -a buildlog.txt) 2> >(tee -a buildlog.txt >&2)
script/update --clean -t $TARGET_ARCH > >(tee -a buildlog.txt) 2> >(tee -a buildlog.txt >&2)
name: Update
- bash: |
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)
name: Build_library
- bash: |
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)
name: Build_ffmpeg
- bash: |
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
- task: 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()