Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/scripts/check-docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ if [ ! -f .spi.yml ]; then
fi

if ! command -v yq &> /dev/null; then
fatal "yq could not be found. Please install yq to proceed."
apt -q update && apt -yq install yq
fi

package_files=$(find . -maxdepth 1 -name 'Package*.swift')
Expand Down
Empty file modified .github/workflows/scripts/install-and-build-with-sdk.sh
100644 → 100755
Empty file.
14 changes: 5 additions & 9 deletions .github/workflows/soundness.yml
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,7 @@ jobs:
- name: Run documentation check
env:
ADDITIONAL_DOCC_ARGUMENTS: ${{ inputs.docs_check_additional_arguments }}
run: |
which curl yq || (apt -q update && apt -yq install curl yq)
cat ${{ steps.script_path.outputs.root }}/.github/workflows/scripts/check-docs.sh | bash
run: ${{ steps.script_path.outputs.root }}/.github/workflows/scripts/check-docs.sh

unacceptable-language-check:
name: Unacceptable language check
Expand Down Expand Up @@ -194,7 +192,7 @@ jobs:
- name: Run unacceptable language check
env:
UNACCEPTABLE_WORD_LIST: ${{ inputs.unacceptable_language_check_word_list}}
run: cat ${{ steps.script_path.outputs.root }}/.github/workflows/scripts/check-unacceptable-language.sh | bash
run: ${{ steps.script_path.outputs.root }}/.github/workflows/scripts/check-unacceptable-language.sh

license-header-check:
name: License headers check
Expand Down Expand Up @@ -224,7 +222,7 @@ jobs:
- name: Run license header check
env:
PROJECT_NAME: ${{ inputs.license_header_check_project_name }}
run: cat ${{ steps.script_path.outputs.root }}/.github/workflows/scripts/check-license-header.sh | bash
run: ${{ steps.script_path.outputs.root }}/.github/workflows/scripts/check-license-header.sh

broken-symlink-check:
name: Broken symlinks check
Expand Down Expand Up @@ -252,7 +250,7 @@ jobs:
echo "root=$GITHUB_WORKSPACE/github-workflows" >> $GITHUB_OUTPUT
fi
- name: Run broken symlinks check
run: cat ${{ steps.script_path.outputs.root }}/.github/workflows/scripts/check-broken-symlinks.sh | bash
run: ${{ steps.script_path.outputs.root }}/.github/workflows/scripts/check-broken-symlinks.sh

format-check:
name: Format check
Expand Down Expand Up @@ -285,9 +283,7 @@ jobs:
# https://github.com/actions/checkout/issues/766
run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Run format check
run: |
which curl || (apt -q update && apt -yq install curl)
cat ${{ steps.script_path.outputs.root }}/.github/workflows/scripts/check-swift-format.sh | bash
run: ${{ steps.script_path.outputs.root }}/.github/workflows/scripts/check-swift-format.sh

shell-check:
name: Shell check
Expand Down
71 changes: 9 additions & 62 deletions .github/workflows/swift_package_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ jobs:
uses: actions/checkout@v1
with:
repository: swiftlang/github-workflows
path: github-workflows
path: ${{ github.event.repository.name }}/github-workflows
ref: main
- name: Determine script-root path
id: script_path
Expand All @@ -342,7 +342,6 @@ jobs:
- name: Check out related PRs
if: ${{ inputs.enable_cross_pr_testing && github.event_name == 'pull_request' }}
run: |
apt-get update && apt-get install -y curl
cat ${{ steps.script_path.outputs.root }}/.github/workflows/scripts/cross-pr-checkout.swift > /tmp/cross-pr-checkout.swift
swift /tmp/cross-pr-checkout.swift "${{ github.repository }}" "${{ github.event.number }}"
- name: Set environment variables
Expand Down Expand Up @@ -392,7 +391,7 @@ jobs:
uses: actions/checkout@v1
with:
repository: swiftlang/github-workflows
path: github-workflows
path: ${{ github.event.repository.name }}/github-workflows
ref: main
- name: Determine script-root path
id: script_path
Expand Down Expand Up @@ -420,20 +419,7 @@ jobs:
BUILD_FLAGS: ${{ (contains(matrix.swift_version, 'nightly') && inputs.swift_nightly_flags) || inputs.swift_flags }}
run: |
${{ inputs.linux_static_sdk_pre_build_command }}
if command -v apt-get >/dev/null 2>&1 ; then # bookworm, noble, jammy, focal
apt-get -q update && apt-get -yq install curl
elif command -v dnf >/dev/null 2>&1 ; then # rhel-ubi9
dnf -y update
dnf -y install curl-minimal
elif command -v yum >/dev/null 2>&1 ; then # amazonlinux2
yum -y update
yum -y install curl
else
echo "Unknown package manager (tried apt-get, dnf, yum)" >&2
exit 1
fi
cat ${{ steps.script_path.outputs.root }}/.github/workflows/scripts/install-and-build-with-sdk.sh | \
bash -s -- --static --flags="$BUILD_FLAGS" --build-command="${{ inputs.linux_static_sdk_build_command }}" ${{ matrix.swift_version }}
${{ steps.script_path.outputs.root }}/.github/workflows/scripts/install-and-build-with-sdk.sh --static --flags="$BUILD_FLAGS" --build-command="${{ inputs.linux_static_sdk_build_command }}" ${{ matrix.swift_version }}

