Skip to content

Commit

Permalink
Try using vcpkg GHA caching instead of Nuget
Browse files Browse the repository at this point in the history
  • Loading branch information
dpogue committed Oct 4, 2024
1 parent 508439c commit 775dab0
Showing 1 changed file with 24 additions and 52 deletions.
76 changes: 24 additions & 52 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,18 +60,11 @@ jobs:
with:
cmake-version: '3.29.2'

- name: Setup NuGet
run: |
nuget sources add `
-source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json" `
-storepasswordincleartext `
-name "GitHub" `
-username "${{ github.repository_owner }}" `
-password "${{ secrets.GITHUB_TOKEN }}"
nuget setapikey `
"${{ secrets.GITHUB_TOKEN }}" `
-source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json"
- uses: actions/github-script@v7
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- name: Configure
run: |
Expand All @@ -85,7 +78,7 @@ jobs:
-DVCPKG_INSTALL_OPTIONS=--clean-after-build `
-S . -B build
env:
VCPKG_BINARY_SOURCES: "clear;nuget,GitHub,readwrite"
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"

- name: Build
run: |
Expand Down Expand Up @@ -143,18 +136,11 @@ jobs:
with:
cmake-version: '3.29.2'

- name: Setup NuGet
run: |
nuget sources add `
-source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json" `
-storepasswordincleartext `
-name "GitHub" `
-username "${{ github.repository_owner }}" `
-password "${{ secrets.GITHUB_TOKEN }}"
nuget setapikey `
"${{ secrets.GITHUB_TOKEN }}" `
-source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json"
- uses: actions/github-script@v7
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- name: Configure
run: |
Expand All @@ -169,7 +155,7 @@ jobs:
-DVCPKG_INSTALL_OPTIONS=--clean-after-build `
-S . -B build
env:
VCPKG_BINARY_SOURCES: "clear;nuget,GitHub,readwrite"
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"

- name: Build
run: |
Expand Down Expand Up @@ -215,18 +201,11 @@ jobs:
with:
cmake-version: '3.29.2'

- name: Setup NuGet
run: |
nuget sources add \
-source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json" \
-storepasswordincleartext \
-name "GitHub" \
-username "${{ github.repository_owner }}" \
-password "${{ secrets.GITHUB_TOKEN }}"
nuget setapikey \
"${{ secrets.GITHUB_TOKEN }}" \
-source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json"
- uses: actions/github-script@v7
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- name: Configure
run: |
Expand All @@ -240,7 +219,7 @@ jobs:
-DVCPKG_INSTALL_OPTIONS=--clean-after-build \
-S . -B build
env:
VCPKG_BINARY_SOURCES: "clear;nuget,GitHub,readwrite"
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"

- name: Build
run: |
Expand Down Expand Up @@ -295,18 +274,11 @@ jobs:
with:
cmake-version: '3.29.2'

- name: Setup NuGet
run: |
nuget sources add \
-source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json" \
-storepasswordincleartext \
-name "GitHub" \
-username "${{ github.repository_owner }}" \
-password "${{ secrets.GITHUB_TOKEN }}"
nuget setapikey \
"${{ secrets.GITHUB_TOKEN }}" \
-source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json"
- uses: actions/github-script@v7
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- name: Configure
run: |
Expand All @@ -323,7 +295,7 @@ jobs:
-DVCPKG_INSTALL_OPTIONS=--clean-after-build \
-S . -B build
env:
VCPKG_BINARY_SOURCES: "clear;nuget,GitHub,readwrite"
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"

- name: Build
run: |
Expand Down

0 comments on commit 775dab0

Please sign in to comment.