review #545280 (-a anubis.tests) #1546
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: review | |
| run-name: "review #${{ inputs.pr }}${{ inputs.extra-args && format(' ({0})', inputs.extra-args) || '' }}" | |
| permissions: {} | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| pr: | |
| description: "Pull Request Number" | |
| required: true | |
| type: string | |
| x86_64-linux: | |
| description: "Run on x86_64-linux" | |
| required: true | |
| type: boolean | |
| default: true | |
| aarch64-linux: | |
| description: "Run on aarch64-linux" | |
| required: true | |
| type: boolean | |
| default: true | |
| x86_64-darwin: | |
| description: "Run on x86_64-darwin" | |
| required: true | |
| type: choice | |
| default: yes_sandbox_relaxed | |
| options: | |
| - "no" | |
| - yes_sandbox_false | |
| - yes_sandbox_relaxed | |
| - yes_sandbox_true | |
| aarch64-darwin: | |
| description: "Run on aarch64-darwin" | |
| required: true | |
| type: choice | |
| default: yes_sandbox_relaxed | |
| options: | |
| - "no" | |
| - yes_sandbox_false | |
| - yes_sandbox_relaxed | |
| - yes_sandbox_true | |
| riscv64-linux: | |
| description: "Run on riscv64-linux (RISE runners)" | |
| required: true | |
| type: boolean | |
| default: false | |
| builders: | |
| description: "Nix builders to use" | |
| required: true | |
| type: choice | |
| default: "gha" | |
| options: | |
| - "gha" | |
| - "remote" | |
| - "both" | |
| extra-args: | |
| description: "nixpkgs-review extra args" | |
| required: false | |
| type: string | |
| push-to-cache: | |
| description: "Push to cache" | |
| required: true | |
| type: boolean | |
| default: true | |
| upterm: | |
| description: "Start upterm session after nixpkgs-review" | |
| required: true | |
| type: boolean | |
| default: false | |
| post-result: | |
| description: "Post Result" | |
| required: true | |
| type: boolean | |
| default: true | |
| on-success: | |
| description: "What to do on review success" | |
| required: true | |
| type: choice | |
| default: nothing | |
| options: | |
| - nothing | |
| - mark_as_ready | |
| - approve | |
| - merge | |
| jobs: | |
| prepare: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| pr: ${{ steps.prepare.outputs.pr }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| sparse-checkout-cone-mode: false | |
| sparse-checkout: | | |
| /.github/actions | |
| /review | |
| - name: setup nu | |
| uses: ./.github/actions/setup-nu | |
| - run: nu review/prepare.nu | |
| id: prepare | |
| env: | |
| GITHUB_TOKEN: ${{ github.token }} | |
| INPUTS: ${{ toJSON(github.event.inputs) }} | |
| HAS_GH_TOKEN: ${{ secrets.GH_TOKEN != '' && '1' || '0' }} | |
| review: | |
| needs: [prepare] | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| system: | |
| - x86_64-linux | |
| - aarch64-linux | |
| - x86_64-darwin | |
| - aarch64-darwin | |
| - riscv64-linux | |
| exclude: | |
| - system: ${{ !inputs.x86_64-linux && 'x86_64-linux' || '' }} | |
| - system: ${{ !inputs.aarch64-linux && 'aarch64-linux' || '' }} | |
| - system: ${{ inputs.x86_64-darwin == 'no' && 'x86_64-darwin' || '' }} | |
| - system: ${{ inputs.aarch64-darwin == 'no' && 'aarch64-darwin' || '' }} | |
| - system: ${{ !inputs.riscv64-linux && 'riscv64-linux' || '' }} | |
| runs-on: >- | |
| ${{ (matrix.system == 'x86_64-linux' && 'ubuntu-latest') | |
| || (matrix.system == 'aarch64-linux' && 'ubuntu-24.04-arm') | |
| || (matrix.system == 'x86_64-darwin' && 'macos-latest') | |
| || (matrix.system == 'aarch64-darwin' && 'macos-latest') | |
| || (matrix.system == 'riscv64-linux' && 'ubuntu-24.04-riscv') }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| sparse-checkout-cone-mode: false | |
| sparse-checkout: | | |
| /.github/actions | |
| /review | |
| /flake.lock | |
| /flake.nix | |
| /patches | |
| /drv-build-support.nix | |
| - name: setup nu | |
| uses: ./.github/actions/setup-nu | |
| - name: setup nix | |
| uses: ./.github/actions/setup-nix | |
| with: | |
| extra-nix-config: ${{ vars.EXTRA_NIX_CONFIG }} | |
| system: ${{ matrix.system }} | |
| sandbox: ${{ | |
| (matrix.system == 'x86_64-darwin' && inputs.x86_64-darwin == 'yes_sandbox_false' | |
| || matrix.system == 'aarch64-darwin' && inputs.aarch64-darwin == 'yes_sandbox_false') && 'false' | |
| || (matrix.system == 'x86_64-darwin' && inputs.x86_64-darwin == 'yes_sandbox_relaxed' | |
| || matrix.system == 'aarch64-darwin' && inputs.aarch64-darwin == 'yes_sandbox_relaxed') && 'relaxed' | |
| || 'true' }} | |
| builders: ${{ inputs.builders != 'gha' && vars.BUILDERS || '' }} | |
| ssh-key: ${{ inputs.builders != 'gha' && secrets.SSH_KEY || '' }} | |
| ssh-cert: ${{ inputs.builders != 'gha' && secrets.SSH_CERT || '' }} | |
| - name: clone nixpkgs | |
| uses: actions/checkout@v6 | |
| with: | |
| repository: NixOS/nixpkgs | |
| path: nixpkgs | |
| persist-credentials: false | |
| - run: nu review/review.nu | |
| env: | |
| GITHUB_TOKEN: ${{ github.token }} | |
| INPUTS: ${{ toJSON(github.event.inputs) }} | |
| ATTIC_SERVER: ${{ vars.ATTIC_SERVER }} | |
| ATTIC_CACHE: ${{ vars.ATTIC_CACHE }} | |
| ATTIC_TOKEN: ${{ secrets.ATTIC_TOKEN }} | |
| CACHIX_CACHE: ${{ vars.CACHIX_CACHE }} | |
| CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }} | |
| CACHIX_SIGNING_KEY: ${{ secrets.CACHIX_SIGNING_KEY }} | |
| PR_JSON: ${{ needs.prepare.outputs.pr }} | |
| IDENTIFY_STILL_FAILING_PACKAGES: ${{ vars.IDENTIFY_STILL_FAILING_PACKAGES }} | |
| IDENTIFY_UNSUPPORTED_PACKAGES: ${{ vars.IDENTIFY_UNSUPPORTED_PACKAGES }} | |
| - uses: actions/upload-artifact@v7 | |
| with: | |
| name: report_${{ matrix.system }}.json | |
| path: report_${{ matrix.system }}.json | |
| if-no-files-found: error | |
| archive: false | |
| - name: start upterm session | |
| if: ${{ inputs.upterm }} | |
| uses: owenthereal/action-upterm@v1 | |
| with: | |
| limit-access-to-actor: true | |
| report: | |
| runs-on: ubuntu-latest | |
| needs: [prepare, review] | |
| permissions: | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| sparse-checkout-cone-mode: false | |
| sparse-checkout: | | |
| /.github/actions | |
| /review | |
| - name: setup nu | |
| uses: ./.github/actions/setup-nu | |
| - uses: actions/download-artifact@v8 | |
| with: | |
| merge-multiple: true | |
| - run: nu review/report.nu | |
| env: | |
| GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
| INPUTS: ${{ toJSON(github.event.inputs) }} | |
| PR_JSON: ${{ needs.prepare.outputs.pr }} | |
| REPO: ${{ github.repository }} | |
| RUN_ID: ${{ github.run_id }} | |
| RUN_ATTEMPT: ${{ github.run_attempt }} | |
| SHA: ${{ github.workflow_sha }} | |
| API_URL: ${{ vars.API_URL }} | |
| - uses: actions/upload-artifact@v7 | |
| with: | |
| name: reports.json | |
| path: reports.json | |
| if-no-files-found: error | |
| archive: false | |
| - uses: actions/upload-artifact@v7 | |
| with: | |
| name: report.md | |
| path: report.md | |
| if-no-files-found: error | |
| archive: false |