Skip to content

Commit

Permalink
Enable ccache on Github Actions (apache#18459)
Browse files Browse the repository at this point in the history
  • Loading branch information
leezu authored Jun 2, 2020
1 parent e307233 commit 8395089
Showing 1 changed file with 27 additions and 5 deletions.
32 changes: 27 additions & 5 deletions .github/workflows/os_x_staticbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,40 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Compilation cache
uses: actions/cache@v2
with:
path: ~/.ccache
# We include the commit sha in the cache key, as new cache entries are
# only created if there is no existing entry for the key yet.
key: ${{ runner.os }}-ccache-${{ github.sha }}
# Restore any ccache cache entry, if none for
# ${{ runner.os }}-ccache-${{ github.sha }} exists
restore-keys: |
${{ runner.os }}-ccache
- name: Setup python
uses: actions/setup-python@v2
with:
python-version: '3.6'
architecture: x64

- name: Install Dependencies
run: |
brew install nasm automake ninja libtool cmake pkgconfig protobuf hdf5 zlib
python3 -m pip install --user -r ci/docker/install/requirements
brew install nasm automake ninja libtool cmake pkgconfig protobuf hdf5 zlib ccache
ccache -M 500M # Limit the ccache size; Github's overall cache limit is 5GB
python -m pip install -r ci/docker/install/requirements
shell: bash

- name: Build project
run: |
git --version
clang --version
CMAKE_STATICBUILD=1 ./tools/staticbuild/build.sh cpu
- name: Setup Python
run: |
python3 -m pip install --user -e python
python -m pip install --user -e python
- name: Test project
run: |
python3 -m pytest -n 4 --durations=50 --verbose tests/python/unittest/ -k 'not test_operator and not (test_subgraph or test_custom_op or test_recordimage_dataset_with_data_loader_multiworker or test_multi_worker or test_multi_worker_shape or test_multi_worker_forked_data_loader or test_multi_worker_dataloader_release_pool)' -m 'not serial'
Expand Down

0 comments on commit 8395089

Please sign in to comment.