From b195d5578bf4a821016cd68b4f56420ce4bd2369 Mon Sep 17 00:00:00 2001 From: Mishal Shah Date: Fri, 20 Feb 2026 10:24:28 -0800 Subject: [PATCH 1/2] Revert "Add symlinks for backwards compatability (#238)" This reverts commit 27ad4acfa502b0cb8b901532e8294a14b7273988. --- .github/workflows/configs/.flake8 | 1 - .github/workflows/configs/yamllint.yml | 1 - .github/workflows/scripts/check-broken-symlinks.sh | 1 - .github/workflows/scripts/check-docs.sh | 1 - .github/workflows/scripts/check-license-header.sh | 1 - .github/workflows/scripts/check-swift-format.sh | 1 - .github/workflows/scripts/check-unacceptable-language.sh | 1 - .licenseignore | 1 - 8 files changed, 8 deletions(-) delete mode 120000 .github/workflows/configs/.flake8 delete mode 120000 .github/workflows/configs/yamllint.yml delete mode 120000 .github/workflows/scripts/check-broken-symlinks.sh delete mode 120000 .github/workflows/scripts/check-docs.sh delete mode 120000 .github/workflows/scripts/check-license-header.sh delete mode 120000 .github/workflows/scripts/check-swift-format.sh delete mode 120000 .github/workflows/scripts/check-unacceptable-language.sh diff --git a/.github/workflows/configs/.flake8 b/.github/workflows/configs/.flake8 deleted file mode 120000 index 1fa4dde4..00000000 --- a/.github/workflows/configs/.flake8 +++ /dev/null @@ -1 +0,0 @@ -../../actions/python-lint-check/.flake8 \ No newline at end of file diff --git a/.github/workflows/configs/yamllint.yml b/.github/workflows/configs/yamllint.yml deleted file mode 120000 index f193167d..00000000 --- a/.github/workflows/configs/yamllint.yml +++ /dev/null @@ -1 +0,0 @@ -../../actions/yamllint-check/yamllint.yml \ No newline at end of file diff --git a/.github/workflows/scripts/check-broken-symlinks.sh b/.github/workflows/scripts/check-broken-symlinks.sh deleted file mode 120000 index 2f30ee85..00000000 --- a/.github/workflows/scripts/check-broken-symlinks.sh +++ /dev/null @@ -1 +0,0 @@ -../../actions/broken-symlinks-check/check-broken-symlinks.sh \ No newline at end of file diff --git a/.github/workflows/scripts/check-docs.sh b/.github/workflows/scripts/check-docs.sh deleted file mode 120000 index 57f98b5a..00000000 --- a/.github/workflows/scripts/check-docs.sh +++ /dev/null @@ -1 +0,0 @@ -../../actions/docs-check/check-docs.sh \ No newline at end of file diff --git a/.github/workflows/scripts/check-license-header.sh b/.github/workflows/scripts/check-license-header.sh deleted file mode 120000 index f23cfb07..00000000 --- a/.github/workflows/scripts/check-license-header.sh +++ /dev/null @@ -1 +0,0 @@ -../../actions/license-header-check/check-license-header.sh \ No newline at end of file diff --git a/.github/workflows/scripts/check-swift-format.sh b/.github/workflows/scripts/check-swift-format.sh deleted file mode 120000 index d801f2a2..00000000 --- a/.github/workflows/scripts/check-swift-format.sh +++ /dev/null @@ -1 +0,0 @@ -../../actions/format-check/check-swift-format.sh \ No newline at end of file diff --git a/.github/workflows/scripts/check-unacceptable-language.sh b/.github/workflows/scripts/check-unacceptable-language.sh deleted file mode 120000 index 76efc5cf..00000000 --- a/.github/workflows/scripts/check-unacceptable-language.sh +++ /dev/null @@ -1 +0,0 @@ -../../actions/check-unacceptable-language/check-unacceptable-language.sh \ No newline at end of file diff --git a/.licenseignore b/.licenseignore index 5e84d245..d5a53537 100644 --- a/.licenseignore +++ b/.licenseignore @@ -1,5 +1,4 @@ .github/actions/python-lint-check/.flake8 -.github/workflows/configs/.flake **/*.yml CODEOWNERS LICENSE.txt From 52442db12fa8ba5f78c9cc67ea9428ea1646d0c2 Mon Sep 17 00:00:00 2001 From: Mishal Shah Date: Fri, 20 Feb 2026 10:24:36 -0800 Subject: [PATCH 2/2] Revert "Use local copy on action invocation (#236)" This reverts commit c6fcbaf70a845126ec165107a2d509bda17a2fd1. --- .../actions/broken-symlinks-check/action.yml | 8 - .../check-unacceptable-language/action.yml | 8 - .github/actions/docs-check/action.yml | 8 - .github/actions/format-check/action.yml | 8 - .../actions/license-header-check/action.yml | 8 - .github/actions/python-lint-check/action.yml | 14 -- .github/actions/yamllint-check/action.yml | 11 -- .../configs}/.flake8 | 0 .../configs}/yamllint.yml | 0 .../scripts}/check-broken-symlinks.sh | 0 .../scripts}/check-docs.sh | 0 .../scripts}/check-license-header.sh | 0 .../scripts}/check-swift-format.sh | 0 .../scripts}/check-unacceptable-language.sh | 0 .github/workflows/soundness.yml | 162 ++++++++++++++++-- .licenseignore | 2 +- 16 files changed, 145 insertions(+), 84 deletions(-) delete mode 100644 .github/actions/broken-symlinks-check/action.yml delete mode 100644 .github/actions/check-unacceptable-language/action.yml delete mode 100644 .github/actions/docs-check/action.yml delete mode 100644 .github/actions/format-check/action.yml delete mode 100644 .github/actions/license-header-check/action.yml delete mode 100644 .github/actions/python-lint-check/action.yml delete mode 100644 .github/actions/yamllint-check/action.yml rename .github/{actions/python-lint-check => workflows/configs}/.flake8 (100%) rename .github/{actions/yamllint-check => workflows/configs}/yamllint.yml (100%) rename .github/{actions/broken-symlinks-check => workflows/scripts}/check-broken-symlinks.sh (100%) rename .github/{actions/docs-check => workflows/scripts}/check-docs.sh (100%) rename .github/{actions/license-header-check => workflows/scripts}/check-license-header.sh (100%) rename .github/{actions/format-check => workflows/scripts}/check-swift-format.sh (100%) rename .github/{actions/check-unacceptable-language => workflows/scripts}/check-unacceptable-language.sh (100%) diff --git a/.github/actions/broken-symlinks-check/action.yml b/.github/actions/broken-symlinks-check/action.yml deleted file mode 100644 index 988226b1..00000000 --- a/.github/actions/broken-symlinks-check/action.yml +++ /dev/null @@ -1,8 +0,0 @@ -name: broken-symlink-check -description: Check for broken symbolic links -runs: - using: composite - steps: - - name: Run broken symlink check - shell: bash - run: $GITHUB_ACTION_PATH/check-broken-symlinks.sh diff --git a/.github/actions/check-unacceptable-language/action.yml b/.github/actions/check-unacceptable-language/action.yml deleted file mode 100644 index dbefa77d..00000000 --- a/.github/actions/check-unacceptable-language/action.yml +++ /dev/null @@ -1,8 +0,0 @@ -name: check-unacceptable-language -description: Check Language Format -runs: - using: composite - steps: - - name: Run unacceptable language check - shell: bash - run: $GITHUB_ACTION_PATH/check-unacceptable-language.sh diff --git a/.github/actions/docs-check/action.yml b/.github/actions/docs-check/action.yml deleted file mode 100644 index 118e1f93..00000000 --- a/.github/actions/docs-check/action.yml +++ /dev/null @@ -1,8 +0,0 @@ -name: docs-check -description: Check Docs -runs: - using: composite - steps: - - name: Run docs check - shell: bash - run: $GITHUB_ACTION_PATH/check-docs.sh diff --git a/.github/actions/format-check/action.yml b/.github/actions/format-check/action.yml deleted file mode 100644 index 0d7fc86f..00000000 --- a/.github/actions/format-check/action.yml +++ /dev/null @@ -1,8 +0,0 @@ -name: format-check -description: Check Swift Format -runs: - using: composite - steps: - - name: Run format check - shell: bash - run: $GITHUB_ACTION_PATH/check-swift-format.sh diff --git a/.github/actions/license-header-check/action.yml b/.github/actions/license-header-check/action.yml deleted file mode 100644 index c78892b3..00000000 --- a/.github/actions/license-header-check/action.yml +++ /dev/null @@ -1,8 +0,0 @@ -name: license-header-check -description: Check License Headers -runs: - using: composite - steps: - - name: Run license header check - shell: bash - run: $GITHUB_ACTION_PATH/check-license-header.sh diff --git a/.github/actions/python-lint-check/action.yml b/.github/actions/python-lint-check/action.yml deleted file mode 100644 index ac010f43..00000000 --- a/.github/actions/python-lint-check/action.yml +++ /dev/null @@ -1,14 +0,0 @@ -name: python-lint-check -description: Check python files -runs: - using: composite - steps: - - name: Install flake - shell: bash - run: pip3 install flake8 flake8-import-order - - name: Copy flake8 config - shell: bash - run: cp $GITHUB_ACTION_PATH/.flake8 .flake8 - - name: Run flake8 - shell: bash - run: flake8 diff --git a/.github/actions/yamllint-check/action.yml b/.github/actions/yamllint-check/action.yml deleted file mode 100644 index 6a956d45..00000000 --- a/.github/actions/yamllint-check/action.yml +++ /dev/null @@ -1,11 +0,0 @@ -name: yamllint-check -description: Check yaml files -runs: - using: composite - steps: - - name: Install yamllint - shell: bash - run: which yamllint || (apt -q update && apt install -yq yamllint) - - name: Run yaml lint - shell: bash - run: yamllint --strict --config-file $GITHUB_ACTION_PATH/yamllint.yml . diff --git a/.github/actions/python-lint-check/.flake8 b/.github/workflows/configs/.flake8 similarity index 100% rename from .github/actions/python-lint-check/.flake8 rename to .github/workflows/configs/.flake8 diff --git a/.github/actions/yamllint-check/yamllint.yml b/.github/workflows/configs/yamllint.yml similarity index 100% rename from .github/actions/yamllint-check/yamllint.yml rename to .github/workflows/configs/yamllint.yml diff --git a/.github/actions/broken-symlinks-check/check-broken-symlinks.sh b/.github/workflows/scripts/check-broken-symlinks.sh similarity index 100% rename from .github/actions/broken-symlinks-check/check-broken-symlinks.sh rename to .github/workflows/scripts/check-broken-symlinks.sh diff --git a/.github/actions/docs-check/check-docs.sh b/.github/workflows/scripts/check-docs.sh similarity index 100% rename from .github/actions/docs-check/check-docs.sh rename to .github/workflows/scripts/check-docs.sh diff --git a/.github/actions/license-header-check/check-license-header.sh b/.github/workflows/scripts/check-license-header.sh similarity index 100% rename from .github/actions/license-header-check/check-license-header.sh rename to .github/workflows/scripts/check-license-header.sh diff --git a/.github/actions/format-check/check-swift-format.sh b/.github/workflows/scripts/check-swift-format.sh similarity index 100% rename from .github/actions/format-check/check-swift-format.sh rename to .github/workflows/scripts/check-swift-format.sh diff --git a/.github/actions/check-unacceptable-language/check-unacceptable-language.sh b/.github/workflows/scripts/check-unacceptable-language.sh similarity index 100% rename from .github/actions/check-unacceptable-language/check-unacceptable-language.sh rename to .github/workflows/scripts/check-unacceptable-language.sh diff --git a/.github/workflows/soundness.yml b/.github/workflows/soundness.yml index 4c543663..c1b7b59a 100644 --- a/.github/workflows/soundness.yml +++ b/.github/workflows/soundness.yml @@ -118,7 +118,7 @@ jobs: timeout-minutes: 40 steps: - name: Checkout repository - uses: actions/checkout@v6 + uses: actions/checkout@v4 with: # This is set to true since swift package diagnose-api-breaking-changes is # cloning the repo again and without it being set to true this job won't work for @@ -158,17 +158,31 @@ jobs: timeout-minutes: 20 steps: - name: Checkout repository - uses: actions/checkout@v6 + uses: actions/checkout@v4 with: persist-credentials: false submodules: true + - name: Checkout swiftlang/github-workflows repository + if: ${{ github.repository != 'swiftlang/github-workflows' }} + uses: actions/checkout@v4 + with: + repository: swiftlang/github-workflows + path: github-workflows + - name: Determine script-root path + id: script_path + run: | + if [ "${{ github.repository }}" = "swiftlang/github-workflows" ]; then + echo "root=$GITHUB_WORKSPACE" >> $GITHUB_OUTPUT + else + echo "root=$GITHUB_WORKSPACE/github-workflows" >> $GITHUB_OUTPUT + fi - name: Pre-build if: ${{ inputs.linux_pre_build_command }} run: ${{ inputs.linux_pre_build_command }} - name: Run documentation check env: ADDITIONAL_DOCC_ARGUMENTS: ${{ inputs.docs_check_additional_arguments }} - uses: ./.github/actions/docs-check + run: ${{ steps.script_path.outputs.root }}/.github/workflows/scripts/check-docs.sh docs-check-macos: name: Documentation check (macOS) @@ -177,10 +191,24 @@ jobs: timeout-minutes: 20 steps: - name: Checkout repository - uses: actions/checkout@v6 + uses: actions/checkout@v4 with: persist-credentials: false submodules: true + - name: Checkout swiftlang/github-workflows repository + if: ${{ github.repository != 'swiftlang/github-workflows' }} + uses: actions/checkout@v4 + with: + repository: swiftlang/github-workflows + path: github-workflows + - name: Determine script-root path + id: script_path + run: | + if [ "${{ github.repository }}" = "swiftlang/github-workflows" ]; then + echo "root=$GITHUB_WORKSPACE" >> $GITHUB_OUTPUT + else + echo "root=$GITHUB_WORKSPACE/github-workflows" >> $GITHUB_OUTPUT + fi - name: Select Xcode run: echo "DEVELOPER_DIR=/Applications/Xcode_${{ inputs.docs_check_macos_xcode_version }}.app" >> $GITHUB_ENV - name: Swift version @@ -190,7 +218,7 @@ jobs: - name: Run documentation check env: ADDITIONAL_DOCC_ARGUMENTS: ${{ inputs.docs_check_macos_additional_arguments }} - uses: ./.github/actions/docs-check + run: ${{ steps.script_path.outputs.root }}/.github/workflows/scripts/check-docs.sh unacceptable-language-check: name: Unacceptable language check @@ -199,14 +227,28 @@ jobs: timeout-minutes: 1 steps: - name: Checkout repository - uses: actions/checkout@v6 + uses: actions/checkout@v4 with: persist-credentials: false submodules: true + - name: Checkout swiftlang/github-workflows repository + if: ${{ github.repository != 'swiftlang/github-workflows' }} + uses: actions/checkout@v4 + with: + repository: swiftlang/github-workflows + path: github-workflows + - name: Determine script-root path + id: script_path + run: | + if [ "${{ github.repository }}" = "swiftlang/github-workflows" ]; then + echo "root=$GITHUB_WORKSPACE" >> $GITHUB_OUTPUT + else + echo "root=$GITHUB_WORKSPACE/github-workflows" >> $GITHUB_OUTPUT + fi - name: Run unacceptable language check env: UNACCEPTABLE_WORD_LIST: ${{ inputs.unacceptable_language_check_word_list}} - uses: ./.github/actions/check-unacceptable-language + run: ${{ steps.script_path.outputs.root }}/.github/workflows/scripts/check-unacceptable-language.sh license-header-check: name: License headers check @@ -215,14 +257,28 @@ jobs: timeout-minutes: 1 steps: - name: Checkout repository - uses: actions/checkout@v6 + uses: actions/checkout@v4 with: persist-credentials: false submodules: true + - name: Checkout swiftlang/github-workflows repository + if: ${{ github.repository != 'swiftlang/github-workflows' }} + uses: actions/checkout@v4 + with: + repository: swiftlang/github-workflows + path: github-workflows + - name: Determine script-root path + id: script_path + run: | + if [ "${{ github.repository }}" = "swiftlang/github-workflows" ]; then + echo "root=$GITHUB_WORKSPACE" >> $GITHUB_OUTPUT + else + echo "root=$GITHUB_WORKSPACE/github-workflows" >> $GITHUB_OUTPUT + fi - name: Run license header check env: PROJECT_NAME: ${{ inputs.license_header_check_project_name }} - uses: ./.github/actions/license-header-check + run: ${{ steps.script_path.outputs.root }}/.github/workflows/scripts/check-license-header.sh broken-symlink-check: name: Broken symlinks check @@ -231,12 +287,26 @@ jobs: timeout-minutes: 1 steps: - name: Checkout repository - uses: actions/checkout@v6 + uses: actions/checkout@v4 with: persist-credentials: false submodules: true + - name: Checkout swiftlang/github-workflows repository + if: ${{ github.repository != 'swiftlang/github-workflows' }} + uses: actions/checkout@v4 + with: + repository: swiftlang/github-workflows + path: github-workflows + - name: Determine script-root path + id: script_path + run: | + if [ "${{ github.repository }}" = "swiftlang/github-workflows" ]; then + echo "root=$GITHUB_WORKSPACE" >> $GITHUB_OUTPUT + else + echo "root=$GITHUB_WORKSPACE/github-workflows" >> $GITHUB_OUTPUT + fi - name: Run broken symlinks check - uses: ./.github/actions/broken-symlinks-check + run: ${{ steps.script_path.outputs.root }}/.github/workflows/scripts/check-broken-symlinks.sh format-check: name: Format check @@ -247,15 +317,29 @@ jobs: timeout-minutes: 20 steps: - name: Checkout repository - uses: actions/checkout@v6 + uses: actions/checkout@v4 with: persist-credentials: false submodules: true + - name: Checkout swiftlang/github-workflows repository + if: ${{ github.repository != 'swiftlang/github-workflows' }} + uses: actions/checkout@v4 + with: + repository: swiftlang/github-workflows + path: github-workflows + - name: Determine script-root path + id: script_path + run: | + if [ "${{ github.repository }}" = "swiftlang/github-workflows" ]; then + echo "root=$GITHUB_WORKSPACE" >> $GITHUB_OUTPUT + else + echo "root=$GITHUB_WORKSPACE/github-workflows" >> $GITHUB_OUTPUT + fi - name: Mark the workspace as safe # https://github.com/actions/checkout/issues/766 run: git config --global --add safe.directory ${GITHUB_WORKSPACE} - name: Run format check - uses: ./.github/actions/format-check + run: ${{ steps.script_path.outputs.root }}/.github/workflows/scripts/check-swift-format.sh shell-check: name: Shell check @@ -268,7 +352,7 @@ jobs: - name: Install git run: which git || (apt -q update && apt -yq install git) - name: Checkout repository - uses: actions/checkout@v6 + uses: actions/checkout@v4 with: persist-credentials: false submodules: true @@ -287,12 +371,33 @@ jobs: timeout-minutes: 5 steps: - name: Checkout repository - uses: actions/checkout@v6 + uses: actions/checkout@v4 with: persist-credentials: false submodules: true + - name: Checkout swiftlang/github-workflows repository + if: ${{ github.repository != 'swiftlang/github-workflows' }} + uses: actions/checkout@v4 + with: + repository: swiftlang/github-workflows + path: github-workflows + - name: Determine script-root path + id: script_path + run: | + if [ "${{ github.repository }}" = "swiftlang/github-workflows" ]; then + echo "root=$GITHUB_WORKSPACE" >> $GITHUB_OUTPUT + else + echo "root=$GITHUB_WORKSPACE/github-workflows" >> $GITHUB_OUTPUT + fi - name: Run yamllint - uses: ./.github/actions/yamllint-check + run: | + which yamllint || (apt -q update && apt install -yq yamllint) + cd ${GITHUB_WORKSPACE} + if [ ! -f ".yamllint.yml" ]; then + echo "Downloading default yamllint config file" + cat ${{ steps.script_path.outputs.root }}/.github/workflows/configs/yamllint.yml > .yamllint.yml + fi + yamllint --strict --config-file .yamllint.yml . python-lint-check: name: Python lint check @@ -301,9 +406,30 @@ jobs: timeout-minutes: 5 steps: - name: Checkout repository - uses: actions/checkout@v6 + uses: actions/checkout@v4 with: persist-credentials: false submodules: true + - name: Checkout swiftlang/github-workflows repository + if: ${{ github.repository != 'swiftlang/github-workflows' }} + uses: actions/checkout@v4 + with: + repository: swiftlang/github-workflows + path: github-workflows + - name: Determine script-root path + id: script_path + run: | + if [ "${{ github.repository }}" = "swiftlang/github-workflows" ]; then + echo "root=$GITHUB_WORKSPACE" >> $GITHUB_OUTPUT + else + echo "root=$GITHUB_WORKSPACE/github-workflows" >> $GITHUB_OUTPUT + fi - name: Run flake8 - uses: ./.github/actions/python-lint-check + run: | + pip3 install flake8 flake8-import-order + cd ${GITHUB_WORKSPACE} + if [ ! -f ".flake8" ]; then + echo "Downloading default flake8 config file" + cat ${{ steps.script_path.outputs.root }}/.github/workflows/configs/.flake8 > .flake8 + fi + flake8 diff --git a/.licenseignore b/.licenseignore index d5a53537..ee4247a1 100644 --- a/.licenseignore +++ b/.licenseignore @@ -1,4 +1,4 @@ -.github/actions/python-lint-check/.flake8 +.github/workflows/configs/.flake8 **/*.yml CODEOWNERS LICENSE.txt