Bump TSDK to v0.22.11 #384
Workflow file for this run
This file contains 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: CI | |
on: | |
pull_request: | |
branches: [ main ] | |
push: | |
branches: [ main ] | |
permissions: | |
contents: write | |
jobs: | |
build-tsdk: | |
runs-on: macos-13 | |
strategy: | |
matrix: | |
spec: | |
- { name: 'build-iphoneos-arm64', toolchain: 'iOS-arm64' } | |
- { name: 'build-iphonesimulator-x86_64', toolchain: 'iOS-Simulator-x86_64' } | |
- { name: 'build-iphonesimulator-arm64', toolchain: 'iOS-Simulator-arm64' } | |
- { name: 'build-macosx-arm64', toolchain: 'macOS-arm64' } | |
- { name: 'build-macosx-x86_64', toolchain: 'macOS-x86_64' } | |
steps: | |
- name: Checkout Project | |
uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- uses: maxim-lobanov/setup-xcode@v1 | |
with: | |
xcode-version: '15.0-beta' | |
- uses: lukka/run-vcpkg@v10 | |
with: | |
vcpkgGitCommitId: '19af97cba8ca48474e4ad15a24ed50271a9ecdac' | |
- name: ${{ matrix.spec.name }} | |
env: | |
TOOLCHAIN: ${{ matrix.spec.toolchain && format('../../toolchains/{0}.cmake', matrix.spec.toolchain) || '' }} | |
run: | | |
(cd deps/ziti-tunnel-sdk-c && git fetch --tags) | |
cmake -DCMAKE_BUILD_TYPE=Release -DTLSUV_TLSLIB=mbedtls -DMBEDTLS_FATAL_WARNINGS:BOOL=OFF -DEXCLUDE_PROGRAMS=ON -DZITI_TUNNEL_BUILD_TESTS=OFF -DCMAKE_TOOLCHAIN_FILE="${TOOLCHAIN}" -DDISABLE_SEMVER_VERIFICATION=ON -S ./deps/ziti-tunnel-sdk-c -B ./deps/ziti-tunnel-sdk-c/${{ matrix.spec.name }} | |
cmake --build ./deps/ziti-tunnel-sdk-c/${{ matrix.spec.name }} | |
tar -cvzf ${{ matrix.spec.name }}.tgz -C ./deps/ziti-tunnel-sdk-c ${{ matrix.spec.name }} | |
- name: Upload Build | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ matrix.spec.name }} | |
path: ${{ matrix.spec.name }}.tgz | |
build-cziti: | |
runs-on: macos-latest | |
needs: [ build-tsdk ] | |
steps: | |
- name: Checkout Project | |
uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- uses: maxim-lobanov/setup-xcode@v1 | |
with: | |
xcode-version: '14.2.0' | |
- name: Download Artifacts | |
uses: actions/download-artifact@v3 | |
- name: Extract TSDK Builds | |
run: | | |
ARTIFACT="build-iphoneos-arm64"; tar -xzvf ${ARTIFACT}/${ARTIFACT}.tgz -C ./deps/ziti-tunnel-sdk-c | |
ARTIFACT="build-iphonesimulator-x86_64"; tar -xzvf ${ARTIFACT}/${ARTIFACT}.tgz -C ./deps/ziti-tunnel-sdk-c | |
ARTIFACT="build-iphonesimulator-arm64"; tar -xzvf ${ARTIFACT}/${ARTIFACT}.tgz -C ./deps/ziti-tunnel-sdk-c | |
ARTIFACT="build-macosx-x86_64"; tar -xzvf ${ARTIFACT}/${ARTIFACT}.tgz -C ./deps/ziti-tunnel-sdk-c | |
ARTIFACT="build-macosx-arm64"; tar -xzvf ${ARTIFACT}/${ARTIFACT}.tgz -C ./deps/ziti-tunnel-sdk-c | |
- name: Build CZiti | |
run: | | |
set -o pipefail | |
xcodebuild build -configuration Release -scheme CZiti-iOS -derivedDataPath ./DerivedData/CZiti \ | |
-arch arm64 -sdk iphoneos | xcpretty | |
xcodebuild build -configuration Release -scheme CZiti-iOS -derivedDataPath ./DerivedData/CZiti \ | |
-arch x86_64 -arch arm64 ONLY_ACTIVE_ARCH=NO -sdk iphonesimulator | xcpretty | |
xcodebuild build -configuration Release -scheme CZiti-macOS -derivedDataPath ./DerivedData/CZiti \ | |
-arch x86_64 -arch arm64 ONLY_ACTIVE_ARCH=NO -sdk macosx | xcpretty | |
- name: Create Frameworks | |
run: | | |
./make_dist.sh | |
pushd ./dist && zip -r ../CZiti.xcframework.zip CZiti.xcframework && popd | |
- name: Upload CZiti.xcframework | |
uses: actions/upload-artifact@v3 | |
with: | |
name: CZiti.xcframework | |
path: CZiti.xcframework.zip | |
- name: Gen Docs | |
run: | | |
gem install jazzy | |
jazzy --hide-documentation-coverage -x '-arch,x86_64,-scheme,CZiti-macOS,-sdk,macosx' -m CZiti | |
tar -cvzf ./ziti-sdk-swift-docs.tgz -C ./docs . | |
- name: Upload Docs | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ziti-sdk-swift-docs | |
path: ziti-sdk-swift-docs.tgz | |
draft-release: | |
runs-on: ubuntu-latest | |
needs: [ build-cziti ] | |
if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
steps: | |
- name: Checkout Project | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Download Docs | |
uses: actions/download-artifact@v3 | |
with: | |
name: ziti-sdk-swift-docs | |
- name: Download CZiti.xcframework | |
uses: actions/download-artifact@v3 | |
with: | |
name: CZiti.xcframework | |
- name: Draft Release | |
id: release_drafter | |
uses: release-drafter/release-drafter@v5 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Upload Docs | |
uses: shogo82148/actions-upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.release_drafter.outputs.upload_url }} | |
asset_path: ./ziti-sdk-swift-docs.tgz | |
asset_name: ziti-sdk-swift-docs.tgz | |
asset_content_type: application/tgz | |
overwrite: true | |
- name: Upload CZiti.xcframework | |
uses: shogo82148/actions-upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.release_drafter.outputs.upload_url }} | |
asset_path: ./CZiti.xcframework.zip | |
asset_name: CZiti.xcframework.zip | |
asset_content_type: application/zip | |
overwrite: true |