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
4 changes: 4 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,7 @@ jobs:
linux_6_1_arguments_override: "--explicit-target-dependency-import-check error"
linux_nightly_next_arguments_override: "--explicit-target-dependency-import-check error"
linux_nightly_main_arguments_override: "--explicit-target-dependency-import-check error"

release-builds:
name: Release builds
uses: ./.github/workflows/release_builds.yml
4 changes: 4 additions & 0 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,7 @@ jobs:
with:
name: "Cxx interop"
matrix_string: '${{ needs.construct-cxx-matrix.outputs.cxx-interop-matrix }}'

release-builds:
name: Release builds
uses: ./.github/workflows/release_builds.yml
108 changes: 108 additions & 0 deletions .github/workflows/release_builds.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
name: Release builds

on:
workflow_call:
inputs:
linux_5_9_enabled:
type: boolean
description: "Boolean to enable the Linux 5.9 Swift version matrix job. Defaults to false."
default: false
linux_5_9_arguments_override:
type: string
description: "The arguments passed to swift build in the Linux 5.9 Swift version matrix job."
default: ""
linux_5_10_enabled:
type: boolean
description: "Boolean to enable the Linux 5.10 Swift version matrix job. Defaults to true."
default: true
linux_5_10_arguments_override:
type: string
description: "The arguments passed to swift build in the Linux 5.10 Swift version matrix job."
default: ""
linux_6_0_enabled:
type: boolean
description: "Boolean to enable the Linux 6.0 Swift version matrix job. Defaults to true."
default: true
linux_6_0_arguments_override:
type: string
description: "The arguments passed to swift build in the Linux 6.0 Swift version matrix job."
default: ""
linux_6_1_enabled:
type: boolean
description: "Boolean to enable the Linux 6.1 Swift version matrix job. Defaults to true."
default: true
linux_6_1_arguments_override:
type: string
description: "The arguments passed to swift build in the Linux 6.1 Swift version matrix job."
default: ""
linux_nightly_next_enabled:
type: boolean
description: "Boolean to enable the Linux nightly next Swift version matrix job. Defaults to true."
default: true
linux_nightly_next_arguments_override:
type: string
description: "The arguments passed to swift build in the Linux nightly next Swift version matrix job."
default: ""
linux_nightly_main_enabled:
type: boolean
description: "Boolean to enable the Linux nightly main Swift version matrix job. Defaults to true."
default: true
linux_nightly_main_arguments_override:
type: string
description: "The arguments passed to swift build in the Linux nightly main Swift version matrix job."
default: ""

jobs:
release-builds:
name: Release builds (${{ matrix.swift.swift_version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# We are specifying only the major and minor of the docker images to automatically pick up the latest patch release
swift:
- image: "swift:5.9-jammy"
swift_version: "5.9"
enabled: ${{ inputs.linux_5_9_enabled }}
- image: "swift:5.10-jammy"
swift_version: "5.10"
enabled: ${{ inputs.linux_5_10_enabled }}
- image: "swift:6.0-jammy"
swift_version: "6.0"
enabled: ${{ inputs.linux_6_0_enabled }}
- image: "swift:6.1-jammy"
swift_version: "6.1"
enabled: ${{ inputs.linux_6_1_enabled }}
- image: "swiftlang/swift:nightly-6.1-jammy"
swift_version: "nightly-6.1"
enabled: ${{ inputs.linux_nightly_next_enabled }}
- image: "swiftlang/swift:nightly-main-jammy"
swift_version: "nightly-main"
enabled: ${{ inputs.linux_nightly_main_enabled }}
steps:
- name: Checkout repository
if: ${{ matrix.swift.enabled }}
uses: actions/checkout@v4
with:
persist-credentials: false
submodules: true
- name: Mark the workspace as safe
if: ${{ matrix.swift.enabled }}
# https://github.com/actions/checkout/issues/766
run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Run matrix job
if: ${{ matrix.swift.enabled }}
env:
SWIFT_VERSION: ${{ matrix.swift.swift_version }}
COMMAND: "swift build -c release"
COMMAND_OVERRIDE_5_9: "swift build -c release ${{ inputs.linux_5_9_arguments_override }}"
COMMAND_OVERRIDE_5_10: "swift build -c release ${{ inputs.linux_5_10_arguments_override }}"
COMMAND_OVERRIDE_6_0: "swift build -c release ${{ inputs.linux_6_0_arguments_override }}"
COMMAND_OVERRIDE_6_1: "swift build -c release ${{ inputs.linux_6_1_arguments_override }}"
COMMAND_OVERRIDE_NIGHTLY_NEXT: "swift build -c release ${{ inputs.linux_nightly_next_arguments_override }}"
COMMAND_OVERRIDE_NIGHTLY_MAIN: "swift build -c release ${{ inputs.linux_nightly_main_arguments_override }}"
run: |
apt-get -qq update && apt-get -qq -y install curl && apt-get -y install libsasl2-dev libssl-dev
curl -s https://raw.githubusercontent.com/apple/swift-nio/main/scripts/check-matrix-job.sh | bash
container:
image: ${{ matrix.swift.image }}