Skip to content

Commit 116e5b8

Browse files
committed
docc validation needs JAVA_HOME to be set up
1 parent 0d5dcb7 commit 116e5b8

File tree

2 files changed

+25
-3
lines changed

2 files changed

+25
-3
lines changed

.github/actions/prepare_env/action.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ runs:
2626
elif [[ -n "$JAVA_HOME_24_ARM64" ]]; then
2727
echo "JAVA_HOME_24=$JAVA_HOME_24_ARM64" >> $GITHUB_ENV
2828
fi
29-
- name: Check Java environment
30-
shell: bash
31-
run: ./gradlew -q javaToolchains
29+
# - name: Check Java environment
30+
# shell: bash
31+
# run: ./gradlew -q javaToolchains
3232
- name: Cache local SwiftPM repository
3333
if: matrix.os_version == 'jammy'
3434
uses: actions/cache@v4

.github/workflows/pull_request.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,28 @@ jobs:
1313
# FIXME: Something is off with the format task and it gets "stuck", need to investigate
1414
format_check_enabled: false
1515
license_header_check_project_name: Swift.org
16+
# Since we need JAVA_HOME to be set up for building the project and depending on a different workflow won't
17+
# give us that, we disable the checking and make a separate job that performs docs validation
18+
docs_check_enabled: false
19+
20+
# This replicates 'docs-check' from https://github.com/swiftlang/github-workflows/blob/main/.github/workflows/soundness.yml
21+
# because we need to set up environment so we can build the SwiftJava project (including Java runtime/dependencies).
22+
soundness-docs:
23+
name: Documentation check
24+
runs-on: ubuntu-latest
25+
strategy:
26+
fail-fast: true
27+
matrix:
28+
swift_version: ['6.1.2']
29+
jdk_vendor: ['corretto']
30+
steps:
31+
- uses: actions/checkout@v4
32+
- name: Prepare CI Environment
33+
uses: ./.github/actions/prepare_env
34+
- name: Run documentation check
35+
run: |
36+
which curl || (apt -q update && apt -yq install curl)
37+
curl -s --retry 3 https://raw.githubusercontent.com/swiftlang/github-workflows/refs/heads/main/.github/workflows/scripts/check-docs.sh | bash
1638
1739
test-java:
1840
name: Test (Java) (${{ matrix.os_version }} swift:${{ matrix.swift_version }} jdk:${{matrix.jdk_vendor}})

0 commit comments

Comments
 (0)