115115 type : string
116116 description : " Command to use when building the package with the Swift SDK for Android"
117117 default : " swift build"
118+ android_sdk_triple :
119+ type : string
120+ description : " The triple to use when building with the Swift SDK for Android"
121+ default : " x86_64-unknown-linux-android28"
118122 windows_pre_build_command :
119123 type : string
120124 description : " Windows Command Prompt command to execute before building the Swift package"
@@ -375,17 +379,17 @@ jobs:
375379 curl -s --retry 3 https://raw.githubusercontent.com/swiftlang/github-workflows/refs/heads/main/.github/workflows/scripts/install-and-build-with-sdk.sh | \
376380 bash -s -- --wasm --flags="$BUILD_FLAGS" --build-command="${{ inputs.wasm_sdk_build_command }}" ${{ matrix.swift_version }}
377381
378- android -sdk-build :
379- name : Swift SDK for Android Build (${{ matrix.swift_version }} - ${{ matrix.os_version }})
380- if : ${{ inputs.enable_android_sdk_build }}
382+ embedded-wasm -sdk-build :
383+ name : Embedded Swift SDK for Wasm Build (${{ matrix.swift_version }} - ${{ matrix.os_version }})
384+ if : ${{ inputs.enable_embedded_wasm_sdk_build }}
381385 runs-on : ubuntu-latest
382386 strategy :
383387 fail-fast : false
384388 matrix :
385- swift_version : ${{ fromJson(inputs.android_sdk_versions ) }}
389+ swift_version : ${{ fromJson(inputs.wasm_sdk_versions ) }}
386390 os_version : ${{ fromJson(inputs.linux_os_versions) }}
387391 exclude :
388- - ${{ fromJson(inputs.android_exclude_swift_versions ) }}
392+ - ${{ fromJson(inputs.wasm_exclude_swift_versions ) }}
389393 container :
390394 image : ${{ (contains(matrix.swift_version, 'nightly') && 'swiftlang/swift') || 'swift' }}:${{ matrix.swift_version }}-${{ matrix.os_version }}
391395 steps :
@@ -395,10 +399,6 @@ jobs:
395399 run : clang --version
396400 - name : Checkout repository
397401 uses : actions/checkout@v4
398- if : ${{ matrix.os_version != 'amazonlinux2' }}
399- - name : Checkout repository
400- uses : actions/checkout@v1
401- if : ${{ matrix.os_version == 'amazonlinux2' }}
402402 - name : Provide token
403403 if : ${{ inputs.needs_token }}
404404 run : |
@@ -412,11 +412,11 @@ jobs:
412412 done
413413 - name : Pre-build
414414 run : ${{ inputs.linux_pre_build_command }}
415- - name : Install Swift SDK for Android and build
415+ - name : Install Swift SDK for Wasm and build
416416 env :
417417 BUILD_FLAGS : ${{ (contains(matrix.swift_version, 'nightly') && inputs.swift_nightly_flags) || inputs.swift_flags }}
418418 run : |
419- ${{ inputs.android_sdk_pre_build_command }}
419+ ${{ inputs.wasm_sdk_pre_build_command }}
420420 if command -v apt-get >/dev/null 2>&1 ; then # bookworm, noble, jammy, focal
421421 apt-get -q update && apt-get -yq install curl
422422 elif command -v dnf >/dev/null 2>&1 ; then # rhel-ubi9
@@ -430,19 +430,19 @@ jobs:
430430 exit 1
431431 fi
432432 curl -s --retry 3 https://raw.githubusercontent.com/swiftlang/github-workflows/refs/heads/main/.github/workflows/scripts/install-and-build-with-sdk.sh | \
433- bash -s -- --android --flags="$BUILD_FLAGS" --build-command="${{ inputs.android_sdk_build_command }} " ${{ matrix.swift_version }}
433+ bash -s -- --embedded-wasm --flags="$BUILD_FLAGS" ${{ matrix.swift_version }}
434434
435- embedded-wasm -sdk-build :
436- name : Embedded Swift SDK for Wasm Build (${{ matrix.swift_version }} - ${{ matrix.os_version }})
437- if : ${{ inputs.enable_embedded_wasm_sdk_build }}
435+ android -sdk-build :
436+ name : Swift SDK for Android Build (${{ matrix.swift_version }} - ${{ matrix.os_version }})
437+ if : ${{ inputs.enable_android_sdk_build }}
438438 runs-on : ubuntu-latest
439439 strategy :
440440 fail-fast : false
441441 matrix :
442- swift_version : ${{ fromJson(inputs.wasm_sdk_versions ) }}
442+ swift_version : ${{ fromJson(inputs.android_sdk_versions ) }}
443443 os_version : ${{ fromJson(inputs.linux_os_versions) }}
444444 exclude :
445- - ${{ fromJson(inputs.wasm_exclude_swift_versions ) }}
445+ - ${{ fromJson(inputs.android_exclude_swift_versions ) }}
446446 container :
447447 image : ${{ (contains(matrix.swift_version, 'nightly') && 'swiftlang/swift') || 'swift' }}:${{ matrix.swift_version }}-${{ matrix.os_version }}
448448 steps :
@@ -452,6 +452,10 @@ jobs:
452452 run : clang --version
453453 - name : Checkout repository
454454 uses : actions/checkout@v4
455+ if : ${{ matrix.os_version != 'amazonlinux2' }}
456+ - name : Checkout repository
457+ uses : actions/checkout@v1
458+ if : ${{ matrix.os_version == 'amazonlinux2' }}
455459 - name : Provide token
456460 if : ${{ inputs.needs_token }}
457461 run : |
@@ -465,11 +469,11 @@ jobs:
465469 done
466470 - name : Pre-build
467471 run : ${{ inputs.linux_pre_build_command }}
468- - name : Install Swift SDK for Wasm and build
472+ - name : Install Swift SDK for Android and build
469473 env :
470474 BUILD_FLAGS : ${{ (contains(matrix.swift_version, 'nightly') && inputs.swift_nightly_flags) || inputs.swift_flags }}
471475 run : |
472- ${{ inputs.wasm_sdk_pre_build_command }}
476+ ${{ inputs.android_sdk_pre_build_command }}
473477 if command -v apt-get >/dev/null 2>&1 ; then # bookworm, noble, jammy, focal
474478 apt-get -q update && apt-get -yq install curl
475479 elif command -v dnf >/dev/null 2>&1 ; then # rhel-ubi9
@@ -483,7 +487,7 @@ jobs:
483487 exit 1
484488 fi
485489 curl -s --retry 3 https://raw.githubusercontent.com/swiftlang/github-workflows/refs/heads/main/.github/workflows/scripts/install-and-build-with-sdk.sh | \
486- bash -s -- --embedded-wasm --flags="$BUILD_FLAGS" ${{ matrix.swift_version }}
490+ bash -s -- --android --flags="$BUILD_FLAGS" --build-command="${{ inputs.android_sdk_build_command }}" --android-sdk-tripe="${{ inputs.android_sdk_triple }} " ${{ matrix.swift_version }}
487491
488492 windows-build :
489493 name : Windows (${{ matrix.swift_version }} - windows-2022)
0 commit comments