Skip to content

ci: remove build_stats since archive uploading statts #9

ci: remove build_stats since archive uploading statts

ci: remove build_stats since archive uploading statts #9

Workflow file for this run

name: Archive
on:
push:
jobs:
archive:
strategy:
matrix:
xcode: ["16.2"]
machine:
- "macOS-15"
runs-on: ${{ matrix.machine }}
steps:
- uses: actions/checkout@v4
- name: Select Xcode
run: sudo xcode-select --switch /Applications/Xcode_${{ matrix.xcode }}.app
- name: bundle install
run: bundle update --bundler && bundle install
- name: Install CocoaPods dependencies
run: bundle exec pod install
- run: git config --global core.quotepath false # for Ikemen on SwiftPM
- run: xcrun agvtool new-version -all ${{ github.run_id }}
- name: Build
run: |
set -o pipefail
xcodebuild \
-workspace iMast.xcworkspace -scheme "iMast iOS" -destination "generic/platform=iOS" \
archive -archivePath "./archive.xcarchive" \
CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY="" AD_HOC_CODE_SIGNING_ALLOWED=YES | tee ./xcodebuild.log | xcpretty -c
- uses: actions/upload-artifact@v4
if: always()
with:
name: xcodebuild.Xcode.${{ matrix.xcode }}.${{ matrix.machine }}.log
path: ./xcodebuild.log
- uses: actions/upload-artifact@v4
with:
name: iMast.iOS.GHA.run.${{ github.run_id }}.Xcode.${{ matrix.xcode }}.${{ matrix.machine }}.xcarchive
path: ./archive.xcarchive
- name: Export Stats
run: python3 .github/export_archive_stats.py ./archive.xcarchive | tee stats.json
- name: Upload Stats
run: |
curl -fvX POST --data-binary "@stats.json" -H "Content-Type: application/json" \
-H "X-Space-App-Key: ${{ secrets.BINSTATSD_API_KEY }}" \
-H "X-IBS-Branch: ${{ github.ref_name }}" \
-H "X-IBS-Commit: $(git rev-parse HEAD)" \
-H "X-IBS-Parent: $(git rev-parse HEAD^)" \
-H "X-IBS-Repo: ${{ github.repository }}" \
-H "X-IBS-RunID: ${{ github.run_id }}" \
-H "X-IBS-Platform: iOS" \
-H "User-Agent: iMast_BuildStatsUploader/1.0" \
https://${{ secrets.BINSTATSD_HOST }}/api/v1/register