@@ -33,11 +33,10 @@ jobs:
3333 runs-on : ubuntu-latest
3434 steps :
3535 - uses : actions/checkout@v3
36- - uses : actions/setup-python@v4
37- with :
38- python-version : " 3.x"
3936 - uses : matrix-org/setup-python-poetry@v1
4037 with :
38+ python-version : " 3.x"
39+ poetry-version : " 1.3.2"
4140 extras : " all"
4241 - run : poetry run scripts-dev/generate_sample_config.sh --check
4342 - run : poetry run scripts-dev/config-lint.sh
5251 - run : " pip install 'click==8.1.1' 'GitPython>=3.1.20'"
5352 - run : scripts-dev/check_schema_delta.py --force-colors
5453
54+ check-lockfile :
55+ runs-on : ubuntu-latest
56+ steps :
57+ - uses : actions/checkout@v3
58+ - uses : actions/setup-python@v4
59+ with :
60+ python-version : " 3.x"
61+ - run : .ci/scripts/check_lockfile.py
62+
5563 lint :
5664 uses : " matrix-org/backend-meta/.github/workflows/python-poetry-ci.yml@v2"
5765 with :
8896 ref : ${{ github.event.pull_request.head.sha }}
8997 - uses : matrix-org/setup-python-poetry@v1
9098 with :
99+ poetry-version : " 1.3.2"
91100 extras : " all"
92101 - run : poetry run scripts-dev/check_pydantic_models.py
93102
@@ -103,7 +112,7 @@ jobs:
103112 # There don't seem to be versioned releases of this action per se: for each rust
104113 # version there is a branch which gets constantly rebased on top of master.
105114 # We pin to a specific commit for paranoia's sake.
106- uses : dtolnay/rust-toolchain@e645b0cf01249a964ec099494d38d2da0f0b349f
115+ uses : dtolnay/rust-toolchain@9cd00a88a73addc8617065438eff914dd08d0955
107116 with :
108117 toolchain : 1.58.1
109118 components : clippy
@@ -125,7 +134,7 @@ jobs:
125134 # There don't seem to be versioned releases of this action per se: for each rust
126135 # version there is a branch which gets constantly rebased on top of master.
127136 # We pin to a specific commit for paranoia's sake.
128- uses : dtolnay/rust-toolchain@e645b0cf01249a964ec099494d38d2da0f0b349f
137+ uses : dtolnay/rust-toolchain@9cd00a88a73addc8617065438eff914dd08d0955
129138 with :
130139 toolchain : nightly-2022-12-01
131140 components : clippy
@@ -145,7 +154,7 @@ jobs:
145154 # There don't seem to be versioned releases of this action per se: for each rust
146155 # version there is a branch which gets constantly rebased on top of master.
147156 # We pin to a specific commit for paranoia's sake.
148- uses : dtolnay/rust-toolchain@e645b0cf01249a964ec099494d38d2da0f0b349f
157+ uses : dtolnay/rust-toolchain@9cd00a88a73addc8617065438eff914dd08d0955
149158 with :
150159 toolchain : 1.58.1
151160 components : rustfmt
@@ -163,6 +172,7 @@ jobs:
163172 - lint-pydantic
164173 - check-sampleconfig
165174 - check-schema-delta
175+ - check-lockfile
166176 - lint-clippy
167177 - lint-rustfmt
168178 runs-on : ubuntu-latest
@@ -211,14 +221,15 @@ jobs:
211221 # There don't seem to be versioned releases of this action per se: for each rust
212222 # version there is a branch which gets constantly rebased on top of master.
213223 # We pin to a specific commit for paranoia's sake.
214- uses : dtolnay/rust-toolchain@e645b0cf01249a964ec099494d38d2da0f0b349f
224+ uses : dtolnay/rust-toolchain@9cd00a88a73addc8617065438eff914dd08d0955
215225 with :
216226 toolchain : 1.58.1
217227 - uses : Swatinem/rust-cache@v2
218228
219229 - uses : matrix-org/setup-python-poetry@v1
220230 with :
221231 python-version : ${{ matrix.job.python-version }}
232+ poetry-version : " 1.3.2"
222233 extras : ${{ matrix.job.extras }}
223234 - name : Await PostgreSQL
224235 if : ${{ matrix.job.postgres-version }}
@@ -255,7 +266,7 @@ jobs:
255266 # There don't seem to be versioned releases of this action per se: for each rust
256267 # version there is a branch which gets constantly rebased on top of master.
257268 # We pin to a specific commit for paranoia's sake.
258- uses : dtolnay/rust-toolchain@e645b0cf01249a964ec099494d38d2da0f0b349f
269+ uses : dtolnay/rust-toolchain@9cd00a88a73addc8617065438eff914dd08d0955
259270 with :
260271 toolchain : 1.58.1
261272 - uses : Swatinem/rust-cache@v2
@@ -294,6 +305,7 @@ jobs:
294305 - uses : matrix-org/setup-python-poetry@v1
295306 with :
296307 python-version : ' 3.7'
308+ poetry-version : " 1.3.2"
297309 extras : " all test"
298310
299311 - run : poetry run trial -j6 tests
@@ -328,6 +340,7 @@ jobs:
328340 - uses : matrix-org/setup-python-poetry@v1
329341 with :
330342 python-version : ${{ matrix.python-version }}
343+ poetry-version : " 1.3.2"
331344 extras : ${{ matrix.extras }}
332345 - run : poetry run trial --jobs=2 tests
333346 - name : Dump logs
@@ -373,7 +386,7 @@ jobs:
373386 # There don't seem to be versioned releases of this action per se: for each rust
374387 # version there is a branch which gets constantly rebased on top of master.
375388 # We pin to a specific commit for paranoia's sake.
376- uses : dtolnay/rust-toolchain@e645b0cf01249a964ec099494d38d2da0f0b349f
389+ uses : dtolnay/rust-toolchain@9cd00a88a73addc8617065438eff914dd08d0955
377390 with :
378391 toolchain : 1.58.1
379392 - uses : Swatinem/rust-cache@v2
@@ -419,6 +432,7 @@ jobs:
419432 - run : sudo apt-get -qq install xmlsec1 postgresql-client
420433 - uses : matrix-org/setup-python-poetry@v1
421434 with :
435+ poetry-version : " 1.3.2"
422436 extras : " postgres"
423437 - run : .ci/scripts/test_export_data_command.sh
424438 env :
@@ -470,6 +484,7 @@ jobs:
470484 - uses : matrix-org/setup-python-poetry@v1
471485 with :
472486 python-version : ${{ matrix.python-version }}
487+ poetry-version : " 1.3.2"
473488 extras : " postgres"
474489 - run : .ci/scripts/test_synapse_port_db.sh
475490 id : run_tester_script
@@ -516,7 +531,7 @@ jobs:
516531 # There don't seem to be versioned releases of this action per se: for each rust
517532 # version there is a branch which gets constantly rebased on top of master.
518533 # We pin to a specific commit for paranoia's sake.
519- uses : dtolnay/rust-toolchain@e645b0cf01249a964ec099494d38d2da0f0b349f
534+ uses : dtolnay/rust-toolchain@9cd00a88a73addc8617065438eff914dd08d0955
520535 with :
521536 toolchain : 1.58.1
522537 - uses : Swatinem/rust-cache@v2
@@ -526,8 +541,11 @@ jobs:
526541
527542 - run : |
528543 set -o pipefail
529- POSTGRES=${{ (matrix.database == 'Postgres') && 1 || '' }} WORKERS=${{ (matrix.arrangement == 'workers') && 1 || '' }} COMPLEMENT_DIR=`pwd`/complement synapse/scripts-dev/complement.sh -json 2>&1 | synapse/.ci/scripts/gotestfmt
544+ COMPLEMENT_DIR=`pwd`/complement synapse/scripts-dev/complement.sh -json 2>&1 | synapse/.ci/scripts/gotestfmt
530545 shell: bash
546+ env:
547+ POSTGRES: ${{ (matrix.database == 'Postgres') && 1 || '' }}
548+ WORKERS: ${{ (matrix.arrangement == 'workers') && 1 || '' }}
531549 name: Run Complement Tests
532550
533551 cargo-test :
@@ -544,13 +562,36 @@ jobs:
544562 # There don't seem to be versioned releases of this action per se: for each rust
545563 # version there is a branch which gets constantly rebased on top of master.
546564 # We pin to a specific commit for paranoia's sake.
547- uses : dtolnay/rust-toolchain@e645b0cf01249a964ec099494d38d2da0f0b349f
565+ uses : dtolnay/rust-toolchain@9cd00a88a73addc8617065438eff914dd08d0955
548566 with :
549567 toolchain : 1.58.1
550568 - uses : Swatinem/rust-cache@v2
551569
552570 - run : cargo test
553571
572+ # We want to ensure that the cargo benchmarks still compile, which requires a
573+ # nightly compiler.
574+ cargo-bench :
575+ if : ${{ needs.changes.outputs.rust == 'true' }}
576+ runs-on : ubuntu-latest
577+ needs :
578+ - linting-done
579+ - changes
580+
581+ steps :
582+ - uses : actions/checkout@v3
583+
584+ - name : Install Rust
585+ # There don't seem to be versioned releases of this action per se: for each rust
586+ # version there is a branch which gets constantly rebased on top of master.
587+ # We pin to a specific commit for paranoia's sake.
588+ uses : dtolnay/rust-toolchain@9cd00a88a73addc8617065438eff914dd08d0955
589+ with :
590+ toolchain : nightly-2022-12-01
591+ - uses : Swatinem/rust-cache@v2
592+
593+ - run : cargo bench --no-run
594+
554595 # a job which marks all the other jobs as complete, thus allowing PRs to be merged.
555596 tests-done :
556597 if : ${{ always() }}
@@ -562,6 +603,7 @@ jobs:
562603 - portdb
563604 - complement
564605 - cargo-test
606+ - cargo-bench
565607 runs-on : ubuntu-latest
566608 steps :
567609 - uses : matrix-org/done-action@v2
@@ -573,3 +615,4 @@ jobs:
573615 skippable : |
574616 lint-newsfile
575617 cargo-test
618+ cargo-bench
0 commit comments