Skip to content

Commit 3d06179

Browse files
committed
Update CI to build iOS target
1 parent 5d61529 commit 3d06179

File tree

3 files changed

+96
-4
lines changed

3 files changed

+96
-4
lines changed

.github/workflows/build-apps.yml

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,21 @@ on:
1010

1111
jobs:
1212
build:
13-
name: 🔨 Build
14-
runs-on: ubuntu-24.04
13+
name: 🔨 Build - ${{ matrix.name }}
14+
runs-on: ${{ matrix.os }}
1515
strategy:
1616
fail-fast: false
1717
matrix:
1818
include:
1919
- name: 📱 Android App
2020
gradle_module: tasks-app-android
21+
os: ubuntu-24.04
2122
- name: 🖥️ Desktop App
2223
gradle_module: tasks-app-desktop
24+
os: ubuntu-24.04
25+
- name: 🍎 iOS App
26+
gradle_module: tasks-app-ios
27+
os: macos-15
2328
permissions:
2429
contents: write
2530
checks: write
@@ -30,12 +35,24 @@ jobs:
3035
- uses: actions/checkout@v4
3136
- uses: ./.github/actions/setup-jdk-gradle
3237

38+
- name: Cache Gradle
39+
if: ${{ matrix.gradle_module == 'tasks-app-ios' }}
40+
uses: actions/cache@v4
41+
with:
42+
path: |
43+
.gradle
44+
$HOME/.m2/repository
45+
$HOME/.konan
46+
key: gradle-${{ runner.os }}-${{ hashFiles('gradle/libs.versions.toml', 'gradle/wrapper/gradle-wrapper.properties', '**/*.gradle.kts', '**/*.gradle') }}
47+
restore-keys: |
48+
gradle-${{ runner.os }}-
49+
3350
- name: 🔓 Decrypt secrets
3451
env:
3552
PLAYSTORE_SECRET_PASSPHRASE: ${{ secrets.PLAYSTORE_SECRET_PASSPHRASE }}
3653
run: ./_ci/decrypt_secrets.sh
3754

38-
- name: ${{ matrix.name }}
55+
- name: ${{ matrix.gradle_module }}
3956
env:
4057
PLAYSTORE_SECRET_PASSPHRASE: ${{ secrets.PLAYSTORE_SECRET_PASSPHRASE }}
4158
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
@@ -50,4 +67,6 @@ jobs:
5067
-Pplaystore.keystore.file="${PWD}/_ci/tasksApp.keystore" \
5168
-Pplaystore.keystore.password="${KEYSTORE_PASSWORD}" \
5269
-Pplaystore.keystore.key_password="${KEYSTORE_KEY_PASSWORD}"
70+
elif [ "${gradle_module}" = "tasks-app-ios" ]; then
71+
IOS_TARGET=simulator ./gradlew tasks-app-shared:linkDebugFrameworkIosSimulatorArm64
5372
fi

.github/workflows/e2e-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77

88
jobs:
99
check-changes:
10-
runs-on: ubuntu-latest
10+
runs-on: ubuntu-24.04
1111
outputs:
1212
changes-detected: ${{ steps.check.outputs.changes_detected }}
1313
steps:
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: 🍎 iOS App Nightly
2+
3+
on:
4+
schedule:
5+
- cron: '0 2 * * *'
6+
workflow_dispatch:
7+
8+
jobs:
9+
check-changes:
10+
runs-on: macos-15
11+
outputs:
12+
changes-detected: ${{ steps.check.outputs.changes_detected }}
13+
steps:
14+
- uses: actions/checkout@v4
15+
with:
16+
fetch-depth: 0
17+
18+
- name: Check for changes
19+
id: check
20+
run: |
21+
git fetch origin main
22+
if git log --since="24 hours ago" --pretty=format:%H -- . \
23+
':(exclude)website/' \
24+
':(exclude)fastlane/' \
25+
':(exclude)assets/' \
26+
':(exclude)**/*.md' \
27+
| grep .; then
28+
echo "changes_detected=true" >> "$GITHUB_OUTPUT"
29+
else
30+
echo "changes_detected=false" >> "$GITHUB_OUTPUT"
31+
fi
32+
33+
build-ios-app:
34+
timeout-minutes: 15
35+
needs: check-changes
36+
if: needs.check-changes.outputs.changes-detected == 'true' || github.event_name == 'workflow_dispatch'
37+
name: 🍎 Build iOS App
38+
runs-on: macos-15
39+
40+
steps:
41+
- uses: actions/checkout@v4
42+
- uses: ./.github/actions/setup-jdk-gradle
43+
44+
- name: Cache Gradle
45+
if: ${{ matrix.gradle_module == 'tasks-app-ios' }}
46+
uses: actions/cache@v4
47+
with:
48+
path: |
49+
.gradle
50+
$HOME/.m2/repository
51+
$HOME/.konan
52+
key: gradle-${{ runner.os }}-${{ hashFiles('gradle/libs.versions.toml', 'gradle/wrapper/gradle-wrapper.properties', '**/*.gradle.kts', '**/*.gradle') }}
53+
restore-keys: |
54+
gradle-${{ runner.os }}-
55+
56+
- name: 🔓 Decrypt secrets
57+
env:
58+
PLAYSTORE_SECRET_PASSPHRASE: ${{ secrets.PLAYSTORE_SECRET_PASSPHRASE }}
59+
run: ./_ci/decrypt_secrets.sh
60+
61+
- name: 🔨 Build
62+
run: |
63+
cd tasks-app-ios
64+
IOS_TARGET=simulator xcodebuild \
65+
-project Taskfolio.xcodeproj \
66+
-scheme Taskfolio \
67+
-sdk iphonesimulator \
68+
-arch arm64 \
69+
-configuration Debug \
70+
build \
71+
CODE_SIGNING_ALLOWED=NO \
72+
CODE_SIGN_IDENTITY="" \
73+
CODE_SIGNING_REQUIRED=NO

0 commit comments

Comments
 (0)