mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-09 06:43:25 +01:00
- CI: improvements: dispatch simulator boot up in background and other fixes
This commit is contained in:
16
.github/workflows/reusable-build-workflow.yml
vendored
16
.github/workflows/reusable-build-workflow.yml
vendored
@@ -66,6 +66,12 @@ jobs:
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
# dispatch simulator boot in bg coz it take a while to boot-up fresh
|
||||
- name: Boot Simulator for testing
|
||||
run: |
|
||||
mkdir -p build/logs
|
||||
make -B boot-sim-async | tee -a build/logs/test.log
|
||||
|
||||
- name: Install dependencies - ldid & xcbeautify & xcpretty
|
||||
run: |
|
||||
brew install ldid xcbeautify
|
||||
@@ -246,8 +252,12 @@ jobs:
|
||||
- name: Convert to IPA
|
||||
run: make ipa | tee -a build/logs/build.log
|
||||
|
||||
- name: Boot Simulator for testing
|
||||
run: make -B boot-sim | tee -a build/logs/test.log
|
||||
|
||||
# we expect simulator to have been booted by now, so exit otherwise
|
||||
- name: Simulator Boot Check
|
||||
run: |
|
||||
mkdir -p build/logs
|
||||
make -B sim-boot-check | tee -a build/logs/test.log
|
||||
|
||||
- name: Start Recording UI tests (if DEBUG_RECORD_TESTS is set to 1)
|
||||
if: ${{ vars.DEBUG_RECORD_TESTS == '1' }}
|
||||
@@ -261,7 +271,7 @@ jobs:
|
||||
# using 'tee' to intercept stdout and log for detailed build-log
|
||||
run: |
|
||||
NSUnbufferedIO=YES make -B build-and-test 2>&1 | tee -a build/logs/test.log | xcbeautify --renderer github-actions && exit ${PIPESTATUS[0]}
|
||||
# NSUnbufferedIO=YES make boot-sim build-and-test 2>&1 | tee build/logs/test.log | xcpretty -r junit --output ./build/tests/test-results.xml && exit ${PIPESTATUS[0]}
|
||||
# NSUnbufferedIO=YES make -B build-and-test 2>&1 | tee build/logs/test.log | xcpretty -r junit --output ./build/tests/test-results.xml && exit ${PIPESTATUS[0]}
|
||||
|
||||
- name: Stop Recording tests
|
||||
if: ${{ always() && env.RECORD_PID != '' }}
|
||||
|
||||
20
Makefile
20
Makefile
@@ -208,19 +208,23 @@ build-and-test:
|
||||
# code cov probably cause full recompilation of tests even if archive target was just invoked before tests
|
||||
# -enableCodeCoverage YES \
|
||||
|
||||
boot-sim:
|
||||
boot-sim-async:
|
||||
@if xcrun simctl list devices "iPhone 16 Pro" | grep -q "Booted"; then \
|
||||
echo "Simulator 'iPhone 16 Pro' is already booted."; \
|
||||
else \
|
||||
echo "Booting simulator 'iPhone 16 Pro'..."; \
|
||||
xcrun simctl boot "iPhone 16 Pro"; \
|
||||
\
|
||||
if xcrun simctl list devices "iPhone 16 Pro" | grep -q "Booted"; then \
|
||||
echo "Simulator 'iPhone 16 Pro' is now booted."; \
|
||||
echo "Booting simulator 'iPhone 16 Pro' asynchronously..."; \
|
||||
# Dispatch boot in the background
|
||||
xcrun simctl boot "iPhone 16 Pro" & \
|
||||
echo "Simulator boot command dispatched."; \
|
||||
fi
|
||||
|
||||
sim-boot-check:
|
||||
@echo "Checking simulator boot status..."
|
||||
@if xcrun simctl list devices "iPhone 16 Pro" | grep -q "Booted"; then \
|
||||
echo "Simulator 'iPhone 16 Pro' is booted."; \
|
||||
else \
|
||||
echo "Simulator bootup failed..."; \
|
||||
echo "Simulator bootup failed or is not booted yet."; \
|
||||
exit 1; \
|
||||
fi \
|
||||
fi
|
||||
|
||||
clean-build:
|
||||
|
||||
Reference in New Issue
Block a user