-
Notifications
You must be signed in to change notification settings - Fork 31
52 lines (43 loc) · 1.54 KB
/
merge_queue_ci.yml
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
name: Merge-queue-CI-Flow
on:
merge_group:
types:
- checks_requested
env:
CI: 1
RUSTFLAGS: "-D warnings -C link-arg=-fuse-ld=lld"
EXTRA_RUST_TOOLCHAINS: nightly-2024-04-29
jobs:
code_style:
runs-on: starkware-ubuntu-20-04-medium
steps:
# Environment setup.
- uses: actions/checkout@v4
# Setup pypy and link to the location expected by .cargo/config.toml.
- uses: actions/setup-python@v5
id: setup-pypy
with:
python-version: "pypy3.9"
- run: ln -s '${{ steps.setup-pypy.outputs.python-path }}' /usr/local/bin/pypy3.9
- env:
LD_LIBRARY_PATH: ${{ steps.setup-pypy.outputs.pythonLocation }}/bin
run: echo "LD_LIBRARY_PATH=${LD_LIBRARY_PATH}" >> $GITHUB_ENV
# Install rust components.
- uses: ./.github/actions/bootstrap
with:
extra_rust_toolchains: ${{ env.EXTRA_RUST_TOOLCHAINS }}
- name: Setup Python venv
run: |
python3 -m venv ci
ci/bin/pip install -r scripts/requirements.txt
# Check Cargo.lock is up to date.
- name: "Check Cargo.lock"
run: |
cargo update -w --locked
git diff --exit-code Cargo.lock
- name: "Run clippy on merge queue"
run: ci/bin/python scripts/run_tests.py --command clippy
- name: "Run rustfmt on merge queue"
# The nightly here is coupled with the one in install_rust/action.yml.
# If we move the install here we can use a const.
run: cargo +"$EXTRA_RUST_TOOLCHAINS" fmt --all -- --check