Skip to content

Commit 5b22b33

Browse files
committed
[GitHub] CLEAN unify pybind11 install
1 parent 34094df commit 5b22b33

File tree

2 files changed

+23
-7
lines changed

2 files changed

+23
-7
lines changed

.github/workflows/macos.yml

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,26 @@ jobs:
4343

4444
- name: Install requirements
4545
run: |
46-
brew install ccache ninja boost eigen pybind11
46+
brew install eigen boost
47+
brew install ccache ninja
4748
python3 -m pip install numpy scipy
4849
49-
- name: Download and install the latest SOFA ${{ env.SOFA_BRANCH }} binaries
50+
- name: pybind11 cache files
51+
uses: actions/cache@v2
52+
id: pybind11_cache
53+
with:
54+
path: /tmp/pybind11
55+
key: pybind11_${{ env.GIT_BRANCH }}_${{ matrix.os }}_${{ hashFiles('**/lockfiles') }}
56+
57+
- name: Build and install pybind11
58+
if: steps.pybind11_cache.outputs.cache-hit != 'true'
59+
run: |
60+
git clone -b v2.4.3 --depth 1 https://github.com/pybind/pybind11.git /tmp/pybind11
61+
cd /tmp/pybind11
62+
cmake -DCMAKE_BUILD_TYPE=Release -DPYBIND11_TEST=OFF -DPYTHON_EXECUTABLE=$(which python3.7) .
63+
sudo make --silent install
64+
65+
- name: Download and install the latest SOFA ${{ matrix.sofa_branch }} binaries
5066
shell: bash
5167
run: |
5268
mkdir -p /tmp/sofa_zip
@@ -133,7 +149,7 @@ jobs:
133149
brew install boost
134150
python3 -m pip install numpy scipy
135151
136-
- name: Download and install the latest SOFA ${{ env.SOFA_BRANCH }} binaries
152+
- name: Download and install the latest SOFA ${{ matrix.sofa_branch }} binaries
137153
shell: bash
138154
run: |
139155
mkdir -p /tmp/sofa_zip

.github/workflows/ubuntu.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,12 @@ jobs:
5757
- name: Build and install pybind11
5858
if: steps.pybind11_cache.outputs.cache-hit != 'true'
5959
run: |
60-
git clone -b v2.4 --depth 1 https://github.com/pybind/pybind11.git /tmp/pybind11
60+
git clone -b v2.4.3 --depth 1 https://github.com/pybind/pybind11.git /tmp/pybind11
6161
cd /tmp/pybind11
62-
cmake -DCMAKE_BUILD_TYPE=Release -DPYBIND11_TEST=OFF .
62+
cmake -DCMAKE_BUILD_TYPE=Release -DPYBIND11_TEST=OFF -DPYTHON_EXECUTABLE=$(which python3.7) .
6363
sudo make --silent install
6464
65-
- name: Download and install the latest SOFA ${{ env.SOFA_BRANCH }} binaries
65+
- name: Download and install the latest SOFA ${{ matrix.sofa_branch }} binaries
6666
shell: bash
6767
run: |
6868
mkdir -p /tmp/sofa_zip
@@ -149,7 +149,7 @@ jobs:
149149
sudo apt install -qq libboost-all-dev
150150
python3 -m pip install numpy scipy
151151
152-
- name: Download and install the latest SOFA ${{ env.SOFA_BRANCH }} binaries
152+
- name: Download and install the latest SOFA ${{ matrix.sofa_branch }} binaries
153153
shell: bash
154154
run: |
155155
mkdir -p /tmp/sofa_zip

0 commit comments

Comments
 (0)