- CI: Included tests for CI builds

This commit is contained in:
Magesh K
2025-02-22 02:37:30 +05:30
parent e43bff5f8f
commit 5323fdadcf
3 changed files with 24 additions and 4 deletions

View File

@@ -66,8 +66,10 @@ jobs:
with:
submodules: recursive
- name: Install dependencies - ldid & xcbeautify
run: brew install ldid xcbeautify
- name: Install dependencies - ldid & xcbeautify & xcpretty
run: |
brew install ldid xcbeautify
gem install xcpretty # for test reports
- name: Set ref based on is_shared_build_num
if: ${{ inputs.is_beta }}
@@ -226,10 +228,17 @@ jobs:
run: |
echo "BUNDLE_ID_SUFFIX=${{ inputs.bundle_id_suffix }}" >> $GITHUB_ENV
- name: Build SideStore
- name: Build and run SideStore Tests
# using 'tee' to intercept stdout and log for detailed build-log
run: |
NSUnbufferedIO=YES make boot-sim build-and-test 2>&1 | tee build.log | xcpretty -r junit --output ./build/tests/test-results.xml && exit ${PIPESTATUS[0]}
echo "--------------------------------------------------------------------" >> build.log
- name: Build SideStore archive
# using 'tee' to intercept stdout and log for detailed build-log
run: |
NSUnbufferedIO=YES make build 2>&1 | tee build.log | xcbeautify --renderer github-actions && exit ${PIPESTATUS[0]}
echo "--------------------------------------------------------------------" >> build.log
- name: Fakesign app
run: make fakesign | tee -a build.log
@@ -329,6 +338,12 @@ jobs:
name: SideStore-${{ steps.version.outputs.version }}-dSYM
path: ./SideStore.xcarchive/dSYMs/*
- name: Upload Test Artifact
uses: actions/upload-artifact@v4
with:
name: test-results-${{ steps.version.outputs.version }}.zip
path: ./build/tests/*
- name: Upload encrypted-build_log.zip
uses: actions/upload-artifact@v4
with:

4
.gitignore vendored
View File

@@ -64,3 +64,7 @@ SideStore/.skip-prebuilt-fetch-em_proxy
# coz SPM then resolves packages using the stale entries in this file
*.xcodeproj/**/Package.resolved
*.xcworkspace/**/Package.resolved
# build/test artifacts
build.log
report.html

View File

@@ -211,6 +211,7 @@ build-and-test:
-scheme SideStore \
-destination 'platform=iOS Simulator,name=iPhone 16 Pro,OS=18.2' \
-enableCodeCoverage YES \
-resultBundlePath build/tests/test-results.xcresult \
$(COMMON_BUILD_SETTINGS)
clean-build: