chore: include ulayout #96
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build and publish | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| env: | |
| ICU_SOURCE_ZIP_URL: https://github.com/unicode-org/icu/archive/refs/tags/release-77-1.zip | |
| jobs: | |
| build_unoicu: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| EMSCRIPTEN_VERSION: [ '3.1.12','3.1.34','3.1.56' ] | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Build unoicu.a | |
| run: | | |
| pushd src/unoicu | |
| docker build --build-arg EMSCRIPTEN_VERSION=${{ matrix.EMSCRIPTEN_VERSION }} --output type=local,dest=./out . | |
| popd | |
| - name: Upload unoicu.a | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: unoicu-${{ matrix.EMSCRIPTEN_VERSION }} | |
| path: ./src/unoicu/out | |
| build_icudt: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Build icudt.dat | |
| run: | | |
| pushd src/cldr_data | |
| docker build --build-arg ICU_SOURCE_ZIP_URL=${ICU_SOURCE_ZIP_URL} --output type=local,dest=. . | |
| popd | |
| - name: Upload icudt.dat | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: icudt.dat | |
| path: ./src/cldr_data/icudt.dat | |
| build_libicu_osx: | |
| strategy: | |
| matrix: | |
| arch: [ 'x86_64','arm64' ] | |
| runs-on: ${{ matrix.arch == 'x86_64' && 'macos-15-intel' || 'macos-15' }} | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Build ICU | |
| run: | | |
| curl -L -o icu.zip ${ICU_SOURCE_ZIP_URL} | |
| mkdir icu | |
| unzip -d icu icu.zip | |
| export ICU_DATA_FILTER_FILE="$PWD/src/cldr_data/filters_macosios.json" | |
| pushd icu/$(ls icu)/icu4c/source | |
| ./runConfigureICU macOS | |
| make -j $(sysctl -n hw.physicalcpu) | |
| popd | |
| mkdir lib | |
| cp icu/$(ls icu)/icu4c/source/lib/libicuuc.dylib icu/$(ls icu)/icu4c/source/lib/libicudata.dylib lib | |
| if ${{ matrix.arch == 'arm64' && 'true' || 'false' }} ; then | |
| mkdir osx-arm64-build | |
| cp -r icu/$(ls icu)/icu4c/* osx-arm64-build | |
| fi | |
| - name: Upload binaries | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: libicu-osx-${{ matrix.arch }} | |
| path: ./lib | |
| - name: Upload whole build output for cross-compilation | |
| uses: actions/upload-artifact@v4 | |
| if: matrix.arch == 'arm64' | |
| with: | |
| name: libicu-osx-arm64-build | |
| path: ./osx-arm64-build | |
| build_libicu_osx_universal: | |
| needs: [build_libicu_osx] | |
| runs-on: 'macos-15' | |
| steps: | |
| - name: Merge libicu binaries | |
| uses: actions/upload-artifact/merge@v4 | |
| with: | |
| name: libicu-osx-merged | |
| pattern: 'libicu-osx-*' | |
| separate-directories: true | |
| - name: Download merged libicu binaries | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: libicu-osx-merged | |
| path: ./libicu-osx-merged | |
| - name: Create universal libicu binaries | |
| run: | | |
| mkdir libicu_osx_universal | |
| lipo -create libicu-osx-merged/**/libicuuc.dylib -output libicu_osx_universal/libicuuc.dylib | |
| lipo -create libicu-osx-merged/**/libicudata.dylib -output libicu_osx_universal/libicudata.dylib | |
| - name: Upload universal libicu binaries | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: libicu_osx_universal | |
| path: ./libicu_osx_universal/* | |
| package: | |
| needs: [build_unoicu, build_icudt, build_libicu_osx_universal, build_libicu_iossim_universal, build_libicu_ios] | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Merge artifacts | |
| uses: actions/upload-artifact/merge@v4 | |
| with: | |
| name: merged-artifacts | |
| pattern: '{libicu_osx_universal,libicu_iossim_universal,libicu_ios,unoicu-*,icudt.dat}' | |
| separate-directories: true | |
| - name: Download merged artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: merged-artifacts | |
| path: ./merged-artifacts | |
| - name: List files | |
| run: | | |
| Get-ChildItem -Recurse . | |
| - name: Move binaries to correct locations | |
| shell: bash | |
| run: | | |
| mkdir nuget/uno.icu-macos/libicu | |
| mv merged-artifacts/libicu_osx_universal/{libicuuc,libicudata}.dylib ./nuget/uno.icu-macos/libicu | |
| mkdir nuget/uno.icu-ios/iossim | |
| mv merged-artifacts/libicu_iossim_universal/{libicuuc,libicudata}.a ./nuget/uno.icu-ios/iossim | |
| mkdir nuget/uno.icu-ios/ios | |
| mv merged-artifacts/libicu_ios/{libicuuc,libicudata}.a ./nuget/uno.icu-ios/ios | |
| mv ./merged-artifacts/icudt.dat/icudt.dat ./nuget/uno.icu-wasm/build | |
| mkdir -p ./nuget/uno.icu-wasm/buildTransitive/native/unoicu.a | |
| pushd merged-artifacts | |
| for dir in unoicu-*; do | |
| new_name="${dir#unoicu-}" | |
| mkdir -p ../nuget/uno.icu-wasm/buildTransitive/native/unoicu.a/"$new_name"/st | |
| cp -r "$dir"/unoicu.a ../nuget/uno.icu-wasm/buildTransitive/native/unoicu.a/"$new_name"/st/unoicu.a | |
| done | |
| popd | |
| - name: List files | |
| run: | | |
| Get-ChildItem -Recurse . | |
| - uses: dotnet/nbgv@f088059084cb5d872e9d1a994433ca6440c2bf72 # v0.4.2 | |
| id: nbgv | |
| with: | |
| toolVersion: 3.6.139 | |
| setAllVars: true | |
| - name: Setup .NET SDK | |
| uses: actions/[email protected] | |
| with: | |
| dotnet-version: 8.0.100 | |
| - name: Build nuget | |
| run: | | |
| pushd nuget | |
| .\nuget.exe pack uno.icu-wasm/uno.icu-wasm.nuspec -version ${{ steps.nbgv.outputs.SemVer2 }} | |
| .\nuget.exe pack uno.icu-macos/uno.icu-macos.nuspec -version ${{ steps.nbgv.outputs.SemVer2 }} | |
| .\nuget.exe pack uno.icu-ios/uno.icu-ios.nuspec -version ${{ steps.nbgv.outputs.SemVer2 }} | |
| popd | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: nuget | |
| path: ./nuget/*.nupkg | |
| sign: | |
| name: Sign Package | |
| if: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/')) }} | |
| runs-on: windows-latest | |
| environment: PackageSign | |
| permissions: | |
| id-token: write # Required for requesting the JWT | |
| needs: | |
| - package | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v2 | |
| - name: Download Artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: nuget | |
| path: artifacts\NuGet | |
| - name: Setup .NET SDK | |
| uses: actions/setup-dotnet@v1 | |
| with: | |
| dotnet-version: '9.0.x' | |
| # Install the code signing tool | |
| - name: Install Sign CLI tool | |
| run: dotnet tool install --tool-path . sign --version 0.9.1-beta.25278.1 | |
| # Login to Azure using a ServicePrincipal configured to authenticate agaist a GitHub Action | |
| - name: 'Az CLI login' | |
| uses: azure/login@v1 | |
| with: | |
| allow-no-subscriptions: true | |
| client-id: ${{ secrets.SIGN_AZURE_CLIENT_ID }} | |
| tenant-id: ${{ secrets.SIGN_AZURE_TENANT_ID }} | |
| subscription-id: ${{ secrets.SIGN_AZURE_SUBSCRIPTION_ID }} | |
| - name: List files | |
| run: | | |
| Get-ChildItem -Recurse . | |
| # Run the signing command | |
| - name: Sign artifacts | |
| shell: pwsh | |
| run: > | |
| ./sign code azure-key-vault | |
| artifacts\NuGet\*.nupkg | |
| --publisher-name "Uno Platform" | |
| --description "uno.icu" | |
| --description-url "https://github.com/${{ env.GITHUB_REPOSITORY }}" | |
| --azure-key-vault-managed-identity true | |
| --azure-key-vault-url "${{ secrets.SIGN_KEY_VAULT_URL }}" | |
| --azure-key-vault-certificate "${{ secrets.SIGN_KEY_VAULT_CERTIFICATE_ID }}" | |
| --verbosity information | |
| - name: Upload Signed Artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: NuGet-Signed | |
| path: .\artifacts\NuGet | |
| publish_dev: | |
| name: Publish Dev | |
| if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | |
| runs-on: windows-latest | |
| needs: | |
| - sign | |
| steps: | |
| - name: Download Artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: NuGet-Signed | |
| path: artifacts | |
| - name: NuGet Push | |
| shell: pwsh | |
| run: | | |
| dotnet nuget push artifacts\*.nupkg -s https://api.nuget.org/v3/index.json -k "${{ secrets.NUGET_ORG_API_KEY }}" | |
| publish_prod: | |
| name: Publish Production | |
| if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/heads/release/') }} | |
| runs-on: windows-latest | |
| environment: Production | |
| needs: | |
| - sign | |
| permissions: | |
| contents: write # allow pushing tags | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Download Artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: NuGet-Signed | |
| path: artifacts | |
| - name: NuGet Push | |
| shell: pwsh | |
| run: | | |
| dotnet nuget push artifacts\*.nupkg -s https://api.nuget.org/v3/index.json -k "${{ secrets.NUGET_ORG_API_KEY }}" | |
| - name: Tag Release | |
| uses: ./.github/workflows/actions/tag-release | |
| build_libicu_iossim: | |
| strategy: | |
| matrix: | |
| arch: [ 'arm64', 'x86_64' ] | |
| runs-on: 'macos-15' # arm64 | |
| needs: build_libicu_osx | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Download Artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: libicu-osx-arm64-build | |
| path: ./osx-arm64-build | |
| - name: Build ICU | |
| run: | | |
| # Thanks to https://github.com/apotocki/icu4c-iosx for the configure options | |
| curl -L -o icu.zip ${ICU_SOURCE_ZIP_URL} | |
| mkdir icu | |
| unzip -d icu icu.zip | |
| export ICU_DATA_FILTER_FILE="$PWD/src/cldr_data/filters_macosios.json" | |
| CROSS_BUILD_DIR="$(pwd)/osx-arm64-build" | |
| chmod +x $CROSS_BUILD_DIR/source/bin/* # the exec bit is lost during github actions uploading and downloading | |
| pushd icu/$(ls icu)/icu4c/source | |
| ./configure --enable-static --disable-shared --with-data-packaging=static --disable-tools --disable-extras --disable-tests --disable-samples --disable-dyload --host=arm-apple-darwin --build=${{ matrix.arch }}-apple --with-cross-build="$CROSS_BUILD_DIR"/source CFLAGS="-arch ${{ matrix.arch }} -isysroot $(xcode-select -print-path)/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk -mios-simulator-version-min=13.4" CXXFLAGS="-arch ${{ matrix.arch }} -isysroot $(xcode-select -print-path)/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk -mios-simulator-version-min=13.4 -c -stdlib=libc++ --std=c++17" LDFLAGS="-stdlib=libc++ -lstdc++" | |
| make -j $(sysctl -n hw.physicalcpu) | |
| popd | |
| mkdir lib | |
| cp icu/$(ls icu)/icu4c/source/lib/libicuuc.a icu/$(ls icu)/icu4c/source/lib/libicudata.a lib | |
| - name: Upload binaries | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: libicu-iossim-${{ matrix.arch }} | |
| path: ./lib | |
| build_libicu_ios: | |
| runs-on: 'macos-15' # arm64 | |
| needs: build_libicu_osx | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Download Artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: libicu-osx-arm64-build | |
| path: ./osx-arm64-build | |
| - name: Build ICU | |
| run: | | |
| # Thanks to https://github.com/apotocki/icu4c-iosx for the configure options | |
| curl -L -o icu.zip ${ICU_SOURCE_ZIP_URL} | |
| mkdir icu | |
| unzip -d icu icu.zip | |
| export ICU_DATA_FILTER_FILE="$PWD/src/cldr_data/filters_macosios.json" | |
| CROSS_BUILD_DIR="$(pwd)/osx-arm64-build" | |
| chmod +x $CROSS_BUILD_DIR/source/bin/* # the exec bit is lost during github actions uploading and downloading | |
| pushd icu/$(ls icu)/icu4c/source | |
| ./configure --enable-static --disable-shared --with-data-packaging=static --disable-tools --disable-extras --disable-tests --disable-samples --disable-dyload --host=arm-apple-darwin --build=arm-apple --with-cross-build="$CROSS_BUILD_DIR"/source CFLAGS="-arch arm64 -isysroot $(xcode-select -print-path)/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk -mios-version-min=13.4" CXXFLAGS="-arch arm64 -isysroot $(xcode-select -print-path)/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk -mios-version-min=13.4 -c -stdlib=libc++ --std=c++17" LDFLAGS="-stdlib=libc++ -lstdc++" | |
| make -j $(sysctl -n hw.physicalcpu) | |
| popd | |
| mkdir lib | |
| cp icu/$(ls icu)/icu4c/source/lib/libicuuc.a icu/$(ls icu)/icu4c/source/lib/libicudata.a lib | |
| - name: Upload binaries | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: libicu_ios | |
| path: ./lib | |
| build_libicu_iossim_universal: | |
| needs: [build_libicu_iossim] | |
| runs-on: 'macos-15' | |
| steps: | |
| - name: Merge libicu binaries | |
| uses: actions/upload-artifact/merge@v4 | |
| with: | |
| name: libicu-iossim-merged | |
| pattern: 'libicu-iossim-*' | |
| separate-directories: true | |
| - name: Download merged libicu binaries | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: libicu-iossim-merged | |
| path: ./libicu-iossim-merged | |
| - name: Create universal libicu binaries | |
| run: | | |
| mkdir libicu_iossim_universal | |
| lipo -create libicu-iossim-merged/**/libicuuc.a -output libicu_iossim_universal/libicuuc.a | |
| lipo -create libicu-iossim-merged/**/libicudata.a -output libicu_iossim_universal/libicudata.a | |
| - name: Upload universal libicu binaries | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: libicu_iossim_universal | |
| path: ./libicu_iossim_universal/* |