Skip to content

Commit

Permalink
Run build only for flaky platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
Kylmakalle committed Sep 28, 2024
1 parent 9886d23 commit 984dba1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,15 @@ jobs:
os_list: "17.0"
device_name: "Apple TV 4K (3rd generation) (at 1080p)"
# Became much slower on CI with macos-14 images, while working fine locally
# - platform: "watchOS-simulator"
# os_list: "9.4"
# device_name: "Apple Watch Series 8 (45mm)"
# we will only build them
- platform: "watchOS-simulator"
os_list: "9.4"
device_name: "Apple Watch Series 8 (45mm)"
action: "build"
- platform: "visionOS-simulator"
os_list: "1.0"
device_name: "Apple Vision Pro"
action: "build"
steps:
- name: Download Workspace
uses: actions/download-artifact@v4
Expand All @@ -81,7 +84,7 @@ jobs:
- name: Tests (${{ matrix.platform }})
run: |
chmod +x ./scripts/test.sh
./scripts/test.sh ${{ matrix.platform }} "${{ matrix.os_list }}" "${{ matrix.device_name }}" || ./scripts/test.sh ${{ matrix.platform }} "${{ matrix.os_list }}" "${{ matrix.device_name }}"
./scripts/test.sh ${{ matrix.platform }} "${{ matrix.os_list }}" "${{ matrix.device_name }}" "${{ matrix.action }}" || ./scripts/test.sh ${{ matrix.platform }} "${{ matrix.os_list }}" "${{ matrix.device_name }}" "${{ matrix.action }}"
release:
if: ${{ github.ref == 'refs/heads/main' }}
Expand Down
8 changes: 4 additions & 4 deletions scripts/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ set -ex
PLATFORM="$1"
OS_LIST="$2"
NAME="$3"
ACTIONS=${4:-test}

if [[ $PLATFORM = "iOS-simulator" ]]; then
SDK="iphonesimulator"
Expand All @@ -26,10 +27,9 @@ else
fi

if [[ $OS_LIST != "" ]]; then
for OS in $OS_LIST;
do
xcodebuild -scheme TDLibKit -sdk ${SDK} -destination "${DESTINATION},OS=${OS}" clean test
for OS in $OS_LIST; do
xcodebuild -scheme TDLibKit -sdk ${SDK} -destination "${DESTINATION},OS=${OS}" clean ${ACTIONS}
done
else
xcodebuild -scheme TDLibKit -sdk ${SDK} -destination "${DESTINATION}" clean test
xcodebuild -scheme TDLibKit -sdk ${SDK} -destination "${DESTINATION}" clean ${ACTIONS}
fi

0 comments on commit 984dba1

Please sign in to comment.