Skip to content

Merge-queue-CI-Flow #55

Merge-queue-CI-Flow

Merge-queue-CI-Flow #55

Workflow file for this run

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