feat: support local development using Buck2 #15
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: 30 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| # 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: Install system deps (Linux) | |
| shell: bash | |
| run: | | |
| set -euxo pipefail | |
| sudo apt-get update | |
| sudo apt-get install -y pkg-config libssl-dev | |
| - 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 --test-executor-stdout=- --test-executor-stderr=- //codex-rs/... | |
| - name: Run Buck2 tests again to see how long no-op runs take | |
| shell: bash | |
| run: | | |
| set -euxo pipefail | |
| ./scripts/buck2 test --test-executor-stdout=- --test-executor-stderr=- //codex-rs/... |