GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — jonoffcpu/.github/workflows/ci.yml at main · jonoffcpu/jonoffcpu 164 lines (156 loc) · 6.38 KB / Copy pathci.ymlFile metadata and controls164 lines (156 loc) · 6.38 KB 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 name: CI on: pull_request: push: branches: - main workflow_dispatch: permissions: contents: read # A newer push supersedes a pull request's build. Builds of main always finish: only they save the # Gradle, configuration and Docker layer caches that every other build restores. concurrency: group: ci-${{ github.ref }} cancel-in-progress: ${{ github.event_name == 'pull_request' }} jobs: # Whether the change touches documentation, and whether it touches only documentation, as # .github/changes-filter.yaml defines it. A pull request's files come from the API; a push to main is compared with # the commit before the push. A manual run builds everything, and its build runs the documentation test too. changes: name: Detect changes runs-on: ubuntu-26.04 timeout-minutes: 5 permissions: contents: read # paths-filter lists a pull request's changed files through the API. pull-requests: read outputs: docs_changed: ${{ steps.filter.outputs.docs }} docs_only: ${{ steps.docs-only.outputs.docs_only }} steps: - uses: actions/checkout@v7 with: persist-credentials: false # Only the counts are used, never the file names, so no file name reaches a shell. - uses: dorny/paths-filter@ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d # v4.0.3 id: filter if: github.event_name != 'workflow_dispatch' with: filters: .github/changes-filter.yaml predicate-quantifier: some-with-excludes - name: Decide whether the change is documentation only id: docs-only env: ALL_COUNT: ${{ steps.filter.outputs.all_count }} DOCS_COUNT: ${{ steps.filter.outputs.docs_count }} run: | if [[ "${ALL_COUNT:-0}" -gt 0 && "$ALL_COUNT" == "$DOCS_COUNT" ]]; then docs_only=true else docs_only=false fi echo "Changed files: ${ALL_COUNT:-unknown}, documentation: ${DOCS_COUNT:-unknown}, documentation only: $docs_only" echo "docs_only=$docs_only" >> "$GITHUB_OUTPUT" build-and-verify: name: Build and verify needs: changes if: needs.changes.outputs.docs_only != 'true' # The reusable workflow's setup-gradle comments on a pull request whose build fails. permissions: contents: read pull-requests: write uses: ./.github/workflows/build-and-verify.yml with: native_artifact_prefix: native runnable_artifact_name: jonoffcpu-runnable-jars secrets: GRADLE_ENCRYPTION_KEY: ${{ secrets.GRADLE_ENCRYPTION_KEY }} # The README and docs pages against the correlator's parser, and their links, for a change that touches # documentation. A documentation-only change skips the build, so this is its only check; the build runs the same test # in jvmCheck, which also covers a code change that breaks the documentation. docs: name: Documentation check needs: changes if: needs.changes.outputs.docs_changed == 'true' runs-on: ubuntu-26.04 timeout-minutes: 15 permissions: contents: read pull-requests: write steps: # No submodules: the correlator reads only the async-profiler gitlink. - uses: actions/checkout@v7 with: persist-credentials: false - uses: actions/setup-java@v6 with: distribution: corretto java-version: 25 # As in build-and-verify.yml: caches are saved only from the default branch, and a failed build is summarized # on the pull request. - uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6.3.0 with: cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }} build-scan-publish: true build-scan-terms-of-use-url: https://gradle.com/terms-of-service build-scan-terms-of-use-agree: "yes" add-job-summary-as-pr-comment: on-failure - name: Check the documentation run: ./gradlew :jonoffcpu-correlator:readmeTest --no-daemon # actionlint checks the workflows' syntax, expressions and shell scripts (with shellcheck), and # zizmor audits them for security problems such as template injection and excessive permissions. lint-workflows: name: Lint workflows runs-on: ubuntu-26.04 timeout-minutes: 10 steps: - uses: actions/checkout@v7 with: persist-credentials: false - name: Run actionlint run: >- docker run --rm --volume "$PWD:/repo" --workdir /repo rhysd/actionlint:1.7.12@sha256:b1934ee5f1c509618f2508e6eb47ee0d3520686341fec936f3b79331f9315667 -color - uses: zizmorcore/zizmor-action@cc914d7f3750a2d13d75c7f184a1060aa0e9d482 # v0.6.4 with: advanced-security: false annotations: true # The single status check that branch protection requires before a pull request can merge, so # adding or renaming jobs never changes the protection rule. It always runs and fails unless every # job it needs succeeded: a skipped job would otherwise let a skipped check count as passing. The accepted # skips are the build of a documentation-only change and the documentation check of a change without # documentation. all-checks-passed: name: All checks passed needs: - changes - build-and-verify - docs - lint-workflows if: always() runs-on: ubuntu-26.04 timeout-minutes: 5 steps: - name: Require every needed job to succeed env: NEEDS: ${{ toJSON(needs) }} DOCS_CHANGED: ${{ needs.changes.outputs.docs_changed }} DOCS_ONLY: ${{ needs.changes.outputs.docs_only }} run: | failed=$(jq -r --arg docs_changed "$DOCS_CHANGED" --arg docs_only "$DOCS_ONLY" ' to_entries[] | select(.value.result != "success") | select(.key != "build-and-verify" or .value.result != "skipped" or $docs_only != "true") | select(.key != "docs" or .value.result != "skipped" or $docs_changed == "true") | "\(.key): \(.value.result)"' <<< "$NEEDS") if [[ -n "$failed" ]]; then echo "Jobs that did not succeed:" >&2 echo "$failed" >&2 exit 1 fi if [[ "$DOCS_ONLY" == "true" ]]; then echo "Documentation-only change: the build was skipped, and every other needed job succeeded." else echo "All needed jobs succeeded." fi |
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |