subsurface/.github/workflows/ios.yml
Michael Keller 331d6712c6 CICD: Move MacOS / iOS Build Qt Resources into GitHub.
Move the Qt resources required for the build for MacOS and iOS into
GitHub, into their own repositories. This removes the need to publish
them on an external file server and download them from there for every
build.
It will also make it easier for contributors to update these resources
if needed.

Signed-off-by: Michael Keller <github@ike.ch>
2024-05-12 10:19:24 +12:00

57 lines
1.8 KiB
YAML

name: iOS
on:
push:
paths-ignore:
- scripts/docker/**
branches:
- master
pull_request:
paths-ignore:
- scripts/docker/**
branches:
- master
jobs:
build:
runs-on: macOS-11
steps:
- name: switch to Xcode 11
run: sudo xcode-select -s "/Applications/Xcode_11.7.app"
- name: checkout sources
uses: actions/checkout@v1
- name: setup Homebrew
run: brew install autoconf automake libtool pkg-config
- name: checkout Qt resources
uses: actions/checkout@v4
with:
repository: subsurface/qt-ios
ref: main
path: qt-ios
- name: store dummy version and build number for test build
id: version_number
run: |
echo "100" > latest-subsurface-buildnumber
echo "CICD-test-build" > latest-subsurface-buildnumber-extension
version=$(scripts/get-version)
echo "version=$version" >> $GITHUB_OUTPUT
- name: build Subsurface-mobile for iOS
run: |
cd ${{ github.workspace }}/..
git config --global --add safe.directory $GITHUB_WORKSPACE
git config --global --add safe.directory $GITHUB_WORKSPACE/libdivecomputer
export IOS_QT=$GITHUB_WORKSPACE/qt-ios
echo "build for simulator"
bash -x $GITHUB_WORKSPACE/packaging/ios/build.sh -simulator
# We need this in order to be able to access the file and publish it
mv build-Subsurface-mobile-Qt_5_14_1_for_iOS-Release/Release-iphonesimulator/Subsurface-mobile.app ${{ github.workspace }}/Subsurface-mobile-${{ steps.version_number.outputs.version }}.app
- name: publish artifacts
uses: actions/upload-artifact@v4
with:
name: Subsurface-iOS-${{ steps.version_number.outputs.version }}
path: Subsurface-mobile-*.app