Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Install on Windows is very slow #393

Merged
merged 16 commits into from
Aug 3, 2023
Prev Previous commit
Next Next commit
Fix e2e test
  • Loading branch information
dsame committed Jul 25, 2023
commit 59c54a4b0bd948e7a2b72fafdc5a687868385747
15 changes: 8 additions & 7 deletions .github/workflows/windows-validation.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: validate Windows installation
name: Validate Windows installation

on:
push:
Expand All @@ -13,15 +13,15 @@ on:
jobs:
create-link-if-not-default:
runs-on: windows-latest
name: 'Setup ${{ matrix.go }}, cache: ${{ matrix.cache }}'
name: 'Validate if symlink is created'
strategy:
matrix:
cache: [false, true]
go: [1.20.1]
steps:
- uses: actions/checkout@v3

- name: non-default-cache-${{ matrix.cache }}-${{ matrix.go }}
- name: 'Setup ${{ matrix.cache }}, cache: ${{ matrix.go }}'
uses: ./
with:
go-version: ${{ matrix.go }}
Expand Down Expand Up @@ -81,7 +81,7 @@ jobs:
shell: bash

dont-create-link-if-default:
name: 'Use default go, cache: ${{ matrix.cache }}'
name: 'Validate if symlink is not created for default go'
runs-on: windows-latest
needs: find-default-go
strategy:
Expand All @@ -90,12 +90,13 @@ jobs:
steps:
- uses: actions/checkout@v3

- uses: ./
- name: 'Setup default go, cache: ${{ matrix.cache }}'
uses: ./
with:
go-version: ${{ needs.find-default-go.outputs.version }}
cache: ${{ matrix.cache }}

- name: 'Drive C: should have Go installation'
- name: 'Drive C: should have Go installation, cache: ${{ matrix.cache}}'
run: |
size=$(du -m -s 'C:\hostedtoolcache\windows\go\${{ needs.find-default-go.outputs.version }}\x64'|cut -f1 -d$'\t')
if [ $size -eq 0 ];then
Expand All @@ -104,7 +105,7 @@ jobs:
fi
shell: bash

- name: 'Drive D: should not have Go installation'
- name: 'Drive D: should not have Go installation, cache: ${{ matrix.cache}}'
run: |
if [ -e 'D:\hostedtoolcache\windows\go\${{ needs.find-default-go.outputs.version }}\x64' ];then
echo 'D:\hostedtoolcache\windows\go\${{ needs.find-default-go.outputs.version }}\x64 should not exist for hosted version of go';
Expand Down
Loading