Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
8284389: Improve stability of GHA Pre-submit testing by caching cygwi…
…n installer

Reviewed-by: mdoerr
Backport-of: 61fcf2f67ff16bee92a5279e7bcacc79fc8f37ad
  • Loading branch information
RealCLanger committed Apr 11, 2022
1 parent b930441 commit 869b259
Showing 1 changed file with 26 additions and 4 deletions.
30 changes: 26 additions & 4 deletions .github/workflows/submit.yml
Expand Up @@ -884,6 +884,19 @@ jobs:
BOOT_JDK_SHA256: "${{ fromJson(needs.prerequisites.outputs.dependencies).WINDOWS_X64_BOOT_JDK_SHA256 }}"

steps:
- name: Restore cygwin installer from cache
id: cygwin-installer
uses: actions/cache@v2
with:
path: ~/cygwin/setup-x86_64.exe
key: cygwin-installer

- name: Download cygwin installer
run: |
New-Item -Force -ItemType directory -Path "$HOME\cygwin"
& curl -L "https://www.cygwin.com/setup-x86_64.exe" -o "$HOME/cygwin/setup-x86_64.exe"
if: steps.cygwin-installer.outputs.cache-hit != 'true'

- name: Restore cygwin packages from cache
id: cygwin
uses: actions/cache@v2
Expand All @@ -893,8 +906,6 @@ jobs:

- name: Install cygwin
run: |
New-Item -Force -ItemType directory -Path "$HOME\cygwin"
& curl -L "https://www.cygwin.com/setup-x86_64.exe" -o "$HOME/cygwin/setup-x86_64.exe"
Start-Process -FilePath "$HOME\cygwin\setup-x86_64.exe" -ArgumentList "--quiet-mode --packages cygwin=3.2.0-1,autoconf,make,zip,unzip --root $HOME\cygwin\cygwin64 --local-package-dir $HOME\cygwin\packages --site http://mirrors.kernel.org/sourceware/cygwin --no-desktop --no-shortcuts --no-startmenu --no-admin" -Wait -NoNewWindow
- name: Checkout the source
Expand Down Expand Up @@ -1048,6 +1059,19 @@ jobs:
Get-ChildItem "$HOME\bootjdk\$env:BOOT_JDK_VERSION\*\*" | Move-Item -Destination "$HOME\bootjdk\$env:BOOT_JDK_VERSION"
if: steps.bootjdk.outputs.cache-hit != 'true'

- name: Restore cygwin installer from cache
id: cygwin-installer
uses: actions/cache@v2
with:
path: ~/cygwin/setup-x86_64.exe
key: cygwin-installer

- name: Download cygwin installer
run: |
New-Item -Force -ItemType directory -Path "$HOME\cygwin"
& curl -L "https://www.cygwin.com/setup-x86_64.exe" -o "$HOME/cygwin/setup-x86_64.exe"
if: steps.cygwin-installer.outputs.cache-hit != 'true'

- name: Restore cygwin packages from cache
id: cygwin
uses: actions/cache@v2
Expand All @@ -1057,8 +1081,6 @@ jobs:

- name: Install cygwin
run: |
New-Item -Force -ItemType directory -Path "$HOME\cygwin"
& curl -L "https://www.cygwin.com/setup-x86_64.exe" -o "$HOME/cygwin/setup-x86_64.exe"
Start-Process -FilePath "$HOME\cygwin\setup-x86_64.exe" -ArgumentList "--quiet-mode --packages cygwin=3.2.0-1,autoconf,make,zip,unzip --root $HOME\cygwin\cygwin64 --local-package-dir $HOME\cygwin\packages --site http://mirrors.kernel.org/sourceware/cygwin --no-desktop --no-shortcuts --no-startmenu --no-admin" -Wait -NoNewWindow
- name: Restore jtreg artifact
Expand Down

1 comment on commit 869b259

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.