Skip to content

Commit 4e74e4f

Browse files
authored
Merge pull request #181 from sofa-framework/guparan-patch-1
Upgrade Ubuntu builder to v20.04 + Clean versions
2 parents bf44fd5 + 30b5ac6 commit 4e74e4f

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

.github/workflows/ubuntu.yml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,13 @@ jobs:
99
strategy:
1010
fail-fast: false
1111
matrix:
12-
os: [ubuntu-18.04]
12+
os: [ubuntu-20.04]
1313
sofa_branch: [master, v21.06]
1414
env:
1515
SOFA_ROOT: /opt/sofa
1616
SOFA_OS: Linux
17+
PYTHON_VERSION: 3.8
18+
PYBIND_VERSION: 2.4.3
1719

1820
steps:
1921
- name: Checkout source code
@@ -37,10 +39,10 @@ jobs:
3739
if [ -z "$GIT_BRANCH" ]; then exit 1; fi
3840
echo "GIT_BRANCH=$GIT_BRANCH" >> $GITHUB_ENV
3941
40-
- name: Set up Python 3.7
42+
- name: Set up Python ${{ env.PYTHON_VERSION }}
4143
uses: actions/setup-python@v2
4244
with:
43-
python-version: '3.7'
45+
python-version: ${{ env.PYTHON_VERSION }}
4446

4547
- name: Install requirements
4648
run: |
@@ -58,9 +60,9 @@ jobs:
5860
- name: Build pybind11
5961
if: steps.pybind11_cache.outputs.cache-hit != 'true'
6062
run: |
61-
git clone -b v2.4.3 --depth 1 https://github.com/pybind/pybind11.git /tmp/pybind11
63+
git clone -b v$PYBIND_VERSION --depth 1 https://github.com/pybind/pybind11.git /tmp/pybind11
6264
cd /tmp/pybind11
63-
cmake -DCMAKE_BUILD_TYPE=Release -DPYBIND11_TEST=OFF -DPYTHON_EXECUTABLE=$(which python3.7) .
65+
cmake -DCMAKE_BUILD_TYPE=Release -DPYBIND11_TEST=OFF -DPYTHON_EXECUTABLE=$(which python${{ env.PYTHON_VERSION }}) .
6466
make --silent
6567
6668
- name: Install pybind11
@@ -94,7 +96,7 @@ jobs:
9496
CCACHE_MAXSIZE: "500M"
9597
run: |
9698
echo "RUNNER_TOOL_CACHE = $RUNNER_TOOL_CACHE"
97-
python_root="$(find $RUNNER_TOOL_CACHE -maxdepth 3 -type d -path '**/Python/3.7*/x64')"
99+
python_root="$(find $RUNNER_TOOL_CACHE -maxdepth 3 -type d -path '**/Python/${{ env.PYTHON_VERSION }}*/x64')"
98100
echo "python_root = $python_root"
99101
export CCACHE_BASEDIR=$GITHUB_WORKSPACE
100102
export CCACHE_DIR=$GITHUB_WORKSPACE/.ccache
@@ -105,7 +107,7 @@ jobs:
105107
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
106108
-DCMAKE_PREFIX_PATH=$SOFA_ROOT/lib/cmake \
107109
-DCMAKE_BUILD_TYPE=Release \
108-
-DPython_EXECUTABLE=$(which python3.7) \
110+
-DPython_EXECUTABLE=$(which python${{ env.PYTHON_VERSION }}) \
109111
-DPython_ROOT=$python_root \
110112
.
111113
ninja install
@@ -125,7 +127,7 @@ jobs:
125127
strategy:
126128
fail-fast: false
127129
matrix:
128-
os: [ubuntu-18.04]
130+
os: [ubuntu-20.04]
129131
sofa_branch: [master, v21.06]
130132
env:
131133
SOFA_ROOT: /opt/sofa
@@ -150,10 +152,10 @@ jobs:
150152
if [ -z "$GIT_BRANCH" ]; then exit 1; fi
151153
echo "GIT_BRANCH=$GIT_BRANCH" >> $GITHUB_ENV
152154
153-
- name: Set up Python 3.7
155+
- name: Set up Python ${{ env.PYTHON_VERSION }}
154156
uses: actions/setup-python@v2
155157
with:
156-
python-version: '3.7'
158+
python-version: ${{ env.PYTHON_VERSION }}
157159

158160
- name: Install requirements
159161
run: |

0 commit comments

Comments
 (0)