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

More caching work, be explicit about paths, use ccache in cibuildwheel #28

Merged
merged 1 commit into from
Feb 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 29 additions & 10 deletions .github/actions/setup-caches/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,21 +30,40 @@ runs:

################
# vcpkg Cache
- name: Setup vcpkg cache in shell
- name: Setup vcpkg cache in shell (Linux)
shell: bash
run: |
mkdir -p $HOME/vcpkg_cache
mkdir -p $HOME/vcpkg_download_cache
echo "VCPKG_DEFAULT_BINARY_CACHE=$HOME/vcpkg_cache" >> $GITHUB_ENV
echo "VCPKG_DOWNLOADS=$HOME/vcpkg_download_cache" >> $GITHUB_ENV
if: ${{ runner.os != 'Windows' }}
mkdir -p /home/runner/vcpkg_cache
mkdir -p /home/runner/vcpkg_download_cache
echo "VCPKG_DEFAULT_BINARY_CACHE=/home/runner/vcpkg_cache" >> $GITHUB_ENV
echo "VCPKG_DOWNLOADS=/home/runner/vcpkg_download_cache" >> $GITHUB_ENV
if: ${{ runner.os == 'Linux' }}

- name: Setup vcpkg cache
- name: Setup vcpkg cache (Linux)
uses: actions/cache@v4
with:
path: |
$HOME/vcpkg_cache
$HOME/vcpkg_download_cache
/home/runner/vcpkg_cache
/home/runner/vcpkg_download_cache
key: vcpkg-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('vcpkg.json') }}
restore-keys: vcpkg-${{ runner.os }}-${{ runner.arch }}-
if: ${{ runner.os != 'Windows' }}
if: ${{ runner.os == 'Linux' }}

- name: Setup vcpkg cache in shell (macOS)
shell: bash
run: |
mkdir -p /Users/runner/vcpkg_cache
mkdir -p /Users/runner/vcpkg_download_cache
echo "VCPKG_DEFAULT_BINARY_CACHE=/Users/runner/vcpkg_cache" >> $GITHUB_ENV
echo "VCPKG_DOWNLOADS=/Users/runner/vcpkg_download_cache" >> $GITHUB_ENV
if: ${{ runner.os == 'macOS' }}

- name: Setup vcpkg cache (macOS)
uses: actions/cache@v4
with:
path: |
/Users/runner/vcpkg_cache
/Users/runner/vcpkg_download_cache
key: vcpkg-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('vcpkg.json') }}
restore-keys: vcpkg-${{ runner.os }}-${{ runner.arch }}-
if: ${{ runner.os == 'macOS' }}
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ dependencies-debian: ## install dependencies for linux
apt-get install -y automake bison cmake curl flex ninja-build tar unzip zip

dependencies-fedora: ## install dependencies for linux
yum install -y automake bison cmake curl flex perl-IPC-Cmd tar unzip zip
yum install -y automake bison ccache cmake curl flex perl-IPC-Cmd tar unzip zip

dependencies-vcpkg: ## install dependnecies via vcpkg
cd vcpkg && ./bootstrap-vcpkg.sh && ./vcpkg install
Expand Down