Repository navigation
fix(ios): stop capped reads downloading the rest, apply query timeouts and refuse unreadable SSH host keys #2199
Workflow file for this run
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: CI | |
| # The one entry point for the test and lint workflows on a change. The CI job at the end is the required check. | |
| on: | |
| pull_request: | |
| push: | |
| branches: [main, 'release/**'] | |
| workflow_dispatch: | |
| # A pull request keeps only its newest run. main runs one at a time, and a newer pending run replaces the older one. | |
| # Each release/** commit and each dispatch gets its own group, so none is replaced. | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.pull_request.number) || github.event_name == 'workflow_dispatch' && format('dispatch-{0}', github.run_id) || github.ref == 'refs/heads/main' && github.ref || format('{0}-{1}', github.ref, github.sha) }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| permissions: | |
| contents: read | |
| jobs: | |
| plan: | |
| name: Plan | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| permissions: | |
| contents: read | |
| actions: read | |
| outputs: | |
| macos: ${{ steps.decide.outputs.macos }} | |
| plugins: ${{ steps.decide.outputs.plugins }} | |
| ios: ${{ steps.decide.outputs.ios }} | |
| oracle: ${{ steps.decide.outputs.oracle }} | |
| hana: ${{ steps.decide.outputs.hana }} | |
| swiftlint: ${{ steps.decide.outputs.swiftlint }} | |
| linux: ${{ steps.decide.outputs.linux }} | |
| linux-docs: ${{ steps.decide.outputs.linux-docs }} | |
| linux-deps: ${{ steps.decide.outputs.linux-deps }} | |
| packages: ${{ steps.decide.outputs.packages }} | |
| core: ${{ steps.decide.outputs.core }} | |
| windows: ${{ steps.decide.outputs.windows }} | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| # A push compares with the last commit a CI push run on its own branch passed on, so a commit whose run was | |
| # replaced or failed is tested again, and a release line's changelog commit runs Lint only. None, as on the first | |
| # push of a release line, one on HEAD itself, or a dispatch runs everything. | |
| - name: Find the base | |
| id: base | |
| env: | |
| EVENT: ${{ github.event_name }} | |
| PR_BASE: ${{ github.event.pull_request.base.sha }} | |
| BRANCH: ${{ github.ref_name }} | |
| GH_TOKEN: ${{ github.token }} | |
| REPOSITORY: ${{ github.repository }} | |
| run: | | |
| set -euo pipefail | |
| base="" | |
| case "$EVENT" in | |
| pull_request) base="$PR_BASE" ;; | |
| push) | |
| passed="$(gh api "repos/$REPOSITORY/actions/workflows/ci.yml/runs?branch=$BRANCH&event=push&status=success&per_page=1" \ | |
| --jq '.workflow_runs[0].head_sha // ""')" | |
| if [ -n "$passed" ] && [ "$passed" != "$(git rev-parse HEAD)" ] && git merge-base --is-ancestor "$passed" HEAD; then | |
| base="$passed" | |
| fi | |
| ;; | |
| esac | |
| echo "Base: ${base:-none, so every suite runs}" | |
| echo "base=$base" >> "$GITHUB_OUTPUT" | |
| # Linux ships from main or linux-X.Y, and the core and the Windows app have no release line, so a release/** push | |
| # or a pull request into one skips them. | |
| - name: Decide which suites run | |
| id: decide | |
| env: | |
| BASE: ${{ steps.base.outputs.base }} | |
| REF: ${{ github.ref }} | |
| BASE_REF: ${{ github.base_ref }} | |
| run: | | |
| set -euo pipefail | |
| release_line=false | |
| case "$REF" in refs/heads/release/*) release_line=true ;; esac | |
| case "$BASE_REF" in release/*) release_line=true ;; esac | |
| for suite in macos plugins ios oracle hana swiftlint linux linux-docs linux-deps packages core windows; do | |
| verdict="$(scripts/ci/detect-changed-paths.sh --base "$BASE" "$suite")" | |
| case "$suite" in | |
| linux | linux-docs | linux-deps | packages | core | windows) [ "$release_line" = false ] || verdict=false ;; | |
| esac | |
| echo "$suite=$verdict" | |
| echo "$suite=$verdict" >> "$GITHUB_OUTPUT" | |
| done | |
| lint: | |
| needs: plan | |
| permissions: | |
| contents: read | |
| pull-requests: read | |
| uses: ./.github/workflows/ci-lint.yml | |
| with: | |
| swiftlint: ${{ needs.plan.outputs.swiftlint == 'true' }} | |
| hana: ${{ needs.plan.outputs.hana == 'true' }} | |
| macos: | |
| needs: plan | |
| if: needs.plan.outputs.macos == 'true' | |
| uses: ./.github/workflows/macos-tests.yml | |
| with: | |
| plugins: ${{ needs.plan.outputs.plugins == 'true' }} | |
| ios: | |
| needs: plan | |
| if: needs.plan.outputs.ios == 'true' | |
| uses: ./.github/workflows/ios-tests.yml | |
| with: | |
| oracle: ${{ needs.plan.outputs.oracle == 'true' }} | |
| linux: | |
| needs: plan | |
| if: needs.plan.outputs.linux-docs == 'true' | |
| uses: ./.github/workflows/build-linux.yml | |
| with: | |
| docs-only: ${{ needs.plan.outputs.linux != 'true' }} | |
| dependencies: ${{ needs.plan.outputs.linux-deps == 'true' }} | |
| # The clean distribution builds, when a change touches what the packages declare or how they build. A source change | |
| # alone leaves them to the nightly. | |
| packages: | |
| needs: plan | |
| if: needs.plan.outputs.packages == 'true' | |
| uses: ./.github/workflows/linux-packages.yml | |
| core: | |
| needs: plan | |
| if: needs.plan.outputs.core == 'true' | |
| uses: ./.github/workflows/core.yml | |
| with: | |
| extended: false | |
| windows: | |
| needs: plan | |
| if: needs.plan.outputs.windows == 'true' | |
| uses: ./.github/workflows/windows.yml | |
| # Fails on a failed or cancelled job, and on a job the plan selected that did not succeed. A job the plan left out | |
| # is skipped, which passes. | |
| ci: | |
| name: CI | |
| needs: [plan, lint, macos, ios, linux, packages, core, windows] | |
| if: always() | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| steps: | |
| - name: Every selected job passed | |
| env: | |
| PLAN: ${{ needs.plan.result }} | |
| LINT: ${{ needs.lint.result }} | |
| MACOS: ${{ needs.macos.result }} | |
| IOS: ${{ needs.ios.result }} | |
| LINUX: ${{ needs.linux.result }} | |
| PACKAGES: ${{ needs.packages.result }} | |
| CORE: ${{ needs.core.result }} | |
| WINDOWS: ${{ needs.windows.result }} | |
| WANT_MACOS: ${{ needs.plan.outputs.macos }} | |
| WANT_IOS: ${{ needs.plan.outputs.ios }} | |
| WANT_LINUX: ${{ needs.plan.outputs.linux-docs }} | |
| WANT_PACKAGES: ${{ needs.plan.outputs.packages }} | |
| WANT_CORE: ${{ needs.plan.outputs.core }} | |
| WANT_WINDOWS: ${{ needs.plan.outputs.windows }} | |
| run: | | |
| status=0 | |
| check() { | |
| case "$2" in | |
| failure | cancelled) echo "::error::$1 ended $2"; status=1 ;; | |
| success) echo "$1: success" ;; | |
| *) | |
| if [ "$3" = true ]; then | |
| echo "::error::$1 was selected and ended ${2:-without a result}" | |
| status=1 | |
| else | |
| echo "$1: $2, not selected" | |
| fi | |
| ;; | |
| esac | |
| } | |
| check plan "$PLAN" true | |
| check lint "$LINT" true | |
| check macos "$MACOS" "$WANT_MACOS" | |
| check ios "$IOS" "$WANT_IOS" | |
| check linux "$LINUX" "$WANT_LINUX" | |
| check packages "$PACKAGES" "$WANT_PACKAGES" | |
| check core "$CORE" "$WANT_CORE" | |
| check windows "$WINDOWS" "$WANT_WINDOWS" | |
| exit "$status" |