Skip to content
This repository has been archived by the owner on Feb 2, 2023. It is now read-only.

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

Backport-of: 61fcf2f67ff16bee92a5279e7bcacc79fc8f37ad
  • Loading branch information
RealCLanger committed Apr 10, 2022
1 parent 430fe80 commit db63984
Showing 1 changed file with 39 additions and 6 deletions.
45 changes: 39 additions & 6 deletions .github/workflows/submit.yml
Expand Up @@ -897,6 +897,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 @@ -906,8 +919,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 @@ -986,6 +997,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 @@ -995,8 +1019,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 @@ -1158,6 +1180,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 @@ -1167,8 +1202,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 db63984

@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.