feat: support local development using Buck2 #2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Buck2 (Experimental, non-blocking for PRs) | |
| on: | |
| pull_request: {} | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| concurrency: | |
| group: buck2-${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| buck2-test: | |
| name: buck2 test //codex-rs/... | |
| runs-on: ubuntu-24.04 | |
| # Non-blocking while Buck2 support is still experimental. | |
| continue-on-error: true | |
| timeout-minutes: 20 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| # scripts/buck2, scripts/reindeer, etc. are DotSlash wrappers. | |
| - name: Install DotSlash | |
| uses: facebook/install-dotslash@v2 | |
| - name: Setup Rust toolchain | |
| uses: dtolnay/[email protected] | |
| with: | |
| # Match codex-rs/rust-toolchain.toml (and include rust-src for Buck2 toolchains). | |
| components: rustfmt, clippy, rust-src | |
| - name: Setup Buck2 (local) | |
| shell: bash | |
| run: | | |
| set -euxo pipefail | |
| ./scripts/setup_buck2_local.sh | |
| - name: Run Buck2 tests | |
| shell: bash | |
| run: | | |
| set -euxo pipefail | |
| ./scripts/buck2 test //codex-rs/... |