mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-01 00:13:24 +00:00
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>
This commit is contained in:
parent
f4e61aa5dc
commit
331d6712c6
3 changed files with 36 additions and 22 deletions
6
.github/workflows/android.yml
vendored
6
.github/workflows/android.yml
vendored
|
@ -11,13 +11,13 @@ on:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
|
|
||||||
env:
|
|
||||||
BUILD_ROOT: ${{ github.workspace }}/..
|
|
||||||
KEYSTORE_FILE: ${{ github.workspace }}/../subsurface.keystore
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
buildAndroid:
|
buildAndroid:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
BUILD_ROOT: ${{ github.workspace }}/..
|
||||||
|
KEYSTORE_FILE: ${{ github.workspace }}/../subsurface.keystore
|
||||||
container:
|
container:
|
||||||
image: docker://subsurface/android-build:5.15.2
|
image: docker://subsurface/android-build:5.15.2
|
||||||
|
|
||||||
|
|
35
.github/workflows/ios.yml
vendored
35
.github/workflows/ios.yml
vendored
|
@ -12,7 +12,7 @@ on:
|
||||||
- master
|
- master
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
iOSBuild:
|
build:
|
||||||
runs-on: macOS-11
|
runs-on: macOS-11
|
||||||
steps:
|
steps:
|
||||||
- name: switch to Xcode 11
|
- name: switch to Xcode 11
|
||||||
|
@ -24,25 +24,34 @@ jobs:
|
||||||
- name: setup Homebrew
|
- name: setup Homebrew
|
||||||
run: brew install autoconf automake libtool pkg-config
|
run: brew install autoconf automake libtool pkg-config
|
||||||
|
|
||||||
- name: set our Qt build
|
- name: checkout Qt resources
|
||||||
run: |
|
uses: actions/checkout@v4
|
||||||
env
|
with:
|
||||||
curl -L --output Qt-5.14.1-ios.tar.xz https://f002.backblazeb2.com/file/Subsurface-Travis/Qt-5.14.1-ios.tar.xz
|
repository: subsurface/qt-ios
|
||||||
mkdir -p $HOME/Qt
|
ref: main
|
||||||
xzcat Qt-5.14.1-ios.tar.xz | tar -x -C $HOME/Qt -f -
|
path: qt-ios
|
||||||
|
|
||||||
- name: store dummy version and build number for test build
|
- name: store dummy version and build number for test build
|
||||||
|
id: version_number
|
||||||
run: |
|
run: |
|
||||||
echo "100" > latest-subsurface-buildnumber
|
echo "100" > latest-subsurface-buildnumber
|
||||||
echo "CICD-test-build" > latest-subsurface-buildnumber-extension
|
echo "CICD-test-build" > latest-subsurface-buildnumber-extension
|
||||||
|
version=$(scripts/get-version)
|
||||||
|
echo "version=$version" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: build Subsurface-mobile for iOS
|
- name: build Subsurface-mobile for iOS
|
||||||
env:
|
|
||||||
SUBSURFACE_REPO_PATH: ${{ github.workspace }}
|
|
||||||
run: |
|
run: |
|
||||||
cd ${SUBSURFACE_REPO_PATH}/..
|
cd ${{ github.workspace }}/..
|
||||||
git config --global --add safe.directory ${SUBSURFACE_REPO_PATH}
|
git config --global --add safe.directory $GITHUB_WORKSPACE
|
||||||
git config --global --add safe.directory ${SUBSURFACE_REPO_PATH}/libdivecomputer
|
git config --global --add safe.directory $GITHUB_WORKSPACE/libdivecomputer
|
||||||
ln -s $HOME/Qt Qt
|
export IOS_QT=$GITHUB_WORKSPACE/qt-ios
|
||||||
echo "build for simulator"
|
echo "build for simulator"
|
||||||
bash -x $GITHUB_WORKSPACE/packaging/ios/build.sh -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
|
||||||
|
|
17
.github/workflows/mac.yml
vendored
17
.github/workflows/mac.yml
vendored
|
@ -11,12 +11,13 @@ on:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: macOS-11
|
runs-on: macOS-11
|
||||||
steps:
|
steps:
|
||||||
- name: checkout sources
|
- name: checkout sources
|
||||||
uses: actions/checkout@v1
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: atomically create or retrieve the build number and assemble release notes
|
- name: atomically create or retrieve the build number and assemble release notes
|
||||||
id: version_number
|
id: version_number
|
||||||
|
@ -37,15 +38,19 @@ jobs:
|
||||||
|
|
||||||
- name: setup Homebrew
|
- name: setup Homebrew
|
||||||
run: brew install hidapi libxslt libjpg libmtp create-dmg confuse
|
run: brew install hidapi libxslt libjpg libmtp create-dmg confuse
|
||||||
- name: set our Qt build
|
|
||||||
run: |
|
- name: checkout Qt resources
|
||||||
curl -O https://f002.backblazeb2.com/file/Subsurface-Travis/Qt5.15.13-mac.tar.xz
|
uses: actions/checkout@v4
|
||||||
tar -xJf Qt*-mac.tar.xz
|
with:
|
||||||
|
repository: subsurface/qt-mac
|
||||||
|
ref: main
|
||||||
|
path: qt-mac
|
||||||
|
|
||||||
- name: build Subsurface
|
- name: build Subsurface
|
||||||
id: build
|
id: build
|
||||||
run: |
|
run: |
|
||||||
cd ${GITHUB_WORKSPACE}/..
|
cd ${GITHUB_WORKSPACE}/..
|
||||||
export QT_ROOT=${GITHUB_WORKSPACE}/Qt5.15.13
|
export QT_ROOT=${GITHUB_WORKSPACE}/qt-mac/Qt5.15.13
|
||||||
export QT_QPA_PLATFORM_PLUGIN_PATH=$QT_ROOT/plugins
|
export QT_QPA_PLATFORM_PLUGIN_PATH=$QT_ROOT/plugins
|
||||||
export PATH=$QT_ROOT/bin:$PATH
|
export PATH=$QT_ROOT/bin:$PATH
|
||||||
export CMAKE_PREFIX_PATH=$QT_ROOT/lib/cmake
|
export CMAKE_PREFIX_PATH=$QT_ROOT/lib/cmake
|
||||||
|
|
Loading…
Add table
Reference in a new issue