This repository has been archived by the owner on Oct 30, 2023. It is now read-only.
forked from electron/electron
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: bake appveyor images automatically, run sync on depshash change (e…
…lectron#35396) * chore: update yml formatting for parser * ci: bake appveyor images automatically, run sync on depshash change * chore: clean up .yml files * chore: bump to e-110.0.5415.0
- Loading branch information
1 parent
054c0db
commit 553543a
Showing
10 changed files
with
529 additions
and
288 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,62 @@ | ||
name: Update AppVeyor Image | ||
|
||
# Run chron daily Mon-Fri | ||
on: | ||
schedule: | ||
- cron: '0 8 * * 1-5' # runs 8:00 every business day (see https://crontab.guru) | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
jobs: | ||
bake-appveyor-image: | ||
name: Bake AppVeyor Image | ||
permissions: | ||
contents: write | ||
pull-requests: write # to create a new PR with updated Appveyor images | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Yarn install | ||
run: | | ||
node script/yarn.js install --frozen-lockfile | ||
- name: Set Repo for Commit | ||
run: git config --global --add safe.directory $GITHUB_WORKSPACE | ||
- name: Check AppVeyor Image | ||
env: | ||
APPVEYOR_TOKEN: ${{ secrets.APPVEYOR_TOKEN }} | ||
run: | | ||
node ./script/prepare-appveyor | ||
if [ -f ./image_version.txt ]; then | ||
echo "APPVEYOR_IMAGE_VERSION="$(cat image_version.txt)"" >> $GITHUB_ENV | ||
rm image_version.txt | ||
fi | ||
- name: (Optionally) Update Appveyor Image | ||
if: ${{ env.APPVEYOR_IMAGE_VERSION }} | ||
uses: mikefarah/yq@v4.27.2 | ||
with: | ||
cmd: yq '.image = "${{ env.APPVEYOR_IMAGE_VERSION }}"' "appveyor.yml" > "appveyor2.yml" | ||
- name: (Optionally) Generate Commit Diff | ||
if: ${{ env.APPVEYOR_IMAGE_VERSION }} | ||
run: | | ||
diff -w -B appveyor.yml appveyor2.yml > appveyor.diff || true | ||
patch -f appveyor.yml < appveyor.diff | ||
rm appveyor2.yml appveyor.diff | ||
- name: (Optionally) Commit and Pull Request | ||
if: ${{ env.APPVEYOR_IMAGE_VERSION }} | ||
uses: peter-evans/create-pull-request@v4 | ||
with: | ||
token: ${{ secrets.ACTIONS_GITHUB_TOKEN }} | ||
commit-message: 'build: update appveyor image to latest version' | ||
committer: GitHub <noreply@github.com> | ||
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> | ||
signoff: false | ||
branch: bump-appveyor-image | ||
delete-branch: true | ||
title: 'build: update appveyor image to latest version' | ||
body: | | ||
This PR updates appveyor.yml to the latest baked image, ${{ env.APPVEYOR_IMAGE_VERSION }}. |
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,52 @@ | ||
# The config is used to bake appveyor images, not for running CI jobs. | ||
# The config expects the following environment variables to be set: | ||
# - "APPVEYOR_BAKE_IMAGE" e.g. 'electron-99.0.4767.0'. Name of the image to be baked. | ||
# Typically named after the Chromium version on which the image is built. | ||
# This can be set dynamically in the prepare-appveyor script. | ||
|
||
version: 1.0.{build} | ||
build_cloud: electronhq-16-core | ||
image: Windows_Default_Appveyor | ||
environment: | ||
GIT_CACHE_PATH: C:\Users\appveyor\libcc_cache | ||
ELECTRON_OUT_DIR: Default | ||
ELECTRON_ENABLE_STACK_DUMPING: 1 | ||
MOCHA_REPORTER: mocha-multi-reporters | ||
MOCHA_MULTI_REPORTERS: mocha-appveyor-reporter, tap | ||
GOMA_FALLBACK_ON_AUTH_FAILURE: true | ||
DEPOT_TOOLS_WIN_TOOLCHAIN: 0 | ||
PYTHONIOENCODING: UTF-8 | ||
build_script: | ||
- ps: Resize-Partition -DriveLetter C -Size (256GB) # ensure initial partition size | ||
- ps: Get-Partition -DriveLetter C | ||
- git config --global core.longpaths true | ||
- cd .. | ||
- mkdir src | ||
- ps: git clone --depth=1 https://chromium.googlesource.com/chromium/tools/depot_tools.git | ||
- ps: $env:PATH="$pwd\depot_tools;$env:PATH" | ||
- update_depot_tools.bat | ||
- ps: Move-Item $env:APPVEYOR_BUILD_FOLDER -Destination src\electron | ||
- src\electron\script\setup-win-for-dev.bat | ||
- >- | ||
gclient config | ||
--name "src\electron" | ||
--unmanaged | ||
%GCLIENT_EXTRA_ARGS% | ||
"https://github.com/electron/electron" | ||
- ps: cd src\electron | ||
- ps: node script\generate-deps-hash.js | ||
- ps: $depshash = Get-Content .\.depshash -Raw | ||
- ps: Copy-Item -path .\.depshash -destination ..\.depshash | ||
- ps: cd ..\.. | ||
- gclient sync --with_branch_heads --with_tags --nohooks | ||
- ps: regsvr32 /s "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\DIA SDK\bin\amd64\msdia140.dll" | ||
on_image_bake: | ||
- ps: >- | ||
echo "Baking image: $env:APPVEYOR_BAKE_IMAGE at dir $PWD" | ||
- ps: Remove-Item -Recurse -Force $pwd\depot_tools | ||
- ps: Remove-Item -Recurse -Force $pwd\src\electron | ||
# Uncomment these lines to enable RDP | ||
#on_finish: | ||
# - ps: >- | ||
# $env:APPVEYOR_RDP_PASSWORD = "electron" | ||
# $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) |
Oops, something went wrong.