Skip to content

Commit

Permalink
Update cmake-multi-platform.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
aeris170 committed Nov 17, 2024
1 parent 67fc3c1 commit 323b3f2
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions .github/workflows/cmake-multi-platform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,17 +58,35 @@ jobs:
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
echo "scripts-dir=${{ github.workspace }}/scripts" >> "$GITHUB_OUTPUT"
echo "vcpkg-dir=${{ github.workspace }}/vcpkg" >> "$GITHUB_OUTPUT"
- name: Clean vcpkg directory if exists (Linux)
if: runner.os == 'Linux'
shell: bash
run: |
echo "Cleaning vcpkg directory at ${{ steps.strings.outputs.vcpkg-dir }}..."
rm -rf "${{ steps.strings.outputs.vcpkg-dir }}"
- name: Clean vcpkg directory if exists (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
$vcpkgDir = "${{ steps.strings.outputs.vcpkg-dir }}"
Write-Host "Cleaning vcpkg directory at $vcpkgDir..."
if (Test-Path -Path $vcpkgDir) {
Remove-Item -Recurse -Force -Path $vcpkgDir
}
- name: Cache vcpkg
uses: actions/cache@v3
with:
path: ${{ steps.strings.outputs.vcpkg-dir }}
key: ${{ runner.os }}-vcpkg-${{ hashFiles('**/vcpkg.json') }}
restore-keys: |
${{ runner.os }}-vcpkg-
${{ runner.os }}-${{ runner.build_type }}-vcpkg-cache
- name: Run (Linux-specific) script for apt-get
if: runner.os == 'Linux'
shell: bash
run: |
chmod +x ${{ steps.strings.outputs.scripts-dir }}/fetch_apt_get.sh
${{ steps.strings.outputs.scripts-dir }}/fetch_apt_get.sh
Expand Down

0 comments on commit 323b3f2

Please sign in to comment.