Skip to content

Commit fdcc5f0

Browse files
authored
Merge pull request #3269 from darwintree/setup-ci-venv
ci: setup venv in ci
2 parents 2f242f5 + e2a759a commit fdcc5f0

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

dev-support/activate_venv.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/bash
2+
3+
pip install uv
4+
uv venv --python 3.11
5+
source .venv/bin/activate

dev-support/dep_pip3.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,13 @@
33
set -e
44

55
# echo python version
6+
echo "python3:"
67
python3 --version
8+
which python3
9+
echo "pip3:"
10+
pip3 --version
11+
which pip3
12+
713

814
if [ -n "$BASH_VERSION" ]; then
915
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
@@ -14,7 +20,10 @@ fi
1420
pip install uv
1521
# The requirements.txt is generated by command:
1622
# uv pip compile pyproject.toml -o ./dev-support/requirements.txt
17-
uv pip sync "${SCRIPT_DIR}/requirements.txt"
23+
uv pip sync "${SCRIPT_DIR}/requirements.txt" --python $(which python3)
24+
25+
uv pip list
26+
1827
# set global solc version which is required by execution-spec-tests
1928
solc-select use 0.8.24 --always-install
2029

dev-support/test.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
SCRIPT_DIR=`dirname "${BASH_SOURCE[0]}"`
44
echo "Checking dependent python3 modules ..."
5+
source $SCRIPT_DIR/activate_venv.sh
56
source $SCRIPT_DIR/dep_pip3.sh
67
set -o pipefail
78

0 commit comments

Comments
 (0)