Skip to content

Swift 5.7

Swift 5.7 #24

name: Build Android Toolchain
on:
# Trigger the workflow on push or pull request,
# but only for the master branch
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build-icu-android:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v1
- name: Install dependencies
run: sudo ./build/Linux/000-install-dependencies.sh
- name: Install NDK
run: ./build/Linux/002-install-ndk.sh
- name: Define build folders
run: ./build/Linux/003-define-build-folders.sh
- name: Build ICU
run: ./build/Linux/010-build-icu.sh
- uses: actions/upload-artifact@v2
with:
name: icu-arm64-v8a
path: |
/home/runner/icu/build-aarch64-linux-android/lib
- uses: actions/upload-artifact@v2
with:
name: icu-armeabi-v7a
path: |
/home/runner/icu/build-armv7a-linux-androideabi/lib
- uses: actions/upload-artifact@v2
with:
name: icu-x86_64
path: |
/home/runner/icu/build-x86_64-linux-android/lib
- uses: actions/upload-artifact@v2
with:
name: icu-x86
path: |
/home/runner/icu/build-i686-linux-android/lib
build-swift-android-arm-64:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v1
- name: Install dependencies
run: sudo ./build/Linux/000-install-dependencies.sh
- name: Install NDK
run: ./build/Linux/002-install-ndk.sh
- name: Define build folders
run: ./build/Linux/003-define-build-folders.sh
- name: Clone Swift
run: ./build/Linux/020-clone-swift.sh
- name: Cache Swift Arm64
id: cache-swift-arm-64
uses: actions/cache@v2
with:
path: ~/out/swift-android-arm64-v8a.tar
key: ${{ runner.os }}-arm64-${{ hashFiles('.swift.sum') }}
- name: Build Swift
if: steps.cache-swift-arm-64.outputs.cache-hit != 'true'
run: ./build/Linux/031-build-swift-arm64.sh
- name: Clean sources
if: steps.cache-swift-arm-64.outputs.cache-hit != 'true'
run: rm -rf ~/swift-source
- name: Archive toolchain
if: steps.cache-swift-arm-64.outputs.cache-hit != 'true'
run: pushd ~/out; tar -cvf swift-android-arm64-v8a.tar swift-android; popd
- uses: actions/upload-artifact@v2
with:
name: swift-android-arm64-v8a
path: ~/out/swift-android-arm64-v8a.tar
build-swift-android-armeabi-v7a:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v1
- name: Install dependencies
run: sudo ./build/Linux/000-install-dependencies.sh
- name: Install NDK
run: ./build/Linux/002-install-ndk.sh
- name: Define build folders
run: ./build/Linux/003-define-build-folders.sh
- name: Clone Swift
run: ./build/Linux/020-clone-swift.sh
- name: Cache Swift Arm 32
id: cache-swift-arm-32
uses: actions/cache@v2
with:
path: ~/out/swift-android-armeabi-v7a.tar
key: ${{ runner.os }}-arm32-${{ hashFiles('.swift.sum') }}
- name: Build Swift
if: steps.cache-swift-arm-32.outputs.cache-hit != 'true'
run: ./build/Linux/032-build-swift-arm.sh
- name: Clean sources
if: steps.cache-swift-arm-32.outputs.cache-hit != 'true'
run: rm -rf ~/swift-source
- name: Archive toolchain
if: steps.cache-swift-arm-32.outputs.cache-hit != 'true'
run: pushd ~/out; tar -cvf swift-android-armeabi-v7a.tar swift-android; popd
- uses: actions/upload-artifact@v2
with:
name: swift-android-armeabi-v7a
path: ~/out/swift-android-armeabi-v7a.tar
build-swift-android-x86:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v1
- name: Install dependencies
run: sudo ./build/Linux/000-install-dependencies.sh
- name: Install NDK
run: ./build/Linux/002-install-ndk.sh
- name: Define build folders
run: ./build/Linux/003-define-build-folders.sh
- name: Clone Swift
run: ./build/Linux/020-clone-swift.sh
- name: Cache Swift x86
id: cache-swift-x86
uses: actions/cache@v2
with:
path: ~/out/swift-android-x86.tar
key: ${{ runner.os }}-x86-${{ hashFiles('.swift.sum') }}
- name: Build Swift
if: steps.cache-swift-x86.outputs.cache-hit != 'true'
run: ./build/Linux/034-build-swift-x86.sh
- name: Clean sources
if: steps.cache-swift-x86.outputs.cache-hit != 'true'
run: rm -rf ~/swift-source
- name: Archive toolchain
if: steps.cache-swift-x86.outputs.cache-hit != 'true'
run: pushd ~/out; tar -cvf swift-android-x86.tar swift-android; popd
- uses: actions/upload-artifact@v2
with:
name: swift-android-x86
path: ~/out/swift-android-x86.tar
build-swift-android-x86_64:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v1
- name: Install dependencies
run: sudo ./build/Linux/000-install-dependencies.sh
- name: Install NDK
run: ./build/Linux/002-install-ndk.sh
- name: Define build folders
run: ./build/Linux/003-define-build-folders.sh
- name: Clone Swift
run: ./build/Linux/020-clone-swift.sh
- name: Cache Swift x86_64
id: cache-swift-x86_64
uses: actions/cache@v2
with:
path: ~/out/swift-android-x86_64.tar
key: ${{ runner.os }}-x86_64-${{ hashFiles('.swift.sum') }}
- name: Build Swift
if: steps.cache-swift-x86_64.outputs.cache-hit != 'true'
run: ./build/Linux/033-build-swift-x86_64.sh
- name: Clean sources
if: steps.cache-swift-x86_64.outputs.cache-hit != 'true'
run: rm -rf ~/swift-source
- name: Archive toolchain
if: steps.cache-swift-x86_64.outputs.cache-hit != 'true'
run: pushd ~/out; tar -cvf swift-android-x86_64.tar swift-android; popd
- uses: actions/upload-artifact@v2
with:
name: swift-android-x86_64
path: ~/out/swift-android-x86_64.tar
build-foundation-dependecies-android:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v1
- name: Install dependencies
run: sudo ./build/Linux/000-install-dependencies.sh
- name: Install NDK
run: ./build/Linux/002-install-ndk.sh
- name: Define build folders
run: ./build/Linux/003-define-build-folders.sh
- name: Cache foundation dependencies
id: cache-foundation-dependencies
uses: actions/cache@v2
with:
path: |
~/foundation-dependencies/arm64
~/foundation-dependencies/arm
~/foundation-dependencies/x86_64
~/foundation-dependencies/x86
key: openssl-1.1.1m-curl-7_81_0-libxmlv2.9.12
- name: Build Foundation Dependenncies
if: steps.cache-foundation-dependencies.outputs.cache-hit != 'true'
run: ./build/Linux/040-build-foundation-depends.sh
- uses: actions/upload-artifact@v2
with:
name: foundation-dependecies-arm64-v8a
path: |
~/foundation-dependencies/arm64
!~/foundation-dependencies/arm64/src
- uses: actions/upload-artifact@v2
with:
name: foundation-dependecies-armeabi-v7a
path: |
~/foundation-dependencies/arm
!~/foundation-dependencies/arm/src
- uses: actions/upload-artifact@v2
with:
name: foundation-dependecies-x86_64
path: |
~/foundation-dependencies/x86_64
!~/foundation-dependencies/x86_64/src
- uses: actions/upload-artifact@v2
with:
name: foundation-dependecies-x86
path: |
~/foundation-dependencies/x86
!~/foundation-dependencies/x86/src
build-swift-corelibs-android-arm-64:
needs: [build-icu-android, build-swift-android-arm-64, build-foundation-dependecies-android]
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v1
- name: Install dependencies
run: sudo ./build/Linux/000-install-dependencies.sh
- name: Install NDK
run: ./build/Linux/002-install-ndk.sh
- name: Define build folders
run: ./build/Linux/003-define-build-folders.sh
- uses: actions/download-artifact@v2
with:
name: icu-arm64-v8a
path: /home/runner/icu/build-aarch64-linux-android
- uses: actions/download-artifact@v2
with:
name: swift-android-arm64-v8a
path: ~/out
- name: Unarchive toolchain
run: pushd ~/out; tar -xvf swift-android-arm64-v8a.tar; popd
- uses: actions/download-artifact@v2
with:
name: foundation-dependecies-arm64-v8a
path: ~/foundation-dependencies/arm64
- name: Clone Swift
run: ./build/Linux/020-clone-swift.sh
- name: Build Corelibs
run: ./build/Linux/052-build-corelibs.sh arm64 aarch64 aarch64-linux-android arm64-v8a aarch64-linux-android
- uses: actions/upload-artifact@v2
with:
name: swift-android-clang-libs
path: ~/out/swift-android/swift-nightly-install/usr/lib/clang
- uses: actions/upload-artifact@v2
with:
name: swift-android-arm64-v8a-libs
path: ~/out/swift-android/swift-nightly-install/usr/lib/swift-aarch64
build-swift-corelibs-android-armeabi-v7a:
needs: [build-icu-android, build-swift-android-armeabi-v7a, build-foundation-dependecies-android]
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v1
- name: Install dependencies
run: sudo ./build/Linux/000-install-dependencies.sh
- name: Install NDK
run: ./build/Linux/002-install-ndk.sh
- name: Define build folders
run: ./build/Linux/003-define-build-folders.sh
- uses: actions/download-artifact@v2
with:
name: icu-armeabi-v7a
path: /home/runner/icu/build-armv7a-linux-androideabi
- uses: actions/download-artifact@v2
with:
name: swift-android-armeabi-v7a
path: ~/out
- name: Unarchive toolchain
run: pushd ~/out; tar -xvf swift-android-armeabi-v7a.tar; popd
- uses: actions/download-artifact@v2
with:
name: foundation-dependecies-armeabi-v7a
path: ~/foundation-dependencies/arm
- name: Clone Swift
run: ./build/Linux/020-clone-swift.sh
- name: Build Corelibs
run: ./build/Linux/052-build-corelibs.sh arm armv7 arm-linux-androideabi armeabi-v7a armv7a-linux-androideabi
- uses: actions/upload-artifact@v2
with:
name: swift-android-armeabi-v7a-libs
path: ~/out/swift-android/swift-nightly-install/usr/lib/swift-armv7
build-swift-corelibs-android-x86:
needs: [build-icu-android, build-swift-android-x86, build-foundation-dependecies-android]
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v1
- name: Install dependencies
run: sudo ./build/Linux/000-install-dependencies.sh
- name: Install NDK
run: ./build/Linux/002-install-ndk.sh
- name: Define build folders
run: ./build/Linux/003-define-build-folders.sh
- uses: actions/download-artifact@v2
with:
name: icu-x86
path: /home/runner/icu/build-i686-linux-android
- uses: actions/download-artifact@v2
with:
name: swift-android-x86
path: ~/out
- name: Unarchive toolchain
run: pushd ~/out; tar -xvf swift-android-x86.tar; popd
- uses: actions/download-artifact@v2
with:
name: foundation-dependecies-x86
path: ~/foundation-dependencies/x86
- name: Clone Swift
run: ./build/Linux/020-clone-swift.sh
- name: Build Corelibs
run: ./build/Linux/052-build-corelibs.sh x86 i686 i686-linux-android x86 i686-linux-android
- uses: actions/upload-artifact@v2
with:
name: swift-android-x86-libs
path: ~/out/swift-android/swift-nightly-install/usr/lib/swift-i686
build-swift-corelibs-android-x86_64:
needs: [build-icu-android, build-swift-android-x86_64, build-foundation-dependecies-android]
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v1
- name: Install dependencies
run: sudo ./build/Linux/000-install-dependencies.sh
- name: Install NDK
run: ./build/Linux/002-install-ndk.sh
- name: Define build folders
run: ./build/Linux/003-define-build-folders.sh
- uses: actions/download-artifact@v2
with:
name: icu-x86_64
path: /home/runner/icu/build-x86_64-linux-android
- uses: actions/download-artifact@v2
with:
name: swift-android-x86_64
path: ~/out
- name: Unarchive toolchain
run: pushd ~/out; tar -xvf swift-android-x86_64.tar; popd
- uses: actions/download-artifact@v2
with:
name: foundation-dependecies-x86_64
path: ~/foundation-dependencies/x86_64
- name: Clone Swift
run: ./build/Linux/020-clone-swift.sh
- name: Build Corelibs
run: ./build/Linux/052-build-corelibs.sh x86_64 x86_64 x86_64-linux-android x86_64 x86_64-linux-android
- uses: actions/upload-artifact@v2
with:
name: swift-android-x86_64-libs
path: ~/out/swift-android/swift-nightly-install/usr/lib/swift-x86_64
build-swift-mac-x86_64:
runs-on: macos-12
steps:
- uses: actions/checkout@v1
- name: Install dependencies
run: ./build/macOS/000-install-dependencies.sh
- name: Clone Swift
run: ./build/macOS/010-clone-swift.sh
- name: Cache Swift Mac
id: cache-swift-mac
uses: actions/cache@v2
with:
path: ~/swift-android-bin.tar
key: ${{ runner.os }}-x86_64-${{ hashFiles('.swift.sum') }}
- name: Build Swift
if: steps.cache-swift-mac.outputs.cache-hit != 'true'
run: ./build/macOS/020-build-swift.sh
- name: Build Swift PM
if: steps.cache-swift-mac.outputs.cache-hit != 'true'
run: ./build/macOS/030-build-swiftpm.sh
- name: Collect toolchain bin
if: steps.cache-swift-mac.outputs.cache-hit != 'true'
run: ./build/macOS/040-collect-toolchain-bin.sh
- uses: actions/upload-artifact@v2
with:
name: swift-android-bin
path: ~/swift-android-bin.tar
collect-mac-x86_64-toolchain:
needs: [build-swift-mac-x86_64, build-swift-corelibs-android-arm-64, build-swift-corelibs-android-armeabi-v7a, build-swift-corelibs-android-x86_64, build-swift-corelibs-android-x86]
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v1
- name: Install NDK
run: ./build/Linux/002-install-ndk.sh
- uses: actions/download-artifact@v2
with:
name: swift-android-bin
path: ~/
- name: Unarchive bin
run: pushd ~/; tar -xvf swift-android-bin.tar; popd
- uses: actions/download-artifact@v2
with:
name: swift-android-arm64-v8a-libs
path: ~/lib/swift-aarch64
- uses: actions/download-artifact@v2
with:
name: swift-android-armeabi-v7a-libs
path: ~/lib/swift-armv7
- uses: actions/download-artifact@v2
with:
name: swift-android-x86_64-libs
path: ~/lib/swift-x86_64
- uses: actions/download-artifact@v2
with:
name: swift-android-x86-libs
path: ~/lib/swift-i686
- uses: actions/download-artifact@v2
with:
name: swift-android-clang-libs
path: ~/lib/clang
- name: Collect toolchain
run: ./build/Linux/060-collect-toolchain.sh
- uses: actions/upload-artifact@v2
with:
name: swift-android
path: ~/out/swift-android.zip