name: Copilot Setup Steps

on:
  workflow_dispatch:

jobs:
  copilot-setup-steps:
    runs-on: ubuntu-latest
    permissions:
      contents: read
    steps:
      - uses: actions/checkout@v3
        with:
          submodules: "true"
      - name: Setup rust toolchain
        uses: ./.github/actions/toolchains/rust
        with:
          toolchain: "1.86"
          components: rustfmt clippy
      - uses: actions/setup-python@v4
        with:
          python-version: "3.11"
      - uses: actions/setup-node@v3
        with:
          node-version: "20.18.2"
      - uses: Swatinem/rust-cache@v2
      - name: Prereqs
        run: python ./prereqs.py --install
      - name: First build
        run: python ./build.py --no-check --no-test