wasm-sdk-build:
name: Swift SDK for Wasm Build (${{ matrix.swift_version }} - ${{ matrix.os_version }})
Expand Down Expand Up @@ -470,7 +456,7 @@ jobs:
uses: actions/checkout@v1
with:
repository: swiftlang/github-workflows
path: github-workflows
path: ${{ github.event.repository.name }}/github-workflows
ref: main
- name: Determine script-root path
id: script_path
Expand Down Expand Up @@ -498,20 +484,7 @@ jobs:
BUILD_FLAGS: ${{ (contains(matrix.swift_version, 'nightly') && inputs.swift_nightly_flags) || inputs.swift_flags }}
run: |
${{ inputs.wasm_sdk_pre_build_command }}
if command -v apt-get >/dev/null 2>&1 ; then # bookworm, noble, jammy, focal
apt-get -q update && apt-get -yq install curl
elif command -v dnf >/dev/null 2>&1 ; then # rhel-ubi9
dnf -y update
dnf -y install curl-minimal
elif command -v yum >/dev/null 2>&1 ; then # amazonlinux2
yum -y update
yum -y install curl
else
echo "Unknown package manager (tried apt-get, dnf, yum)" >&2
exit 1
fi
cat ${{ steps.script_path.outputs.root }}/.github/workflows/scripts/install-and-build-with-sdk.sh | \
bash -s -- --wasm --flags="$BUILD_FLAGS" --build-command="${{ inputs.wasm_sdk_build_command }}" ${{ matrix.swift_version }}
${{ steps.script_path.outputs.root }}/.github/workflows/scripts/install-and-build-with-sdk.sh --wasm --flags="$BUILD_FLAGS" --build-command="${{ inputs.wasm_sdk_build_command }}" ${{ matrix.swift_version }}

embedded-wasm-sdk-build:
name: Embedded Swift SDK for Wasm Build (${{ matrix.swift_version }} - ${{ matrix.os_version }})
Expand Down Expand Up @@ -548,7 +521,7 @@ jobs:
uses: actions/checkout@v1
with:
repository: swiftlang/github-workflows
path: github-workflows
path: ${{ github.event.repository.name }}/github-workflows
ref: main
- name: Determine script-root path
id: script_path
Expand Down Expand Up @@ -576,20 +549,7 @@ jobs:
BUILD_FLAGS: ${{ (contains(matrix.swift_version, 'nightly') && inputs.swift_nightly_flags) || inputs.swift_flags }}
run: |
${{ inputs.wasm_sdk_pre_build_command }}
if command -v apt-get >/dev/null 2>&1 ; then # bookworm, noble, jammy, focal
apt-get -q update && apt-get -yq install curl
elif command -v dnf >/dev/null 2>&1 ; then # rhel-ubi9
dnf -y update
dnf -y install curl-minimal
elif command -v yum >/dev/null 2>&1 ; then # amazonlinux2
yum -y update
yum -y install curl
else
echo "Unknown package manager (tried apt-get, dnf, yum)" >&2
exit 1
fi
cat ${{ steps.script_path.outputs.root }}/.github/workflows/scripts/install-and-build-with-sdk.sh | \
bash -s -- --embedded-wasm --flags="$BUILD_FLAGS" ${{ matrix.swift_version }}
${{ steps.script_path.outputs.root }}/.github/workflows/scripts/install-and-build-with-sdk.sh --embedded-wasm --flags="$BUILD_FLAGS" ${{ matrix.swift_version }}

android-sdk-build:
name: Swift SDK for Android Build (${{ matrix.swift_version }} - ${{ matrix.os_version }} - NDK ${{ matrix.ndk_version }})
Expand Down Expand Up @@ -627,7 +587,7 @@ jobs:
uses: actions/checkout@v1
with:
repository: swiftlang/github-workflows
path: github-workflows
path: ${{ github.event.repository.name }}/github-workflows
ref: main
- name: Determine script-root path
id: script_path
Expand Down Expand Up @@ -655,20 +615,7 @@ jobs:
BUILD_FLAGS: ${{ (contains(matrix.swift_version, 'nightly') && inputs.swift_nightly_flags) || inputs.swift_flags }}
run: |
${{ inputs.android_sdk_pre_build_command }}
if command -v apt-get >/dev/null 2>&1 ; then # bookworm, noble, jammy, focal
apt-get -q update && apt-get -yq install curl
elif command -v dnf >/dev/null 2>&1 ; then # rhel-ubi9
dnf -y update
dnf -y install curl-minimal
elif command -v yum >/dev/null 2>&1 ; then # amazonlinux2
yum -y update
yum -y install curl
else
echo "Unknown package manager (tried apt-get, dnf, yum)" >&2
exit 1
fi
cat ${{ steps.script_path.outputs.root }}/.github/workflows/scripts/install-and-build-with-sdk.sh | \
bash -s -- --android --flags="$BUILD_FLAGS" --build-command="${{ inputs.android_sdk_build_command }}" --android-sdk-triple=${{ join(fromJson(inputs.android_sdk_triples), ' --android-sdk-triple=') }} --android-ndk-version="${{ matrix.ndk_version }}" ${{ matrix.swift_version }}
${{ steps.script_path.outputs.root }}/.github/workflows/scripts/install-and-build-with-sdk.sh --android --flags="$BUILD_FLAGS" --build-command="${{ inputs.android_sdk_build_command }}" --android-sdk-triple=${{ join(fromJson(inputs.android_sdk_triples), ' --android-sdk-triple=') }} --android-ndk-version="${{ matrix.ndk_version }}" ${{ matrix.swift_version }}

windows-build:
name: Windows (${{ matrix.swift_version }} - windows-2022)
Expand Down
Loading