Skip to content

Commit

Permalink
always cache for macOS build
Browse files Browse the repository at this point in the history
Signed-off-by: Ji Bin <[email protected]>
  • Loading branch information
matrixji committed Jan 16, 2024
1 parent dbd0761 commit a648771
Showing 1 changed file with 47 additions and 8 deletions.
55 changes: 47 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,22 @@ jobs:
- name: Checkout
uses: actions/checkout@v3
- name: Cache go
uses: actions/cache@v3
uses: actions/cache/restore@v3
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: linux-go-${{ hashFiles('milvus_binary/env.sh') }}
restore-keys: linux-go-
- name: Cache conan
uses: actions/cache@v3
uses: actions/cache/restore@v3
with:
path: |
~/.conan/data
key: linux-conan-${{ hashFiles('milvus_binary/env.sh') }}
restore-keys: linux-conan-
- name: Cache ccache
uses: actions/cache@v3
uses: actions/cache/restore@v3
with:
path: |
${{ github.workspace }}/.ccache
Expand Down Expand Up @@ -65,6 +65,25 @@ jobs:
yum -y install patchelf
yum -y install perl-IPC-Cmd
python3 -m build -w -n
- uses: actions/cache/save@v3
if: always()
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: linux-go-${{ hashFiles('milvus_binary/env.sh') }}
- uses: actions/cache/save@v3
if: always()
with:
path: |
~/.conan/data
key: linux-conan-${{ hashFiles('milvus_binary/env.sh') }}
- uses: actions/cache/save@v3
if: always()
with:
path: |
${{ github.workspace }}/.ccache
key: linux-ccache-${{ hashFiles('milvus_binary/env.sh') }}
- uses: actions/upload-artifact@v3
with:
name: wheel_linux
Expand All @@ -79,27 +98,27 @@ jobs:
CCACHE_COMPRESS: 1
CCACHE_COMPRESSLEVEL: 5
CCACHE_MAXSIZE: 2G
timeout-minutes: 900
timeout-minutes: 360
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Cache go
uses: actions/cache@v3
uses: actions/cache/restore@v3
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: macos-go-${{ hashFiles('milvus_binary/env.sh') }}
restore-keys: macos-go-
- name: Cache conan
uses: actions/cache@v3
uses: actions/cache/restore@v3
with:
path: |
~/.conan/data
key: macos-conan-${{ hashFiles('milvus_binary/env.sh') }}
restore-keys: macos-conan-
- name: Cache ccache
uses: actions/cache@v3
uses: actions/cache/restore@v3
with:
path: |
${{ github.workspace }}/.ccache
Expand All @@ -113,7 +132,27 @@ jobs:
- name: Build Wheel
run: |
python3 -m pip install --user build wheel 'setuptools>64.0'
python3 -m build -w -n
brew install coreutils
timeout 10800 python3 -m build -w -n || echo '::warning build may failed, please rerun action if timeout'
- uses: actions/cache/save@v3
if: always()
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: macos-go-${{ hashFiles('milvus_binary/env.sh') }}
- uses: actions/cache/save@v3
if: always()
with:
path: |
~/.conan/data
key: macos-conan-${{ hashFiles('milvus_binary/env.sh') }}
- uses: actions/cache/save@v3
if: always()
with:
path: |
${{ github.workspace }}/.ccache
key: macos-ccache-${{ hashFiles('milvus_binary/env.sh') }}
- uses: actions/upload-artifact@v3
with:
name: wheel_macos
Expand Down

0 comments on commit a648771

Please sign in to comment.