name: Changes # Decides which jobs a run of Build Core or Build Packages needs. Their gates must fail when this did not succeed. on: workflow_call: outputs: rust: description: true on a push, or when a pull request changes the Rust crates, native code, the ABI or table generator, the video fixtures the crates' tests read, or the CI that tests them value: ${{ jobs.changes.outputs.rust }} rust_only: description: true when a pull request changes files only under packages/rust/ value: ${{ jobs.changes.outputs.rust_only }} native: description: true on a push, or when a pull request changes the native inputs, which only a host build tests value: ${{ jobs.changes.outputs.native }} core: description: true when the core library, the shared toolchain or the repository configuration changed value: ${{ jobs.changes.outputs.core }} react: description: true when the React package or something it builds against changed value: ${{ jobs.changes.outputs.react }} solid: description: true when the Solid package or something it builds against changed value: ${{ jobs.changes.outputs.solid }} keymap: description: true when the keymap package or something it builds against changed value: ${{ jobs.changes.outputs.keymap }} qrcode: description: true when the QRCode package or something it builds against changed value: ${{ jobs.changes.outputs.qrcode }} three: description: true when the Three package or something it builds against changed value: ${{ jobs.changes.outputs.three }} ssh: description: true when the SSH package or something it builds against changed value: ${{ jobs.changes.outputs.ssh }} permissions: contents: read jobs: changes: name: Changes runs-on: blacksmith-4vcpu-ubuntu-2404 outputs: rust: ${{ steps.changes.outputs.rust }} rust_only: ${{ steps.changes.outputs.rust_only }} native: ${{ steps.changes.outputs.native }} core: ${{ steps.changes.outputs.core }} react: ${{ steps.changes.outputs.react }} solid: ${{ steps.changes.outputs.solid }} keymap: ${{ steps.changes.outputs.keymap }} qrcode: ${{ steps.changes.outputs.qrcode }} three: ${{ steps.changes.outputs.three }} ssh: ${{ steps.changes.outputs.ssh }} steps: # The pull request's merge commit and its parents, without file contents outside scripts/. - name: Checkout code uses: actions/checkout@v6 with: fetch-depth: 2 filter: blob:none sparse-checkout: scripts # The merge commit's first parent is the base branch as GitHub merged it. bash, not the default bash -e, # so that pipefail fails the job when the script fails. - name: Find changed paths id: changes shell: bash env: EVENT: ${{ github.event_name }} run: sh scripts/ci-changes.sh "$EVENT" HEAD^1 HEAD | tee -a "$GITHUB_OUTPUT"