Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore[ci]: increase concurrency #3870

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 25 additions & 25 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,40 +65,30 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [["3.11", "311"]]
opt-mode: ["gas", "none", "codesize"]
evm-version: [shanghai]
debug: [true, false]
memorymock: [false]
group: [1, 2, 3, 4, 5, 6]

# https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs#expanding-or-adding-matrix-configurations
include:
# test default settings with 3.11 across all supported evm versions
- python-version: ["3.11", "311"]
debug: false
- debug: false
opt-mode: gas
evm-version: london
- python-version: ["3.11", "311"]
debug: false
- debug: false
opt-mode: gas
evm-version: paris

# redundant rule, for clarity
- python-version: ["3.11", "311"]
debug: false
opt-mode: gas
evm-version: shanghai
# shanghai is already the default

# enable when py-evm makes it work:
#- python-version: ["3.11", "311"]
# debug: false
#- debug: false
# opt-mode: gas
# evm-version: cancun

# run with `--memorymock`, but only need to do it one configuration
# TODO: consider removing the memorymock tests
- python-version: ["3.11", "311"]
opt-mode: gas
- opt-mode: gas
debug: false
evm-version: shanghai
memorymock: true
Expand All @@ -108,26 +98,33 @@ jobs:
- python-version: ["3.10", "310"]
opt-mode: gas
debug: false
memorymock: false
evm-version: shanghai
- python-version: ["3.12", "312"]
opt-mode: gas
debug: false
memorymock: false
evm-version: shanghai

name: py${{ matrix.python-version[1] }}-opt-${{ matrix.opt-mode }}${{ matrix.debug && '-debug' || '' }}${{ matrix.memorymock && '-memorymock' || '' }}-${{ matrix.evm-version }}
name: py${{ matrix.python-version[1] || '311' }}-opt-${{ matrix.opt-mode }}${{ matrix.debug && '-debug' || '' }}${{ matrix.memorymock && '-memorymock' || '' }}-${{ matrix.evm-version || 'shanghai' }}-group${{ matrix.group }}

steps:
- uses: actions/checkout@v4
with:
# need to fetch unshallow so that setuptools_scm can infer the version
fetch-depth: 0

- name: Set up Python ${{ matrix.python-version[0] }}
- name: Set up Python ${{ matrix.python-version[0] || '3.11' }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version[0] }}
python-version: ${{ matrix.python-version[0] || '3.11' }}
cache: "pip"

# fetch test durations for splitting
# NOTE: if the tests get poorly distributed, run this and commit the resulting `.test_durations` file to the `vyper-test-durations` repo.
# `pytest --store-durations -r aR tests/`
- name: Fetch test-durations
run: curl --location "https://raw.githubusercontent.com/vyperlang/vyper-test-durations/master/test_durations" -o .test_durations
- name: Install dependencies
run: pip install .[test]

Expand All @@ -137,9 +134,13 @@ jobs:
- name: Run tests
run: |
pytest \
--splits 6 \
--group ${{ matrix.group }} \
--splitting-algorithm least_duration \
--dist worksteal \
-m "not fuzzing" \
--optimize ${{ matrix.opt-mode }} \
--evm-version ${{ matrix.evm-version }} \
--evm-version ${{ matrix.evm-version || 'shanghai' }} \
${{ matrix.debug && '--enable-compiler-debug-mode' || '' }} \
${{ matrix.memorymock && '--memorymock' || '' }} \
--showlocals -r aR \
Expand Down Expand Up @@ -171,7 +172,8 @@ jobs:

strategy:
matrix:
group: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60]
# python -c "print(list(range(1, 101)))"
group: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120]

steps:
- uses: actions/checkout@v4
Expand All @@ -185,19 +187,17 @@ jobs:
- name: Install dependencies
run: pip install .[test]

# fetch test durations
# NOTE: if the tests get poorly distributed, run this and commit the resulting `.test_durations` file to the `vyper-test-durations` repo.
# `pytest -m "fuzzing" --store-durations -r aR tests/`
- name: Fetch test-durations
run: curl --location "https://raw.githubusercontent.com/vyperlang/vyper-test-durations/master/test_durations" -o .test_durations

- name: Run tests
run: |
pytest \
-m "fuzzing" \
--splits 60 \
--splits 120 \
--group ${{ matrix.group }} \
--splitting-algorithm least_duration \
--dist worksteal \
-r aR tests/

- name: Upload Coverage
Expand Down
2 changes: 1 addition & 1 deletion quicktest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@

# run pytest but bail out on first error and suppress coverage.
# useful for dev workflow
pytest -q --no-cov -s --instafail -x --disable-warnings "$@"
pytest --dist worksteal -q --no-cov -s --instafail -x --disable-warnings "$@"
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"pytest>=8.0,<9.0",
"pytest-cov>=4.1,<5.0",
"pytest-instafail>=0.4,<1.0",
"pytest-xdist>=2.5,<3.0",
"pytest-xdist>=3.5,<4.0",
"pytest-split>=0.7.0,<1.0",
"eth-tester[py-evm]>=0.9.0b1,<0.10",
"eth_abi>=4.0.0,<5.0.0",
Expand Down
Loading