2019-10-19 09:37:28 +00:00
|
|
|
name: iOS
|
2019-10-26 01:04:01 +00:00
|
|
|
on:
|
|
|
|
push:
|
2024-01-20 12:07:33 +00:00
|
|
|
paths-ignore:
|
|
|
|
- scripts/docker/**
|
2019-10-26 01:04:01 +00:00
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
pull_request:
|
2024-01-20 12:07:33 +00:00
|
|
|
paths-ignore:
|
|
|
|
- scripts/docker/**
|
2019-10-26 01:04:01 +00:00
|
|
|
branches:
|
|
|
|
- master
|
2019-10-19 09:37:28 +00:00
|
|
|
|
|
|
|
jobs:
|
2024-05-09 01:19:21 +00:00
|
|
|
build:
|
2022-09-23 19:13:06 +00:00
|
|
|
runs-on: macOS-11
|
2019-10-19 09:37:28 +00:00
|
|
|
steps:
|
2020-11-01 19:27:06 +00:00
|
|
|
- name: switch to Xcode 11
|
|
|
|
run: sudo xcode-select -s "/Applications/Xcode_11.7.app"
|
2024-01-05 04:44:31 +00:00
|
|
|
|
2019-10-19 09:37:28 +00:00
|
|
|
- name: checkout sources
|
|
|
|
uses: actions/checkout@v1
|
2024-01-05 04:44:31 +00:00
|
|
|
|
2019-10-19 09:37:28 +00:00
|
|
|
- name: setup Homebrew
|
2020-04-04 17:25:47 +00:00
|
|
|
run: brew install autoconf automake libtool pkg-config
|
2024-01-05 04:44:31 +00:00
|
|
|
|
2024-05-09 01:19:21 +00:00
|
|
|
- name: checkout Qt resources
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
with:
|
|
|
|
repository: subsurface/qt-ios
|
|
|
|
ref: main
|
|
|
|
path: qt-ios
|
2024-01-05 04:44:31 +00:00
|
|
|
|
|
|
|
- name: store dummy version and build number for test build
|
2024-05-09 01:19:21 +00:00
|
|
|
id: version_number
|
2024-01-05 04:44:31 +00:00
|
|
|
run: |
|
|
|
|
echo "100" > latest-subsurface-buildnumber
|
|
|
|
echo "CICD-test-build" > latest-subsurface-buildnumber-extension
|
2024-05-09 01:19:21 +00:00
|
|
|
version=$(scripts/get-version)
|
|
|
|
echo "version=$version" >> $GITHUB_OUTPUT
|
2024-01-05 04:44:31 +00:00
|
|
|
|
2019-10-19 09:37:28 +00:00
|
|
|
- name: build Subsurface-mobile for iOS
|
|
|
|
run: |
|
2024-05-09 01:19:21 +00:00
|
|
|
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
|
2020-11-19 04:09:53 +00:00
|
|
|
echo "build for simulator"
|
|
|
|
bash -x $GITHUB_WORKSPACE/packaging/ios/build.sh -simulator
|
2024-05-09 01:19:21 +00:00
|
|
|
# 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
|