Skip to content

Commit

Permalink
Don't build iOS if not on the opengisch/QField repo
Browse files Browse the repository at this point in the history
  • Loading branch information
nirvn committed Sep 9, 2024
1 parent cf8db60 commit f68cbc9
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,20 @@ jobs:
steps:
- name: 🐣 Checkout
uses: actions/checkout@v4
if: ${{ env.SENTRY_AUTH_TOKEN != '' }}
with:
submodules: recursive

- name: Reclaim disk space
if: ${{ env.SENTRY_AUTH_TOKEN != '' }}
run: |
rm -rf /Applications/Xcode_14*
rm -rf /Applications/Xcode_16*
rm -rf /Users/runner/Library/Android/sdk
- name: 🌾 Prepare variables
id: vars
if: ${{ env.SENTRY_AUTH_TOKEN != '' }}
run: |
./scripts/ci/env_gh.sh
Expand All @@ -51,6 +54,7 @@ jobs:

- name: 💎 Setup ruby
uses: ruby/setup-ruby@v1
if: ${{ env.SENTRY_AUTH_TOKEN != '' }}
with:
ruby-version: '3.2' # Not needed with a .ruby-version file
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
Expand All @@ -64,6 +68,7 @@ jobs:
- name: 🍹 Prepare ios build env
if: ${{ env.SENTRY_AUTH_TOKEN != '' }}
run: |
# Workaround GitHub Actions Python issues
brew unlink python && brew link --overwrite python
Expand All @@ -77,26 +82,31 @@ jobs:
- name: 🐩 Install CMake and Ninja
uses: lukka/get-cmake@latest
if: ${{ env.SENTRY_AUTH_TOKEN != '' }}
with:
cmakeVersion: 3.29.0

- name: 🐍 Setup Python
uses: actions/setup-python@v5
if: ${{ env.SENTRY_AUTH_TOKEN != '' }}
with:
python-version: '3.11'

- name: 🍭 Setup XCode
uses: maxim-lobanov/[email protected]
if: ${{ env.SENTRY_AUTH_TOKEN != '' }}
with:
xcode-version: latest-stable

- name: 🍮 ccache
uses: hendrikmuhs/[email protected]
if: ${{ env.SENTRY_AUTH_TOKEN != '' }}
with:
key: ccache-ios
max-size: 200M

- name: 🌱 Install dependencies and generate project files
if: ${{ env.SENTRY_AUTH_TOKEN != '' }}
run: |
source ./scripts/version_number.sh
source ./scripts/ci/generate-version-details.sh
Expand Down Expand Up @@ -142,6 +152,7 @@ jobs:
/Users/runner/builddir/**/*.log
- name: 📦 Package
if: ${{ env.SENTRY_AUTH_TOKEN != '' }}
run: |
cmake --build /Users/runner/builddir --target bundle --config Release
Expand All @@ -157,6 +168,7 @@ jobs:
- name: 📤 Upload qfield Ipa
uses: actions/upload-artifact@v4
if: ${{ env.SENTRY_AUTH_TOKEN != '' }}
with:
name: qfield-${{ env.TRIPLET }}-${{ env.DEPLOYMENT_TARGET }}.ipa
path: /Users/runner/builddir/qfieldIpa/QField.ipa
Expand Down

1 comment on commit f68cbc9

@qfield-fairy
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.