Skip to content

version

version #25

Workflow file for this run

name: iOS CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
runs-on: macos-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Show Xcode and Swift version
run: |
xcodebuild -version
swift --version
- name: Build Caliper CLI
run: |
echo "🔨 Building Caliper CLI tool..."
swift build -c release
echo "✅ Caliper built successfully"
.build/release/caliper --help
- name: Build Sample App (IPA + Link Map)
working-directory: Sample
run: |
echo "🚀 Building Sample App with Link Map..."
chmod +x build.sh
./build.sh
- name: Verify build artifacts
working-directory: Sample
run: |
echo "📦 Checking build artifacts..."
ls -lh build/CaliperSampleApp.ipa
ls -lh build/CaliperSampleApp-LinkMap.txt
- name: Run Caliper Analysis
working-directory: Sample
run: |
echo "📊 Running Caliper analysis..."
../.build/release/caliper \
--ipa-path build/CaliperSampleApp.ipa \
--link-map-path build/CaliperSampleApp-LinkMap.txt \
--package-resolved-path CaliperSampleApp.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved \
--ownership-file module-ownership.yml
echo "✅ Analysis complete!"
ls -lh report.json report.html
- name: Prepare GitHub Pages
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
run: |
echo "📄 Preparing index.html for GitHub Pages..."
mkdir -p gh-pages
cp Sample/report.html gh-pages/index.html
echo "✅ Copied report.html to gh-pages/index.html"
- name: Deploy to GitHub Pages
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./gh-pages
publish_branch: gh-pages
destination_dir: .
keep_files: false
enable_jekyll: false
commit_message: 'Deploy Caliper report from ${{ github.sha }}'
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'