mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
CICD: Improve Workflows.
Make multiple improvements to the existing workflows: - create a shared custom action to deal with version number tracking and generation; - use this action to add the branch name to the version for pull request builds; - create a shared workflow for all debian-ish builds to avoid re-use by copy / paste; - remove potential security risks by eliminating the use of pre-evaluated expressions (`${{ ... }}`) inside scripts; - update outdated GitHub action versions; - improve the consistency by renaming scripts acording to have a `.sh` extension; - improve naming of generated artefacts for pull requests to include the correct version. @dirkh: Unfortunately this is potentially going to break builds when it is merged, as there is no good way to 'test' a merge build short of merging. We'll just have to deal with the fallout of it in a follow-up pull request. Signed-off-by: Michael Keller <github@ike.ch>
This commit is contained in:
parent
e20ec9248c
commit
6fc8310705
32 changed files with 399 additions and 536 deletions
56
.github/actions/manage-version/action.yml
vendored
Normal file
56
.github/actions/manage-version/action.yml
vendored
Normal file
|
@ -0,0 +1,56 @@
|
||||||
|
name: Manage the Subsurface CICD versioning
|
||||||
|
|
||||||
|
inputs:
|
||||||
|
no-increment:
|
||||||
|
description: Only get the current version, do not increment it even for pushevents
|
||||||
|
default: false
|
||||||
|
nightly-builds-secret:
|
||||||
|
description: The secret to access the nightly builds repository
|
||||||
|
default: ''
|
||||||
|
|
||||||
|
outputs:
|
||||||
|
version:
|
||||||
|
description: The long form version number
|
||||||
|
value: ${{ steps.version_number.outputs.version }}
|
||||||
|
buildnr:
|
||||||
|
description: The build number
|
||||||
|
value: ${{ steps.version_number.outputs.buildnr }}
|
||||||
|
|
||||||
|
runs:
|
||||||
|
using: composite
|
||||||
|
steps:
|
||||||
|
- name: atomically create or retrieve the build number and assemble release notes for a push (i.e. merging of a pull request)
|
||||||
|
if: github.event_name == 'push' && ! inputs.no-increment
|
||||||
|
env:
|
||||||
|
NIGHTLY_BUILDS_SECRET: ${{ inputs.nightly-builds-secret }}
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
if [ -z "$NIGHTLY_BUILDS_SECRET" ]; then
|
||||||
|
echo "Need to supply the secret for the nightly-builds repository to increment the version number, aborting."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
scripts/get-atomic-buildnr.sh $GITHUB_SHA $NIGHTLY_BUILDS_SECRET "CICD-release"
|
||||||
|
|
||||||
|
- name: retrieve the current version number in all other cases
|
||||||
|
if: github.event_name != 'push' || inputs.no-increment
|
||||||
|
env:
|
||||||
|
PULL_REQUEST_BRANCH: ${{ github.event.pull_request.head.ref }}
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
echo "-pull-request-$PULL_REQUEST_BRANCH" > latest-subsurface-buildnumber-extension
|
||||||
|
|
||||||
|
- name: store version number for the build
|
||||||
|
id: version_number
|
||||||
|
env:
|
||||||
|
PULL_REQUEST_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
git config --global --add safe.directory $GITHUB_WORKSPACE
|
||||||
|
# For a pull request we need the information from the pull request branch
|
||||||
|
# and not from the merge branch on the pull request
|
||||||
|
git checkout $PULL_REQUEST_HEAD_SHA
|
||||||
|
version=$(scripts/get-version.sh)
|
||||||
|
echo "version=$version" >> $GITHUB_OUTPUT
|
||||||
|
buildnr=$(scripts/get-version.sh 1)
|
||||||
|
echo "buildnr=$buildnr" >> $GITHUB_OUTPUT
|
||||||
|
git checkout $GITHUB_SHA
|
8
.github/workflows/android-dockerimage.yml
vendored
8
.github/workflows/android-dockerimage.yml
vendored
|
@ -15,17 +15,17 @@ jobs:
|
||||||
VERSION: ${{ '5.15.2' }} # the version numbers here is based on the Qt version, the third digit is the rev of the docker image
|
VERSION: ${{ '5.15.2' }} # the version numbers here is based on the Qt version, the third digit is the rev of the docker image
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Build the name for the docker image
|
- name: Build the name for the docker image
|
||||||
id: build_name
|
id: build_name
|
||||||
run: |
|
run: |
|
||||||
v=${{ env.VERSION }}
|
v=$VERSION
|
||||||
b=${{ github.ref }} # -BRANCH suffix, unless the branch is master
|
b=$GITHUB_REF # -BRANCH suffix, unless the branch is master
|
||||||
b=${b/refs\/heads\//}
|
b=${b/refs\/heads\//}
|
||||||
b=${b,,} # the name needs to be all lower case
|
b=${b,,} # the name needs to be all lower case
|
||||||
if [ $b = "master" ] ; then b="" ; else b="-$b" ; fi
|
if [ $b = "master" ] ; then b="" ; else b="-$b" ; fi
|
||||||
echo "NAME=subsurface/android-build${b}:${v}" >> $GITHUB_OUTPUT
|
echo "NAME=$GITHUB_REPOSITORY_OWNER/android-build${b}:${v}" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Build and Publish Linux Docker image to Dockerhub
|
- name: Build and Publish Linux Docker image to Dockerhub
|
||||||
uses: elgohr/Publish-Docker-Github-Action@v5
|
uses: elgohr/Publish-Docker-Github-Action@v5
|
||||||
|
|
59
.github/workflows/android.yml
vendored
59
.github/workflows/android.yml
vendored
|
@ -1,4 +1,5 @@
|
||||||
name: Android
|
name: Android
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
|
@ -11,45 +12,44 @@ on:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
buildAndroid:
|
build:
|
||||||
runs-on: ubuntu-latest
|
|
||||||
env:
|
env:
|
||||||
BUILD_ROOT: ${{ github.workspace }}/..
|
|
||||||
KEYSTORE_FILE: ${{ github.workspace }}/../subsurface.keystore
|
KEYSTORE_FILE: ${{ github.workspace }}/../subsurface.keystore
|
||||||
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
image: docker://subsurface/android-build:5.15.2
|
image: docker://subsurface/android-build:5.15.2
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: checkout sources
|
- name: checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
submodules: recursive
|
||||||
|
|
||||||
- name: atomically create or retrieve the build number and assemble release notes
|
- name: set the version information
|
||||||
id: version_number
|
id: version_number
|
||||||
if: github.event_name == 'push'
|
uses: ./.github/actions/manage-version
|
||||||
run: |
|
with:
|
||||||
bash scripts/get-atomic-buildnr.sh ${{ github.sha }} ${{ secrets.NIGHTLY_BUILDS }} "CICD-release"
|
nightly-builds-secret: ${{ secrets.NIGHTLY_BUILDS }}
|
||||||
version=$(cat release-version)
|
|
||||||
echo "version=$version" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- name: store dummy version and build number for non-push build runs
|
|
||||||
if: github.event_name != 'push'
|
|
||||||
run: |
|
|
||||||
echo "100" > latest-subsurface-buildnumber
|
|
||||||
echo "CICD-pull-request" > latest-subsurface-buildnumber-extension
|
|
||||||
|
|
||||||
- name: set up the keystore
|
- name: set up the keystore
|
||||||
if: github.event_name == 'push'
|
if: github.event_name == 'push'
|
||||||
|
env:
|
||||||
|
ANDROID_KEYSTORE_BASE64: ${{ secrets.ANDROID_KEYSTORE_BASE64 }}
|
||||||
run: |
|
run: |
|
||||||
echo "${{ secrets.ANDROID_KEYSTORE_BASE64 }}" | base64 -d > $KEYSTORE_FILE
|
echo "$ANDROID_KEYSTORE_BASE64" | base64 -d > $KEYSTORE_FILE
|
||||||
|
|
||||||
- name: run build
|
- name: run build
|
||||||
id: build
|
id: build
|
||||||
|
env:
|
||||||
|
ANDROID_KEYSTORE_PASSWORD: pass:${{ secrets.ANDROID_KEYSTORE_PASSWORD }}
|
||||||
|
KEYSTORE_ALIAS: ${{ secrets.ANDROID_KEYSTORE_ALIAS }}
|
||||||
|
BUILDNR: ${{ steps.version_number.outputs.buildnr }}
|
||||||
run: |
|
run: |
|
||||||
# this is rather awkward, but it allows us to use the preinstalled
|
# this is rather awkward, but it allows us to use the preinstalled
|
||||||
# Android and Qt versions with relative paths
|
# Android and Qt versions with relative paths
|
||||||
cd $BUILD_ROOT
|
cd ..
|
||||||
ln -s /android/5.15.* .
|
ln -s /android/5.15.* .
|
||||||
ln -s /android/build-tools .
|
ln -s /android/build-tools .
|
||||||
ln -s /android/cmdline-tools .
|
ln -s /android/cmdline-tools .
|
||||||
|
@ -62,12 +62,20 @@ jobs:
|
||||||
git config --global --add safe.directory $GITHUB_WORKSPACE
|
git config --global --add safe.directory $GITHUB_WORKSPACE
|
||||||
git config --global --add safe.directory $GITHUB_WORKSPACE/libdivecomputer
|
git config --global --add safe.directory $GITHUB_WORKSPACE/libdivecomputer
|
||||||
# get the build number via curl so this works both for a pull request as well as a push
|
# get the build number via curl so this works both for a pull request as well as a push
|
||||||
BUILDNR=$(curl -q https://raw.githubusercontent.com/subsurface/nightly-builds/main/latest-subsurface-buildnumber)
|
|
||||||
export OUTPUT_DIR="$GITHUB_WORKSPACE"
|
export OUTPUT_DIR="$GITHUB_WORKSPACE"
|
||||||
export KEYSTORE_FILE="$KEYSTORE_FILE"
|
bash -x ./subsurface/packaging/android/qmake-build.sh -buildnr $BUILDNR
|
||||||
export KEYSTORE_PASSWORD="pass:${{ secrets.ANDROID_KEYSTORE_PASSWORD }}"
|
|
||||||
export KEYSTORE_ALIAS="${{ secrets.ANDROID_KEYSTORE_ALIAS }}"
|
- name: delete the keystore
|
||||||
bash -x ./subsurface/packaging/android/qmake-build.sh -buildnr ${BUILDNR}
|
if: github.event_name == 'push'
|
||||||
|
run: |
|
||||||
|
rm $KEYSTORE_FILE
|
||||||
|
|
||||||
|
- name: publish pull request artifacts
|
||||||
|
if: github.event_name == 'pull_request'
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: Subsurface-Android-${{ steps.version_number.outputs.version }}
|
||||||
|
path: Subsurface-mobile-*.apk
|
||||||
|
|
||||||
# only publish a 'release' on push events (those include merging a PR)
|
# only publish a 'release' on push events (those include merging a PR)
|
||||||
- name: upload binaries
|
- name: upload binaries
|
||||||
|
@ -81,8 +89,3 @@ jobs:
|
||||||
fail_on_unmatched_files: true
|
fail_on_unmatched_files: true
|
||||||
files: |
|
files: |
|
||||||
Subsurface-mobile-${{ steps.version_number.outputs.version }}.apk
|
Subsurface-mobile-${{ steps.version_number.outputs.version }}.apk
|
||||||
|
|
||||||
- name: delete the keystore
|
|
||||||
if: github.event_name == 'push'
|
|
||||||
run: |
|
|
||||||
rm $KEYSTORE_FILE
|
|
||||||
|
|
17
.github/workflows/codeql-analysis.yml
vendored
17
.github/workflows/codeql-analysis.yml
vendored
|
@ -25,15 +25,14 @@ jobs:
|
||||||
matrix:
|
matrix:
|
||||||
# Override automatic language detection by changing the below list
|
# Override automatic language detection by changing the below list
|
||||||
# Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
|
# Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
|
||||||
language: ['cpp', 'javascript']
|
language: ['c-cpp', 'javascript-typescript']
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
# We must fetch at least the immediate parents so that if this is
|
fetch-depth: 0
|
||||||
# a pull request then we can checkout the head.
|
submodules: recursive
|
||||||
fetch-depth: 2
|
|
||||||
|
|
||||||
- name: get container ready for build
|
- name: get container ready for build
|
||||||
run: |
|
run: |
|
||||||
|
@ -51,7 +50,7 @@ jobs:
|
||||||
|
|
||||||
# Initializes the CodeQL tools for scanning.
|
# Initializes the CodeQL tools for scanning.
|
||||||
- name: Initialize CodeQL
|
- name: Initialize CodeQL
|
||||||
uses: github/codeql-action/init@v2
|
uses: github/codeql-action/init@v3
|
||||||
with:
|
with:
|
||||||
languages: ${{ matrix.language }}
|
languages: ${{ matrix.language }}
|
||||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||||
|
@ -60,13 +59,11 @@ jobs:
|
||||||
# queries: ./path/to/local/query, your-org/your-repo/queries@main
|
# queries: ./path/to/local/query, your-org/your-repo/queries@main
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
env:
|
|
||||||
SUBSURFACE_REPO_PATH: ${{ github.workspace }}
|
|
||||||
run: |
|
run: |
|
||||||
cd ..
|
cd ..
|
||||||
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
|
||||||
bash -e -x subsurface/scripts/build.sh -desktop -build-with-webkit
|
bash -e -x subsurface/scripts/build.sh -desktop -build-with-webkit
|
||||||
|
|
||||||
- name: Perform CodeQL Analysis
|
- name: Perform CodeQL Analysis
|
||||||
uses: github/codeql-action/analyze@v2
|
uses: github/codeql-action/analyze@v3
|
||||||
|
|
20
.github/workflows/coverity-scan.yml
vendored
20
.github/workflows/coverity-scan.yml
vendored
|
@ -1,4 +1,5 @@
|
||||||
name: Coverity Scan Linux Qt 5.9
|
name: Coverity Scan Linux Qt 5.9
|
||||||
|
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 18 * * *' # Daily at 18:00 UTC
|
- cron: '0 18 * * *' # Daily at 18:00 UTC
|
||||||
|
@ -11,7 +12,10 @@ jobs:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: checkout sources
|
- name: checkout sources
|
||||||
uses: actions/checkout@v1
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
submodules: recursive
|
||||||
|
|
||||||
- name: add build dependencies
|
- name: add build dependencies
|
||||||
run: |
|
run: |
|
||||||
|
@ -30,11 +34,15 @@ jobs:
|
||||||
qtquickcontrols2-5-dev libbluetooth-dev libmtp-dev
|
qtquickcontrols2-5-dev libbluetooth-dev libmtp-dev
|
||||||
|
|
||||||
- name: configure environment
|
- name: configure environment
|
||||||
env:
|
|
||||||
SUBSURFACE_REPO_PATH: ${{ github.workspace }}
|
|
||||||
run: |
|
run: |
|
||||||
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
|
||||||
|
|
||||||
|
- name: get the version information
|
||||||
|
id: version_number
|
||||||
|
uses: ./.github/actions/manage-version
|
||||||
|
with:
|
||||||
|
no-increment: true
|
||||||
|
|
||||||
- name: run coverity scan
|
- name: run coverity scan
|
||||||
uses: vapier/coverity-scan-action@v1
|
uses: vapier/coverity-scan-action@v1
|
||||||
|
@ -44,5 +52,5 @@ jobs:
|
||||||
email: glance@acc.umu.se
|
email: glance@acc.umu.se
|
||||||
command: subsurface/scripts/build.sh -desktop -build-with-webkit
|
command: subsurface/scripts/build.sh -desktop -build-with-webkit
|
||||||
working-directory: ${{ github.workspace }}/..
|
working-directory: ${{ github.workspace }}/..
|
||||||
version: $(/scripts/get-version)
|
version: ${{ steps.version_number.outputs.version }}
|
||||||
description: Automatic scan on github actions
|
description: Automatic scan on github actions
|
||||||
|
|
3
.github/workflows/documentation.yml
vendored
3
.github/workflows/documentation.yml
vendored
|
@ -26,6 +26,9 @@ jobs:
|
||||||
|
|
||||||
- name: Checkout Sources
|
- name: Checkout Sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
submodules: recursive
|
||||||
|
|
||||||
- name: Process the Documentation
|
- name: Process the Documentation
|
||||||
id: process_documentation
|
id: process_documentation
|
||||||
|
|
20
.github/workflows/fedora-copr-build.yml
vendored
20
.github/workflows/fedora-copr-build.yml
vendored
|
@ -11,12 +11,16 @@ jobs:
|
||||||
setup-build:
|
setup-build:
|
||||||
name: Submit build to Fedora COPR
|
name: Submit build to Fedora COPR
|
||||||
# this seems backwards, but we want to run under Fedora, but Github doesn' support that
|
# this seems backwards, but we want to run under Fedora, but Github doesn' support that
|
||||||
container: fedora:latest
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: fedora:latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Check out sources
|
- name: Check out sources
|
||||||
uses: actions/checkout@v1
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
submodules: recursive
|
||||||
|
|
||||||
- name: Setup build dependencies in the Fedora container
|
- name: Setup build dependencies in the Fedora container
|
||||||
run: |
|
run: |
|
||||||
|
@ -28,13 +32,11 @@ jobs:
|
||||||
git config --global --add safe.directory /__w/subsurface/subsurface
|
git config --global --add safe.directory /__w/subsurface/subsurface
|
||||||
git config --global --add safe.directory /__w/subsurface/subsurface/libdivecomputer
|
git config --global --add safe.directory /__w/subsurface/subsurface/libdivecomputer
|
||||||
|
|
||||||
- name: atomically create or retrieve the build number
|
- name: set the version information
|
||||||
id: version_number
|
id: version_number
|
||||||
if: github.event_name == 'push'
|
uses: ./.github/actions/manage-version
|
||||||
run: |
|
with:
|
||||||
bash scripts/get-atomic-buildnr.sh ${{ github.sha }} ${{ secrets.NIGHTLY_BUILDS }} "CICD-release"
|
nightly-builds-secret: ${{ secrets.NIGHTLY_BUILDS }}
|
||||||
version=$(cat release-version)
|
|
||||||
echo "version=$version" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- name: Setup API token for copr-cli
|
- name: Setup API token for copr-cli
|
||||||
env:
|
env:
|
||||||
|
@ -53,5 +55,5 @@ jobs:
|
||||||
- name: run the copr build script
|
- name: run the copr build script
|
||||||
run: |
|
run: |
|
||||||
cd ..
|
cd ..
|
||||||
bash -x subsurface/packaging/copr/make-package.sh ${{ github.ref_name }}
|
bash -x subsurface/packaging/copr/make-package.sh $GITHUB_REF_NAME
|
||||||
|
|
||||||
|
|
22
.github/workflows/ios.yml
vendored
22
.github/workflows/ios.yml
vendored
|
@ -1,4 +1,5 @@
|
||||||
name: iOS
|
name: iOS
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
|
@ -19,7 +20,10 @@ jobs:
|
||||||
run: sudo xcode-select -s "/Applications/Xcode_11.7.app"
|
run: sudo xcode-select -s "/Applications/Xcode_11.7.app"
|
||||||
|
|
||||||
- name: checkout sources
|
- name: checkout sources
|
||||||
uses: actions/checkout@v1
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
submodules: recursive
|
||||||
|
|
||||||
- name: setup Homebrew
|
- name: setup Homebrew
|
||||||
run: brew install autoconf automake libtool pkg-config
|
run: brew install autoconf automake libtool pkg-config
|
||||||
|
@ -31,24 +35,24 @@ jobs:
|
||||||
ref: main
|
ref: main
|
||||||
path: qt-ios
|
path: qt-ios
|
||||||
|
|
||||||
- name: store dummy version and build number for test build
|
- name: set the version information
|
||||||
id: version_number
|
id: version_number
|
||||||
run: |
|
uses: ./.github/actions/manage-version
|
||||||
echo "100" > latest-subsurface-buildnumber
|
with:
|
||||||
echo "CICD-test-build" > latest-subsurface-buildnumber-extension
|
nightly-builds-secret: ${{ secrets.NIGHTLY_BUILDS }}
|
||||||
version=$(scripts/get-version)
|
|
||||||
echo "version=$version" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- name: build Subsurface-mobile for iOS
|
- name: build Subsurface-mobile for iOS
|
||||||
|
env:
|
||||||
|
VERSION: ${{ steps.version_number.outputs.version }}
|
||||||
run: |
|
run: |
|
||||||
cd ${{ github.workspace }}/..
|
cd ..
|
||||||
git config --global --add safe.directory $GITHUB_WORKSPACE
|
git config --global --add safe.directory $GITHUB_WORKSPACE
|
||||||
git config --global --add safe.directory $GITHUB_WORKSPACE/libdivecomputer
|
git config --global --add safe.directory $GITHUB_WORKSPACE/libdivecomputer
|
||||||
export IOS_QT=$GITHUB_WORKSPACE/qt-ios
|
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
|
# 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
|
mv build-Subsurface-mobile-Qt_5_14_1_for_iOS-Release/Release-iphonesimulator/Subsurface-mobile.app $GITHUB_WORKSPACE/Subsurface-mobile-$VERSION.app
|
||||||
|
|
||||||
- name: publish artifacts
|
- name: publish artifacts
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
|
|
100
.github/workflows/linux-debian-generic.yml
vendored
Normal file
100
.github/workflows/linux-debian-generic.yml
vendored
Normal file
|
@ -0,0 +1,100 @@
|
||||||
|
name: Generic workflow for Debian and derivatives
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
container-image:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: ${{ inputs.container-image }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: get container ready for build
|
||||||
|
run: |
|
||||||
|
echo "--------------------------------------------------------------"
|
||||||
|
echo "update distro and install dependencies"
|
||||||
|
|
||||||
|
apt-get update
|
||||||
|
apt-get dist-upgrade -y
|
||||||
|
DEBIAN_FRONTEND=noninteractive apt-get install -y -q \
|
||||||
|
autoconf automake cmake g++ git libcrypto++-dev libcurl4-gnutls-dev \
|
||||||
|
libgit2-dev libqt5qml5 libqt5quick5 libqt5svg5-dev \
|
||||||
|
libqt5webkit5-dev libsqlite3-dev libssh2-1-dev libssl-dev libssl-dev \
|
||||||
|
libtool libusb-1.0-0-dev libxml2-dev libxslt1-dev libzip-dev make \
|
||||||
|
pkg-config qml-module-qtlocation qml-module-qtpositioning \
|
||||||
|
qml-module-qtquick2 qt5-qmake qtchooser qtconnectivity5-dev \
|
||||||
|
qtdeclarative5-dev qtdeclarative5-private-dev qtlocation5-dev \
|
||||||
|
qtpositioning5-dev qtscript5-dev qttools5-dev qttools5-dev-tools \
|
||||||
|
qtquickcontrols2-5-dev xvfb libbluetooth-dev libmtp-dev \
|
||||||
|
mdbtools-dev
|
||||||
|
|
||||||
|
git config --global user.email "ci@subsurface-divelog.org"
|
||||||
|
git config --global user.name "Subsurface CI"
|
||||||
|
git config --global --add safe.directory $GITHUB_WORKSPACE
|
||||||
|
git config --global --add safe.directory $GITHUB_WORKSPACE/libdivecomputer
|
||||||
|
# needs git from the previous step
|
||||||
|
- name: checkout sources
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
submodules: recursive
|
||||||
|
|
||||||
|
- name: set the version information
|
||||||
|
id: version_number
|
||||||
|
uses: ./.github/actions/manage-version
|
||||||
|
with:
|
||||||
|
no-increment: true
|
||||||
|
|
||||||
|
- name: build subsurface-mobile
|
||||||
|
run: |
|
||||||
|
echo "--------------------------------------------------------------"
|
||||||
|
echo "building mobile"
|
||||||
|
cd ..
|
||||||
|
bash -e -x subsurface/scripts/build.sh -mobile
|
||||||
|
|
||||||
|
- name: test mobile build
|
||||||
|
run: |
|
||||||
|
echo "--------------------------------------------------------------"
|
||||||
|
echo "running tests for mobile"
|
||||||
|
|
||||||
|
cd build-mobile/tests
|
||||||
|
# xvfb-run --auto-servernum ./TestGitStorage -v2
|
||||||
|
xvfb-run --auto-servernum make check
|
||||||
|
|
||||||
|
- name: build subsurface
|
||||||
|
run: |
|
||||||
|
echo "--------------------------------------------------------------"
|
||||||
|
echo "building desktop"
|
||||||
|
|
||||||
|
# now build for the desktop version (including WebKit)
|
||||||
|
cd ..
|
||||||
|
bash -e -x subsurface/scripts/build.sh -desktop -build-with-webkit
|
||||||
|
|
||||||
|
- name: test desktop build
|
||||||
|
run: |
|
||||||
|
echo "--------------------------------------------------------------"
|
||||||
|
echo "running tests for desktop"
|
||||||
|
cd build/tests
|
||||||
|
# xvfb-run --auto-servernum ./TestGitStorage -v2
|
||||||
|
xvfb-run --auto-servernum make check
|
||||||
|
|
||||||
|
- name: build subsurface-downloader
|
||||||
|
run: |
|
||||||
|
echo "--------------------------------------------------------------"
|
||||||
|
echo "building downloader"
|
||||||
|
cd ..
|
||||||
|
bash -e -x subsurface/scripts/build.sh -downloader
|
||||||
|
|
||||||
|
- name: build smtk2ssrf
|
||||||
|
run: |
|
||||||
|
echo "--------------------------------------------------------------"
|
||||||
|
echo "building smtk2ssrf"
|
||||||
|
|
||||||
|
# build smtk2ssrf (needs the artefacts generated by the subsurface build
|
||||||
|
cd ..
|
||||||
|
bash -e -x subsurface/scripts/smtk2ssrf-build.sh -y
|
93
.github/workflows/linux-debian-trixie-5.15.yml
vendored
93
.github/workflows/linux-debian-trixie-5.15.yml
vendored
|
@ -1,4 +1,5 @@
|
||||||
name: Debian trixie / Qt 5.15--
|
name: Debian trixie / Qt 5.15--
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
|
@ -12,91 +13,7 @@ on:
|
||||||
- master
|
- master
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
do-build-test:
|
||||||
runs-on: ubuntu-latest
|
uses: ./.github/workflows/linux-debian-generic.yml
|
||||||
container:
|
with:
|
||||||
image: debian:trixie
|
container-image: debian:trixie
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: checkout sources
|
|
||||||
uses: actions/checkout@v1
|
|
||||||
|
|
||||||
- name: get container ready for build
|
|
||||||
env:
|
|
||||||
SUBSURFACE_REPO_PATH: ${{ github.workspace }}
|
|
||||||
run: |
|
|
||||||
echo "--------------------------------------------------------------"
|
|
||||||
echo "update distro and install dependencies"
|
|
||||||
|
|
||||||
apt-get update
|
|
||||||
apt-get dist-upgrade -y
|
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get install -y -q \
|
|
||||||
autoconf automake cmake g++ git libcrypto++-dev libcurl4-gnutls-dev \
|
|
||||||
libgit2-dev libqt5qml5 libqt5quick5 libqt5svg5-dev \
|
|
||||||
libqt5webkit5-dev libsqlite3-dev libssh2-1-dev libssl-dev libssl-dev \
|
|
||||||
libtool libusb-1.0-0-dev libxml2-dev libxslt1-dev libzip-dev make \
|
|
||||||
pkg-config qml-module-qtlocation qml-module-qtpositioning \
|
|
||||||
qml-module-qtquick2 qt5-qmake qtchooser qtconnectivity5-dev \
|
|
||||||
qtdeclarative5-dev qtdeclarative5-private-dev qtlocation5-dev \
|
|
||||||
qtpositioning5-dev qtscript5-dev qttools5-dev qttools5-dev-tools \
|
|
||||||
qtquickcontrols2-5-dev xvfb libbluetooth-dev libmtp-dev \
|
|
||||||
mdbtools-dev
|
|
||||||
|
|
||||||
git config --global user.email "ci@subsurface-divelog.org"
|
|
||||||
git config --global user.name "Subsurface CI"
|
|
||||||
git config --global --add safe.directory ${SUBSURFACE_REPO_PATH}
|
|
||||||
git config --global --add safe.directory ${SUBSURFACE_REPO_PATH}/libdivecomputer
|
|
||||||
|
|
||||||
- name: store dummy version and build number for test build
|
|
||||||
run: |
|
|
||||||
echo "100" > latest-subsurface-buildnumber
|
|
||||||
echo "CICD-test-build" > latest-subsurface-buildnumber-extension
|
|
||||||
|
|
||||||
- name: build subsurface-mobile
|
|
||||||
run: |
|
|
||||||
echo "--------------------------------------------------------------"
|
|
||||||
echo "building mobile"
|
|
||||||
cd ..
|
|
||||||
bash -e -x subsurface/scripts/build.sh -mobile
|
|
||||||
|
|
||||||
- name: test mobile build
|
|
||||||
run: |
|
|
||||||
echo "--------------------------------------------------------------"
|
|
||||||
echo "running tests for mobile"
|
|
||||||
|
|
||||||
cd build-mobile/tests
|
|
||||||
# xvfb-run --auto-servernum ./TestGitStorage -v2
|
|
||||||
xvfb-run --auto-servernum make check
|
|
||||||
|
|
||||||
- name: build subsurface
|
|
||||||
run: |
|
|
||||||
echo "--------------------------------------------------------------"
|
|
||||||
echo "building desktop"
|
|
||||||
|
|
||||||
# now build for the desktop version (including WebKit)
|
|
||||||
cd ..
|
|
||||||
bash -e -x subsurface/scripts/build.sh -desktop -build-with-webkit
|
|
||||||
|
|
||||||
- name: test desktop build
|
|
||||||
run: |
|
|
||||||
echo "--------------------------------------------------------------"
|
|
||||||
echo "running tests for desktop"
|
|
||||||
cd build/tests
|
|
||||||
# xvfb-run --auto-servernum ./TestGitStorage -v2
|
|
||||||
xvfb-run --auto-servernum make check
|
|
||||||
|
|
||||||
- name: build subsurface-downloader
|
|
||||||
run: |
|
|
||||||
echo "--------------------------------------------------------------"
|
|
||||||
echo "building downloader"
|
|
||||||
cd ..
|
|
||||||
bash -e -x subsurface/scripts/build.sh -downloader
|
|
||||||
|
|
||||||
- name: build smtk2ssrf
|
|
||||||
run: |
|
|
||||||
echo "--------------------------------------------------------------"
|
|
||||||
echo "building smtk2ssrf"
|
|
||||||
|
|
||||||
# build smtk2ssrf (needs the artefacts generated by the subsurface build
|
|
||||||
cd ..
|
|
||||||
bash -e -x subsurface/scripts/smtk2ssrf-build.sh -y
|
|
||||||
|
|
25
.github/workflows/linux-fedora-35-qt6.yml
vendored
25
.github/workflows/linux-fedora-35-qt6.yml
vendored
|
@ -1,4 +1,5 @@
|
||||||
name: Fedora 35 / Qt 6--
|
name: Fedora 35 / Qt 6--
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
|
@ -18,9 +19,6 @@ jobs:
|
||||||
image: fedora:35
|
image: fedora:35
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: checkout sources
|
|
||||||
uses: actions/checkout@v1
|
|
||||||
|
|
||||||
- name: get container ready for build
|
- name: get container ready for build
|
||||||
run: |
|
run: |
|
||||||
echo "--------------------------------------------------------------"
|
echo "--------------------------------------------------------------"
|
||||||
|
@ -37,22 +35,27 @@ jobs:
|
||||||
bluez-libs-devel libgit2-devel libzip-devel libmtp-devel \
|
bluez-libs-devel libgit2-devel libzip-devel libmtp-devel \
|
||||||
xorg-x11-server-Xvfb
|
xorg-x11-server-Xvfb
|
||||||
|
|
||||||
- name: store dummy version and build number for test build
|
- name: checkout sources
|
||||||
run: |
|
uses: actions/checkout@v4
|
||||||
echo "100" > latest-subsurface-buildnumber
|
with:
|
||||||
echo "CICD-test-build" > latest-subsurface-buildnumber-extension
|
fetch-depth: 0
|
||||||
|
submodules: recursive
|
||||||
|
|
||||||
|
- name: set the version information
|
||||||
|
id: version_number
|
||||||
|
uses: ./.github/actions/manage-version
|
||||||
|
with:
|
||||||
|
no-increment: true
|
||||||
|
|
||||||
- name: build Subsurface
|
- name: build Subsurface
|
||||||
env:
|
|
||||||
SUBSURFACE_REPO_PATH: ${{ github.workspace }}
|
|
||||||
run: |
|
run: |
|
||||||
echo "--------------------------------------------------------------"
|
echo "--------------------------------------------------------------"
|
||||||
echo "building desktop"
|
echo "building desktop"
|
||||||
|
|
||||||
# now build for the desktop version (without WebKit)
|
# now build for the desktop version (without WebKit)
|
||||||
cd ..
|
cd ..
|
||||||
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
|
||||||
git config --global --get-all safe.directory
|
git config --global --get-all safe.directory
|
||||||
bash -e -x subsurface/scripts/build.sh -desktop -build-with-qt6
|
bash -e -x subsurface/scripts/build.sh -desktop -build-with-qt6
|
||||||
|
|
||||||
|
|
14
.github/workflows/linux-snap.yml
vendored
14
.github/workflows/linux-snap.yml
vendored
|
@ -19,16 +19,16 @@ jobs:
|
||||||
timeout-minutes: 60
|
timeout-minutes: 60
|
||||||
steps:
|
steps:
|
||||||
- name: Check out code
|
- name: Check out code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
# Needed for version determination to work
|
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
submodules: recursive
|
||||||
|
|
||||||
- name: atomically create or retrieve the build number
|
- name: set the version information
|
||||||
id: version_number
|
id: version_number
|
||||||
if: github.event_name == 'push'
|
uses: ./.github/actions/manage-version
|
||||||
run: |
|
with:
|
||||||
bash scripts/get-atomic-buildnr.sh ${{ github.sha }} ${{ secrets.NIGHTLY_BUILDS }} "CICD-release"
|
nightly-builds-secret: ${{ secrets.NIGHTLY_BUILDS }}
|
||||||
|
|
||||||
- name: store dummy version and build number for pull request
|
- name: store dummy version and build number for pull request
|
||||||
if: github.event_name == 'pull_request'
|
if: github.event_name == 'pull_request'
|
||||||
|
@ -52,7 +52,7 @@ jobs:
|
||||||
|
|
||||||
# Find common base between master and HEAD to use as cache key.
|
# Find common base between master and HEAD to use as cache key.
|
||||||
git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules origin master
|
git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules origin master
|
||||||
echo "key=$( git merge-base origin/master ${{ github.sha }} )" >> $GITHUB_OUTPUT
|
echo "key=$( git merge-base origin/master $GITHUB_SHA )" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: CCache
|
- name: CCache
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
name: Ubuntu 16.04 / Qt 5.15-- for AppImage
|
name: Ubuntu 16.04 / Qt 5.15-- for AppImage
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
|
@ -18,9 +19,6 @@ jobs:
|
||||||
image: ubuntu:16.04
|
image: ubuntu:16.04
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: checkout sources
|
|
||||||
uses: actions/checkout@v1
|
|
||||||
|
|
||||||
- name: get container ready for build
|
- name: get container ready for build
|
||||||
run: |
|
run: |
|
||||||
echo "--------------------------------------------------------------"
|
echo "--------------------------------------------------------------"
|
||||||
|
@ -45,8 +43,8 @@ jobs:
|
||||||
add-apt-repository -y ppa:savoury1/gtk-xenial
|
add-apt-repository -y ppa:savoury1/gtk-xenial
|
||||||
add-apt-repository -y ppa:savoury1/qt-xenial
|
add-apt-repository -y ppa:savoury1/qt-xenial
|
||||||
add-apt-repository -y ppa:savoury1/kde-xenial
|
add-apt-repository -y ppa:savoury1/kde-xenial
|
||||||
add-apt-repository -y ppa:mayeut-github/devtoolset-10
|
add-apt-repository -y ppa:savoury1/backports
|
||||||
add-apt-repository -y 'deb https://apt.kitware.com/ubuntu/ xenial main'
|
add-apt-repository -y ppa:savoury1/build-tools
|
||||||
apt-get update
|
apt-get update
|
||||||
apt-get dist-upgrade -y
|
apt-get dist-upgrade -y
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get install -y -q \
|
DEBIAN_FRONTEND=noninteractive apt-get install -y -q \
|
||||||
|
@ -58,27 +56,23 @@ jobs:
|
||||||
qml-module-qtquick2 qt5-qmake qtchooser qtconnectivity5-dev \
|
qml-module-qtquick2 qt5-qmake qtchooser qtconnectivity5-dev \
|
||||||
qtdeclarative5-dev qtdeclarative5-private-dev qtlocation5-dev \
|
qtdeclarative5-dev qtdeclarative5-private-dev qtlocation5-dev \
|
||||||
qtpositioning5-dev qtscript5-dev qttools5-dev qttools5-dev-tools \
|
qtpositioning5-dev qtscript5-dev qttools5-dev qttools5-dev-tools \
|
||||||
qtquickcontrols2-5-dev xvfb libbluetooth-dev libmtp-dev
|
qtquickcontrols2-5-dev xvfb libbluetooth-dev libmtp-dev liblzma-dev
|
||||||
|
|
||||||
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 60 \
|
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 60 \
|
||||||
--slave /usr/bin/g++ g++ /usr/bin/g++-9
|
--slave /usr/bin/g++ g++ /usr/bin/g++-9
|
||||||
|
|
||||||
- name: atomically create or retrieve the build number and assemble release notes
|
- name: checkout sources
|
||||||
id: version_number
|
# We cannot update this as glibc on 16.04 is too old for node 20.
|
||||||
if: github.event_name == 'push'
|
uses: actions/checkout@v3
|
||||||
run: |
|
with:
|
||||||
bash ./scripts/get-atomic-buildnr.sh ${{ github.sha }} ${{ secrets.NIGHTLY_BUILDS }} "CICD-release"
|
fetch-depth: 0
|
||||||
version=$(cat release-version)
|
submodules: recursive
|
||||||
echo "version=$version" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- name: store dummy version and build number for pull request
|
- name: set the version information
|
||||||
id: pull_request_version_number
|
id: version_number
|
||||||
if: github.event_name == 'pull_request'
|
uses: ./.github/actions/manage-version
|
||||||
run: |
|
with:
|
||||||
echo "100" > latest-subsurface-buildnumber
|
nightly-builds-secret: ${{ secrets.NIGHTLY_BUILDS }}
|
||||||
echo "CICD-pull-request" > latest-subsurface-buildnumber-extension
|
|
||||||
version=$(scripts/get-version)
|
|
||||||
echo "version=$version" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- name: build Subsurface
|
- name: build Subsurface
|
||||||
run: |
|
run: |
|
||||||
|
@ -98,6 +92,8 @@ jobs:
|
||||||
xvfb-run --auto-servernum make check
|
xvfb-run --auto-servernum make check
|
||||||
|
|
||||||
- name: build appimage
|
- name: build appimage
|
||||||
|
env:
|
||||||
|
VERSION: ${{ steps.version_number.outputs.version }}
|
||||||
run: |
|
run: |
|
||||||
echo "--------------------------------------------------------------"
|
echo "--------------------------------------------------------------"
|
||||||
echo "assembling AppImage"
|
echo "assembling AppImage"
|
||||||
|
@ -131,22 +127,18 @@ jobs:
|
||||||
./linuxdeployqt*.AppImage --appimage-extract-and-run ./appdir/usr/share/applications/*.desktop -exclude-libs=libdbus-1.so.3 -appimage -qmldir=./subsurface/stats -qmldir=./subsurface/map-widget/ -verbose=2
|
./linuxdeployqt*.AppImage --appimage-extract-and-run ./appdir/usr/share/applications/*.desktop -exclude-libs=libdbus-1.so.3 -appimage -qmldir=./subsurface/stats -qmldir=./subsurface/map-widget/ -verbose=2
|
||||||
|
|
||||||
# copy AppImage to the calling VM
|
# copy AppImage to the calling VM
|
||||||
# with GitHub Actions the /${GITHUB_WORKSPACE} directory is the current working directory at the start of a step
|
# with GitHub Actions the $GITHUB_WORKSPACE directory is the current working directory at the start of a step
|
||||||
cp Subsurface*.AppImage* /${GITHUB_WORKSPACE}/Subsurface.AppImage
|
cp Subsurface*.AppImage* $GITHUB_WORKSPACE/Subsurface-$VERSION.AppImage
|
||||||
|
|
||||||
- name: PR artifacts
|
- name: PR artifacts
|
||||||
if: github.event_name == 'pull_request'
|
if: github.event_name == 'pull_request'
|
||||||
|
# We cannot update this as glibc on 16.04 is too old for node 20.
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: Subsurface-Linux-AppImage-${{ steps.pull_request_version_number.outputs.version }}
|
name: Subsurface-Linux-AppImage-${{ steps.version_number.outputs.version }}
|
||||||
path: Subsurface.AppImage
|
path: Subsurface-*.AppImage
|
||||||
compression-level: 0
|
compression-level: 0
|
||||||
|
|
||||||
- name: prepare release artifacts
|
|
||||||
if: github.event_name == 'push'
|
|
||||||
run: |
|
|
||||||
mv Subsurface.AppImage Subsurface-v${{ steps.version_number.outputs.version }}.AppImage
|
|
||||||
|
|
||||||
# only publish a 'release' on push events (those include merging a PR)
|
# only publish a 'release' on push events (those include merging a PR)
|
||||||
- name: upload binaries
|
- name: upload binaries
|
||||||
if: github.event_name == 'push'
|
if: github.event_name == 'push'
|
||||||
|
@ -158,4 +150,4 @@ jobs:
|
||||||
prerelease: false
|
prerelease: false
|
||||||
fail_on_unmatched_files: true
|
fail_on_unmatched_files: true
|
||||||
files: |
|
files: |
|
||||||
./Subsurface*.AppImage
|
./Subsurface-*.AppImage
|
||||||
|
|
76
.github/workflows/linux-ubuntu-20.04-5.15.yml
vendored
76
.github/workflows/linux-ubuntu-20.04-5.15.yml
vendored
|
@ -1,4 +1,5 @@
|
||||||
name: Ubuntu 20.04 / Qt 5.12--
|
name: Ubuntu 20.04 / Qt 5.12--
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
|
@ -12,74 +13,7 @@ on:
|
||||||
- master
|
- master
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
do-build-test:
|
||||||
runs-on: ubuntu-latest
|
uses: ./.github/workflows/linux-debian-generic.yml
|
||||||
container:
|
with:
|
||||||
image: ubuntu:20.04
|
container-image: ubuntu:20.04
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: checkout sources
|
|
||||||
uses: actions/checkout@v1
|
|
||||||
|
|
||||||
- name: get container ready for build
|
|
||||||
run: |
|
|
||||||
echo "--------------------------------------------------------------"
|
|
||||||
echo "update distro and install dependencies"
|
|
||||||
|
|
||||||
apt-get update
|
|
||||||
apt-get dist-upgrade -y
|
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get install -y -q \
|
|
||||||
autoconf automake cmake g++ git libcrypto++-dev libcurl4-gnutls-dev \
|
|
||||||
libgit2-dev libqt5qml5 libqt5quick5 libqt5svg5-dev \
|
|
||||||
libqt5webkit5-dev libsqlite3-dev libssh2-1-dev libssl-dev libssl-dev \
|
|
||||||
libtool libusb-1.0-0-dev libxml2-dev libxslt1-dev libzip-dev make \
|
|
||||||
pkg-config qml-module-qtlocation qml-module-qtpositioning \
|
|
||||||
qml-module-qtquick2 qt5-qmake qtchooser qtconnectivity5-dev \
|
|
||||||
qtdeclarative5-dev qtdeclarative5-private-dev qtlocation5-dev \
|
|
||||||
qtpositioning5-dev qtscript5-dev qttools5-dev qttools5-dev-tools \
|
|
||||||
qtquickcontrols2-5-dev xvfb libbluetooth-dev libmtp-dev
|
|
||||||
|
|
||||||
- name: store dummy version and build number for test build
|
|
||||||
run: |
|
|
||||||
echo "100" > latest-subsurface-buildnumber
|
|
||||||
echo "CICD-test-build" > latest-subsurface-buildnumber-extension
|
|
||||||
|
|
||||||
- name: build Subsurface-mobile
|
|
||||||
env:
|
|
||||||
SUBSURFACE_REPO_PATH: ${{ github.workspace }}
|
|
||||||
run: |
|
|
||||||
echo "--------------------------------------------------------------"
|
|
||||||
echo "building mobile"
|
|
||||||
git config --global user.email "ci@subsurface-divelog.org"
|
|
||||||
git config --global user.name "Subsurface CI"
|
|
||||||
git config --global --add safe.directory ${SUBSURFACE_REPO_PATH}
|
|
||||||
git config --global --add safe.directory ${SUBSURFACE_REPO_PATH}/libdivecomputer
|
|
||||||
cd ..
|
|
||||||
bash -e -x subsurface/scripts/build.sh -mobile
|
|
||||||
|
|
||||||
- name: test mobile build
|
|
||||||
run: |
|
|
||||||
echo "--------------------------------------------------------------"
|
|
||||||
echo "running tests for mobile"
|
|
||||||
|
|
||||||
cd build-mobile/tests
|
|
||||||
# xvfb-run --auto-servernum ./TestGitStorage -v2
|
|
||||||
xvfb-run --auto-servernum make check
|
|
||||||
|
|
||||||
- name: build Subsurface
|
|
||||||
run: |
|
|
||||||
echo "--------------------------------------------------------------"
|
|
||||||
echo "building desktop"
|
|
||||||
|
|
||||||
# now build for the desktop version (including WebKit)
|
|
||||||
cd ..
|
|
||||||
bash -e -x subsurface/scripts/build.sh -desktop -build-with-webkit
|
|
||||||
|
|
||||||
- name: test desktop build
|
|
||||||
run: |
|
|
||||||
echo "--------------------------------------------------------------"
|
|
||||||
echo "running tests for desktop"
|
|
||||||
cd build/tests
|
|
||||||
# xvfb-run --auto-servernum ./TestGitStorage -v2
|
|
||||||
xvfb-run --auto-servernum make check
|
|
||||||
|
|
||||||
|
|
93
.github/workflows/linux-ubuntu-22.04-5.15.yml
vendored
93
.github/workflows/linux-ubuntu-22.04-5.15.yml
vendored
|
@ -1,4 +1,5 @@
|
||||||
name: Ubuntu 22.04 / Qt 5.15--
|
name: Ubuntu 22.04 / Qt 5.15--
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
|
@ -12,91 +13,7 @@ on:
|
||||||
- master
|
- master
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
do-build-test:
|
||||||
runs-on: ubuntu-latest
|
uses: ./.github/workflows/linux-debian-generic.yml
|
||||||
container:
|
with:
|
||||||
image: ubuntu:22.04
|
container-image: ubuntu:22.04
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: checkout sources
|
|
||||||
uses: actions/checkout@v1
|
|
||||||
|
|
||||||
- name: get container ready for build
|
|
||||||
env:
|
|
||||||
SUBSURFACE_REPO_PATH: ${{ github.workspace }}
|
|
||||||
run: |
|
|
||||||
echo "--------------------------------------------------------------"
|
|
||||||
echo "update distro and install dependencies"
|
|
||||||
|
|
||||||
apt-get update
|
|
||||||
apt-get dist-upgrade -y
|
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get install -y -q \
|
|
||||||
autoconf automake cmake g++ git libcrypto++-dev libcurl4-gnutls-dev \
|
|
||||||
libgit2-dev libqt5qml5 libqt5quick5 libqt5svg5-dev \
|
|
||||||
libqt5webkit5-dev libsqlite3-dev libssh2-1-dev libssl-dev libssl-dev \
|
|
||||||
libtool libusb-1.0-0-dev libxml2-dev libxslt1-dev libzip-dev make \
|
|
||||||
pkg-config qml-module-qtlocation qml-module-qtpositioning \
|
|
||||||
qml-module-qtquick2 qt5-qmake qtchooser qtconnectivity5-dev \
|
|
||||||
qtdeclarative5-dev qtdeclarative5-private-dev qtlocation5-dev \
|
|
||||||
qtpositioning5-dev qtscript5-dev qttools5-dev qttools5-dev-tools \
|
|
||||||
qtquickcontrols2-5-dev xvfb libbluetooth-dev libmtp-dev \
|
|
||||||
mdbtools-dev
|
|
||||||
|
|
||||||
git config --global user.email "ci@subsurface-divelog.org"
|
|
||||||
git config --global user.name "Subsurface CI"
|
|
||||||
git config --global --add safe.directory ${SUBSURFACE_REPO_PATH}
|
|
||||||
git config --global --add safe.directory ${SUBSURFACE_REPO_PATH}/libdivecomputer
|
|
||||||
|
|
||||||
- name: store dummy version and build number for test build
|
|
||||||
run: |
|
|
||||||
echo "100" > latest-subsurface-buildnumber
|
|
||||||
echo "CICD-test-build" > latest-subsurface-buildnumber-extension
|
|
||||||
|
|
||||||
- name: build subsurface-mobile
|
|
||||||
run: |
|
|
||||||
echo "--------------------------------------------------------------"
|
|
||||||
echo "building mobile"
|
|
||||||
cd ..
|
|
||||||
bash -e -x subsurface/scripts/build.sh -mobile
|
|
||||||
|
|
||||||
- name: test mobile build
|
|
||||||
run: |
|
|
||||||
echo "--------------------------------------------------------------"
|
|
||||||
echo "running tests for mobile"
|
|
||||||
|
|
||||||
cd build-mobile/tests
|
|
||||||
# xvfb-run --auto-servernum ./TestGitStorage -v2
|
|
||||||
xvfb-run --auto-servernum make check
|
|
||||||
|
|
||||||
- name: build subsurface
|
|
||||||
run: |
|
|
||||||
echo "--------------------------------------------------------------"
|
|
||||||
echo "building desktop"
|
|
||||||
|
|
||||||
# now build for the desktop version (including WebKit)
|
|
||||||
cd ..
|
|
||||||
bash -e -x subsurface/scripts/build.sh -desktop -build-with-webkit
|
|
||||||
|
|
||||||
- name: test desktop build
|
|
||||||
run: |
|
|
||||||
echo "--------------------------------------------------------------"
|
|
||||||
echo "running tests for desktop"
|
|
||||||
cd build/tests
|
|
||||||
# xvfb-run --auto-servernum ./TestGitStorage -v2
|
|
||||||
xvfb-run --auto-servernum make check
|
|
||||||
|
|
||||||
- name: build subsurface-downloader
|
|
||||||
run: |
|
|
||||||
echo "--------------------------------------------------------------"
|
|
||||||
echo "building downloader"
|
|
||||||
cd ..
|
|
||||||
bash -e -x subsurface/scripts/build.sh -downloader
|
|
||||||
|
|
||||||
- name: build smtk2ssrf
|
|
||||||
run: |
|
|
||||||
echo "--------------------------------------------------------------"
|
|
||||||
echo "building smtk2ssrf"
|
|
||||||
|
|
||||||
# build smtk2ssrf (needs the artefacts generated by the subsurface build
|
|
||||||
cd ..
|
|
||||||
bash -e -x subsurface/scripts/smtk2ssrf-build.sh -y
|
|
||||||
|
|
93
.github/workflows/linux-ubuntu-24.04-5.15.yml
vendored
93
.github/workflows/linux-ubuntu-24.04-5.15.yml
vendored
|
@ -1,4 +1,5 @@
|
||||||
name: Ubuntu 24.04 / Qt 5.15--
|
name: Ubuntu 24.04 / Qt 5.15--
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
|
@ -12,91 +13,7 @@ on:
|
||||||
- master
|
- master
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
do-build-test:
|
||||||
runs-on: ubuntu-latest
|
uses: ./.github/workflows/linux-debian-generic.yml
|
||||||
container:
|
with:
|
||||||
image: ubuntu:24.04
|
container-image: ubuntu:24.04
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: checkout sources
|
|
||||||
uses: actions/checkout@v1
|
|
||||||
|
|
||||||
- name: get container ready for build
|
|
||||||
env:
|
|
||||||
SUBSURFACE_REPO_PATH: ${{ github.workspace }}
|
|
||||||
run: |
|
|
||||||
echo "--------------------------------------------------------------"
|
|
||||||
echo "update distro and install dependencies"
|
|
||||||
|
|
||||||
apt-get update
|
|
||||||
apt-get dist-upgrade -y
|
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get install -y -q \
|
|
||||||
autoconf automake cmake g++ git libcrypto++-dev libcurl4-gnutls-dev \
|
|
||||||
libgit2-dev libqt5qml5 libqt5quick5 libqt5svg5-dev \
|
|
||||||
libqt5webkit5-dev libsqlite3-dev libssh2-1-dev libssl-dev libssl-dev \
|
|
||||||
libtool libusb-1.0-0-dev libxml2-dev libxslt1-dev libzip-dev make \
|
|
||||||
pkg-config qml-module-qtlocation qml-module-qtpositioning \
|
|
||||||
qml-module-qtquick2 qt5-qmake qtchooser qtconnectivity5-dev \
|
|
||||||
qtdeclarative5-dev qtdeclarative5-private-dev qtlocation5-dev \
|
|
||||||
qtpositioning5-dev qtscript5-dev qttools5-dev qttools5-dev-tools \
|
|
||||||
qtquickcontrols2-5-dev xvfb libbluetooth-dev libmtp-dev \
|
|
||||||
mdbtools-dev
|
|
||||||
|
|
||||||
git config --global user.email "ci@subsurface-divelog.org"
|
|
||||||
git config --global user.name "Subsurface CI"
|
|
||||||
git config --global --add safe.directory ${SUBSURFACE_REPO_PATH}
|
|
||||||
git config --global --add safe.directory ${SUBSURFACE_REPO_PATH}/libdivecomputer
|
|
||||||
|
|
||||||
- name: store dummy version and build number for test build
|
|
||||||
run: |
|
|
||||||
echo "100" > latest-subsurface-buildnumber
|
|
||||||
echo "CICD-test-build" > latest-subsurface-buildnumber-extension
|
|
||||||
|
|
||||||
- name: build subsurface-mobile
|
|
||||||
run: |
|
|
||||||
echo "--------------------------------------------------------------"
|
|
||||||
echo "building mobile"
|
|
||||||
cd ..
|
|
||||||
bash -e -x subsurface/scripts/build.sh -mobile
|
|
||||||
|
|
||||||
- name: test mobile build
|
|
||||||
run: |
|
|
||||||
echo "--------------------------------------------------------------"
|
|
||||||
echo "running tests for mobile"
|
|
||||||
|
|
||||||
cd build-mobile/tests
|
|
||||||
# xvfb-run --auto-servernum ./TestGitStorage -v2
|
|
||||||
xvfb-run --auto-servernum make check
|
|
||||||
|
|
||||||
- name: build subsurface
|
|
||||||
run: |
|
|
||||||
echo "--------------------------------------------------------------"
|
|
||||||
echo "building desktop"
|
|
||||||
|
|
||||||
# now build for the desktop version (including WebKit)
|
|
||||||
cd ..
|
|
||||||
bash -e -x subsurface/scripts/build.sh -desktop -build-with-webkit
|
|
||||||
|
|
||||||
- name: test desktop build
|
|
||||||
run: |
|
|
||||||
echo "--------------------------------------------------------------"
|
|
||||||
echo "running tests for desktop"
|
|
||||||
cd build/tests
|
|
||||||
# xvfb-run --auto-servernum ./TestGitStorage -v2
|
|
||||||
xvfb-run --auto-servernum make check
|
|
||||||
|
|
||||||
- name: build subsurface-downloader
|
|
||||||
run: |
|
|
||||||
echo "--------------------------------------------------------------"
|
|
||||||
echo "building downloader"
|
|
||||||
cd ..
|
|
||||||
bash -e -x subsurface/scripts/build.sh -downloader
|
|
||||||
|
|
||||||
- name: build smtk2ssrf
|
|
||||||
run: |
|
|
||||||
echo "--------------------------------------------------------------"
|
|
||||||
echo "building smtk2ssrf"
|
|
||||||
|
|
||||||
# build smtk2ssrf (needs the artefacts generated by the subsurface build
|
|
||||||
cd ..
|
|
||||||
bash -e -x subsurface/scripts/smtk2ssrf-build.sh -y
|
|
||||||
|
|
28
.github/workflows/mac.yml
vendored
28
.github/workflows/mac.yml
vendored
|
@ -18,23 +18,9 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: checkout sources
|
- name: checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
- name: atomically create or retrieve the build number and assemble release notes
|
fetch-depth: 0
|
||||||
id: version_number
|
submodules: recursive
|
||||||
if: github.event_name == 'push'
|
|
||||||
run: |
|
|
||||||
bash scripts/get-atomic-buildnr.sh ${{ github.sha }} ${{ secrets.NIGHTLY_BUILDS }} "CICD-release"
|
|
||||||
version=$(cat release-version)
|
|
||||||
echo "version=$version" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- name: store dummy version and build number for pull request
|
|
||||||
id: pull_request_version_number
|
|
||||||
if: github.event_name == 'pull_request'
|
|
||||||
run: |
|
|
||||||
echo "100" > latest-subsurface-buildnumber
|
|
||||||
echo "CICD-pull-request" > latest-subsurface-buildnumber-extension
|
|
||||||
version=$(scripts/get-version)
|
|
||||||
echo "version=$version" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- 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
|
||||||
|
@ -46,6 +32,12 @@ jobs:
|
||||||
ref: main
|
ref: main
|
||||||
path: qt-mac
|
path: qt-mac
|
||||||
|
|
||||||
|
- name: set the version information
|
||||||
|
id: version_number
|
||||||
|
uses: ./.github/actions/manage-version
|
||||||
|
with:
|
||||||
|
nightly-builds-secret: ${{ secrets.NIGHTLY_BUILDS }}
|
||||||
|
|
||||||
- name: build Subsurface
|
- name: build Subsurface
|
||||||
id: build
|
id: build
|
||||||
run: |
|
run: |
|
||||||
|
@ -70,7 +62,7 @@ jobs:
|
||||||
if: github.event_name == 'pull_request'
|
if: github.event_name == 'pull_request'
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: Subsurface-MacOS-${{ steps.pull_request_version_number.outputs.version }}
|
name: Subsurface-MacOS-${{ steps.version_number.outputs.version }}
|
||||||
path: ${{ steps.build.outputs.dmg }}
|
path: ${{ steps.build.outputs.dmg }}
|
||||||
compression-level: 0
|
compression-level: 0
|
||||||
|
|
||||||
|
|
25
.github/workflows/post-releasenotes.yml
vendored
25
.github/workflows/post-releasenotes.yml
vendored
|
@ -1,4 +1,5 @@
|
||||||
name: Post Release
|
name: Post Release Notes
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
|
@ -6,24 +7,28 @@ on:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
|
|
||||||
env:
|
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
postRelease:
|
postRelease:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: checkout sources
|
- name: checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
submodules: recursive
|
||||||
|
|
||||||
|
- name: set the version information
|
||||||
|
id: version_number
|
||||||
|
uses: ./.github/actions/manage-version
|
||||||
|
with:
|
||||||
|
nightly-builds-secret: ${{ secrets.NIGHTLY_BUILDS }}
|
||||||
|
|
||||||
# since we are running this step on a pull request, we will skip build numbers in releases
|
# since we are running this step on a pull request, we will skip build numbers in releases
|
||||||
- name: atomically create or retrieve the build number and assemble release notes
|
- name: assemble release notes
|
||||||
id: version_number
|
env:
|
||||||
|
EVENT_HEAD_COMMIT_ID: ${{ github.event.head_commit.id }}
|
||||||
run: |
|
run: |
|
||||||
bash -x ./scripts/get-atomic-buildnr.sh ${{ github.sha }} ${{ secrets.NIGHTLY_BUILDS }} "CICD-release"
|
bash scripts/create-releasenotes.sh $EVENT_HEAD_COMMIT_ID
|
||||||
bash scripts/create-releasenotes.sh ${{ github.event.head_commit.id }}
|
|
||||||
version=$(cat release-version)
|
|
||||||
echo "version=$version" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
# add a file containing the release title so it can be picked up and listed on the release page on our web server
|
# add a file containing the release title so it can be picked up and listed on the release page on our web server
|
||||||
- name: publish release
|
- name: publish release
|
||||||
|
|
15
.github/workflows/ubuntu-launchpad-build.yml
vendored
15
.github/workflows/ubuntu-launchpad-build.yml
vendored
|
@ -15,13 +15,16 @@ jobs:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Check out sources
|
- name: Check out sources
|
||||||
uses: actions/checkout@v1
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
submodules: recursive
|
||||||
|
|
||||||
- name: atomically create or retrieve the build number
|
- name: set the version information
|
||||||
id: version_number
|
id: version_number
|
||||||
if: github.event_name == 'push'
|
uses: ./.github/actions/manage-version
|
||||||
run: |
|
with:
|
||||||
bash scripts/get-atomic-buildnr.sh ${{ github.sha }} ${{ secrets.NIGHTLY_BUILDS }} "CICD-release"
|
nightly-builds-secret: ${{ secrets.NIGHTLY_BUILDS }}
|
||||||
|
|
||||||
- name: Setup build dependencies
|
- name: Setup build dependencies
|
||||||
run: |
|
run: |
|
||||||
|
@ -48,5 +51,5 @@ jobs:
|
||||||
- name: run the launchpad make-package script
|
- name: run the launchpad make-package script
|
||||||
run: |
|
run: |
|
||||||
cd ..
|
cd ..
|
||||||
bash -x subsurface/packaging/ubuntu/make-package.sh ${{ github.ref_name }}
|
bash -x subsurface/packaging/ubuntu/make-package.sh $GITHUB_REF_NAME
|
||||||
|
|
||||||
|
|
|
@ -16,17 +16,17 @@ jobs:
|
||||||
mxe_sha: 'c0bfefc57a00fdf6cb5278263e21a478e47b0bf5'
|
mxe_sha: 'c0bfefc57a00fdf6cb5278263e21a478e47b0bf5'
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Build the name for the docker image
|
- name: Build the name for the docker image
|
||||||
id: build_name
|
id: build_name
|
||||||
run: |
|
run: |
|
||||||
v=${{ env.VERSION }}
|
v=$VERSION
|
||||||
b=${{ github.ref }} # -BRANCH suffix, unless the branch is master
|
b=$GITHUB_REF # -BRANCH suffix, unless the branch is master
|
||||||
b=${b/refs\/heads\//}
|
b=${b/refs\/heads\//}
|
||||||
b=${b,,} # the name needs to be all lower case
|
b=${b,,} # the name needs to be all lower case
|
||||||
if [ $b = "master" ] ; then b="" ; else b="-$b" ; fi
|
if [ $b = "master" ] ; then b="" ; else b="-$b" ; fi
|
||||||
echo "NAME=${{ github.repository_owner }}/mxe-build${b}:${v}" >> $GITHUB_OUTPUT
|
echo "NAME=$GITHUB_REPOSITORY_OWNER/mxe-build${b}:${v}" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Build and Publish Linux Docker image to Dockerhub
|
- name: Build and Publish Linux Docker image to Dockerhub
|
||||||
uses: elgohr/Publish-Docker-Github-Action@v5
|
uses: elgohr/Publish-Docker-Github-Action@v5
|
||||||
|
|
33
.github/workflows/windows.yml
vendored
33
.github/workflows/windows.yml
vendored
|
@ -1,4 +1,5 @@
|
||||||
name: Windows
|
name: Windows
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
|
@ -12,28 +13,23 @@ on:
|
||||||
- master
|
- master
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
buildWindows:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
image: docker://subsurface/mxe-build:3.1.0
|
image: docker://subsurface/mxe-build:3.1.0
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: checkout sources
|
- name: checkout sources
|
||||||
uses: actions/checkout@v1
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
submodules: recursive
|
||||||
|
|
||||||
- name: atomically create or retrieve the build number and assemble release notes
|
- name: set the version information
|
||||||
id: version_number
|
id: version_number
|
||||||
if: github.event_name == 'push'
|
uses: ./.github/actions/manage-version
|
||||||
run: |
|
with:
|
||||||
bash scripts/get-atomic-buildnr.sh ${{ github.sha }} ${{ secrets.NIGHTLY_BUILDS }} "CICD-release"
|
nightly-builds-secret: ${{ secrets.NIGHTLY_BUILDS }}
|
||||||
version=$(cat release-version)
|
|
||||||
echo "version=$version" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- name: store dummy version and build number for pull request
|
|
||||||
if: github.event_name == 'pull_request'
|
|
||||||
run: |
|
|
||||||
echo "100" > latest-subsurface-buildnumber
|
|
||||||
echo "CICD-pull-request" > latest-subsurface-buildnumber-extension
|
|
||||||
|
|
||||||
- name: get other dependencies
|
- name: get other dependencies
|
||||||
env:
|
env:
|
||||||
|
@ -53,6 +49,15 @@ jobs:
|
||||||
bash -x subsurface/packaging/windows/in-container-build.sh 2>&1 | tee build.log
|
bash -x subsurface/packaging/windows/in-container-build.sh 2>&1 | tee build.log
|
||||||
grep "Built target installer" build.log
|
grep "Built target installer" build.log
|
||||||
|
|
||||||
|
- name: publish pull request artifacts
|
||||||
|
if: github.event_name == 'pull_request'
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: Subsurface-Windows-${{ steps.version_number.outputs.version }}
|
||||||
|
path: |
|
||||||
|
subsurface*.exe*
|
||||||
|
smtk2ssrf*.exe
|
||||||
|
|
||||||
# only publish a 'release' on push events (those include merging a PR)
|
# only publish a 'release' on push events (those include merging a PR)
|
||||||
- name: upload binaries
|
- name: upload binaries
|
||||||
if: github.event_name == 'push'
|
if: github.event_name == 'push'
|
||||||
|
|
|
@ -320,7 +320,7 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||||
endif()
|
endif()
|
||||||
elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
||||||
execute_process(
|
execute_process(
|
||||||
COMMAND bash scripts/get-version
|
COMMAND bash scripts/get-version.sh
|
||||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||||
OUTPUT_VARIABLE SSRF_VERSION_STRING
|
OUTPUT_VARIABLE SSRF_VERSION_STRING
|
||||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
|
|
||||||
execute_process(
|
execute_process(
|
||||||
COMMAND bash ${CMAKE_TOP_SRC_DIR}/scripts/get-version 4
|
COMMAND bash ${CMAKE_TOP_SRC_DIR}/scripts/get-version.sh 4
|
||||||
WORKING_DIRECTORY ${CMAKE_TOP_SRC_DIR}
|
WORKING_DIRECTORY ${CMAKE_TOP_SRC_DIR}
|
||||||
OUTPUT_VARIABLE CANONICAL_VERSION_STRING_4
|
OUTPUT_VARIABLE CANONICAL_VERSION_STRING_4
|
||||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
)
|
)
|
||||||
|
|
||||||
execute_process(
|
execute_process(
|
||||||
COMMAND bash ${CMAKE_TOP_SRC_DIR}/scripts/get-version 3
|
COMMAND bash ${CMAKE_TOP_SRC_DIR}/scripts/get-version.sh 3
|
||||||
WORKING_DIRECTORY ${CMAKE_TOP_SRC_DIR}
|
WORKING_DIRECTORY ${CMAKE_TOP_SRC_DIR}
|
||||||
OUTPUT_VARIABLE CANONICAL_VERSION_STRING_3
|
OUTPUT_VARIABLE CANONICAL_VERSION_STRING_3
|
||||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
)
|
)
|
||||||
|
|
||||||
execute_process(
|
execute_process(
|
||||||
COMMAND bash ${CMAKE_TOP_SRC_DIR}/scripts/get-version
|
COMMAND bash ${CMAKE_TOP_SRC_DIR}/scripts/get-version.sh
|
||||||
WORKING_DIRECTORY ${CMAKE_TOP_SRC_DIR}
|
WORKING_DIRECTORY ${CMAKE_TOP_SRC_DIR}
|
||||||
OUTPUT_VARIABLE CANONICAL_VERSION_STRING
|
OUTPUT_VARIABLE CANONICAL_VERSION_STRING
|
||||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
|
|
|
@ -86,9 +86,9 @@ mkdir -p "$BUILDROOT"/subsurface-mobile-build
|
||||||
pushd "$BUILDROOT"/subsurface-mobile-build
|
pushd "$BUILDROOT"/subsurface-mobile-build
|
||||||
|
|
||||||
# set up the Subsurface versions by hand
|
# set up the Subsurface versions by hand
|
||||||
CANONICALVERSION=$("$SUBSURFACE_SOURCE"/scripts/get-version)
|
CANONICALVERSION=$("$SUBSURFACE_SOURCE"/scripts/get-version.sh)
|
||||||
echo "#define CANONICAL_VERSION_STRING \"$CANONICALVERSION\"" > ssrf-version.h
|
echo "#define CANONICAL_VERSION_STRING \"$CANONICALVERSION\"" > ssrf-version.h
|
||||||
CANONICALVERSION_4=$("$SUBSURFACE_SOURCE"/scripts/get-version 4)
|
CANONICALVERSION_4=$("$SUBSURFACE_SOURCE"/scripts/get-version.sh 4)
|
||||||
echo "#define CANONICAL_VERSION_STRING_4 \"$CANONICALVERSION_4\"" >> ssrf-version.h
|
echo "#define CANONICAL_VERSION_STRING_4 \"$CANONICALVERSION_4\"" >> ssrf-version.h
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@ cd subsurface
|
||||||
git submodule init
|
git submodule init
|
||||||
git submodule update
|
git submodule update
|
||||||
|
|
||||||
GITVERSION=$(bash scripts/get-version 4)
|
GITVERSION=$(bash scripts/get-version.sh 4)
|
||||||
GITDATE=$(git log -1 --format="%at" | xargs -I{} date -d @{} +%Y-%m-%d)
|
GITDATE=$(git log -1 --format="%at" | xargs -I{} date -d @{} +%Y-%m-%d)
|
||||||
LIBDCREVISION=$(cd libdivecomputer ; git rev-parse --verify HEAD)
|
LIBDCREVISION=$(cd libdivecomputer ; git rev-parse --verify HEAD)
|
||||||
FOLDER="subsurface-$GITVERSION"
|
FOLDER="subsurface-$GITVERSION"
|
||||||
|
|
|
@ -77,11 +77,11 @@ if [[ $QT_VERSION = 5.15* ]] ; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# set up the Subsurface versions by hand
|
# set up the Subsurface versions by hand
|
||||||
CANONICALVERSION=$("$SUBSURFACE_SOURCE"/scripts/get-version)
|
CANONICALVERSION=$("$SUBSURFACE_SOURCE"/scripts/get-version.sh)
|
||||||
echo "#define CANONICAL_VERSION_STRING \"$CANONICALVERSION\"" > "$SUBSURFACE_SOURCE"/ssrf-version.h
|
echo "#define CANONICAL_VERSION_STRING \"$CANONICALVERSION\"" > "$SUBSURFACE_SOURCE"/ssrf-version.h
|
||||||
CANONICALVERSION_4=$("$SUBSURFACE_SOURCE"/scripts/get-version 4)
|
CANONICALVERSION_4=$("$SUBSURFACE_SOURCE"/scripts/get-version.sh 4)
|
||||||
echo "#define CANONICAL_VERSION_STRING_4 \"$CANONICALVERSION_4\"" >> "$SUBSURFACE_SOURCE"/ssrf-version.h
|
echo "#define CANONICAL_VERSION_STRING_4 \"$CANONICALVERSION_4\"" >> "$SUBSURFACE_SOURCE"/ssrf-version.h
|
||||||
CANONICALVERSION_3=$("$SUBSURFACE_SOURCE"/scripts/get-version 3)
|
CANONICALVERSION_3=$("$SUBSURFACE_SOURCE"/scripts/get-version.sh 3)
|
||||||
echo "#define CANONICAL_VERSION_STRING_3 \"$CANONICALVERSION_3\"" >> "$SUBSURFACE_SOURCE"/ssrf-version.h
|
echo "#define CANONICAL_VERSION_STRING_3 \"$CANONICALVERSION_3\"" >> "$SUBSURFACE_SOURCE"/ssrf-version.h
|
||||||
|
|
||||||
BUNDLE=org.subsurface-divelog.subsurface-mobile
|
BUNDLE=org.subsurface-divelog.subsurface-mobile
|
||||||
|
|
|
@ -11,7 +11,7 @@ DMGCREATE=create-dmg
|
||||||
|
|
||||||
# same git version magic as in the Makefile
|
# same git version magic as in the Makefile
|
||||||
# for the naming of volume and dmg we want the 3 digits of the full version number
|
# for the naming of volume and dmg we want the 3 digits of the full version number
|
||||||
VERSION=$(cd ${DIR}/subsurface; ./scripts/get-version)
|
VERSION=$(cd ${DIR}/subsurface; ./scripts/get-version.sh)
|
||||||
|
|
||||||
# first build and install Subsurface and then clean up the staging area
|
# first build and install Subsurface and then clean up the staging area
|
||||||
# make sure we didn't lose the minimum OS version
|
# make sure we didn't lose the minimum OS version
|
||||||
|
|
|
@ -20,7 +20,7 @@ cd subsurface
|
||||||
git submodule init
|
git submodule init
|
||||||
git submodule update
|
git submodule update
|
||||||
|
|
||||||
GITVERSION=$(bash scripts/get-version 4)
|
GITVERSION=$(bash scripts/get-version.sh 4)
|
||||||
GITDATE=$(git log -1 --format="%at" | xargs -I{} date -d @{} +%Y-%m-%d)
|
GITDATE=$(git log -1 --format="%at" | xargs -I{} date -d @{} +%Y-%m-%d)
|
||||||
LIBDCREVISION=$(cd libdivecomputer ; git rev-parse --verify HEAD)
|
LIBDCREVISION=$(cd libdivecomputer ; git rev-parse --verify HEAD)
|
||||||
FOLDER="subsurface_$GITVERSION"
|
FOLDER="subsurface_$GITVERSION"
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
# To validate relevant files are up to date, you would run the script
|
# To validate relevant files are up to date, you would run the script
|
||||||
# from command line before tagging:
|
# from command line before tagging:
|
||||||
#
|
#
|
||||||
# $ scripts/check-version -cr <tag>
|
# $ scripts/check-version.sh -cr <tag>
|
||||||
|
|
||||||
set -eu
|
set -eu
|
||||||
#set -x
|
#set -x
|
|
@ -4,7 +4,7 @@
|
||||||
# consistently name all builds, regardless of OS or desktop/mobile
|
# consistently name all builds, regardless of OS or desktop/mobile
|
||||||
#
|
#
|
||||||
# we do need to be able to create three digit (M.m.p) and four digit (M.m.p.c) version strings
|
# we do need to be able to create three digit (M.m.p) and four digit (M.m.p.c) version strings
|
||||||
# default is VERSION_EXTENSION version - an argument of '4' or '3' gets you a digits only version string
|
# default is VERSION_EXTENSION version - an argument of '1', '3', or '4' gets you a digits only version string
|
||||||
#
|
#
|
||||||
# we hardcode a base version - this will rarely change
|
# we hardcode a base version - this will rarely change
|
||||||
# (we actually haven't discussed a situation where it would change...)
|
# (we actually haven't discussed a situation where it would change...)
|
||||||
|
@ -16,19 +16,21 @@ croak() {
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
croak_usage() {
|
croak_usage() {
|
||||||
croak "Usage: $0 [3|4]"
|
croak "Usage: $0 [1|3|4]"
|
||||||
}
|
}
|
||||||
|
|
||||||
if [[ $# -gt 1 ]] ; then croak_usage ; fi
|
if [[ $# -gt 1 ]] ; then croak_usage ; fi
|
||||||
if [[ $# -eq 1 ]] ; then
|
if [[ $# -eq 1 ]] ; then
|
||||||
if [[ $1 != "4" && $1 != "3" ]] ; then croak_usage ; fi
|
if [[ $1 != "1" && $1 != "3" && $1 != "4" ]] ; then croak_usage ; fi
|
||||||
DIGITS="$1"
|
DIGITS="$1"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# figure out where we are in the file system
|
# figure out where we are in the file system
|
||||||
cd "$(dirname "$0")/../"
|
pushd "$(dirname "$0")/../" &> /dev/null
|
||||||
export SUBSURFACE_SOURCE=$PWD
|
export SUBSURFACE_SOURCE=$PWD
|
||||||
|
|
||||||
|
VERSION_EXTENSION="-"
|
||||||
|
|
||||||
# add the build number to this as 'patch' component
|
# add the build number to this as 'patch' component
|
||||||
# if we run in an environment where we are given a build number (e.g. CICD builds)
|
# if we run in an environment where we are given a build number (e.g. CICD builds)
|
||||||
# we just grab that - otherwise we have to figure it out on the fly
|
# we just grab that - otherwise we have to figure it out on the fly
|
||||||
|
@ -38,12 +40,12 @@ if [ ! -f latest-subsurface-buildnumber ] ; then
|
||||||
# (b) we have the ability to check out another git repo
|
# (b) we have the ability to check out another git repo
|
||||||
# in situations where either of these isn't true, it's the caller's
|
# in situations where either of these isn't true, it's the caller's
|
||||||
# responsibility to ensure that the latest-subsurface-buildnumber file exists
|
# responsibility to ensure that the latest-subsurface-buildnumber file exists
|
||||||
if [ ! -d "$SUBSURFACE_SOURCE/nightly-builds" ] ; then
|
if [ ! -d "nightly-builds" ] ; then
|
||||||
git clone https://github.com/subsurface/nightly-builds &> /dev/null || croak "failed to clone nightly-builds repo"
|
git clone https://github.com/subsurface/nightly-builds &> /dev/null || croak "failed to clone nightly-builds repo"
|
||||||
fi
|
fi
|
||||||
cd nightly-builds
|
pushd nightly-builds &> /dev/null
|
||||||
git fetch &> /dev/null
|
git fetch &> /dev/null
|
||||||
LAST_BUILD_BRANCHES=$(git branch -a --sort=-committerdate --list | grep remotes/origin/branch-for | head -50 | cut -d/ -f3)
|
LAST_BUILD_BRANCHES=$(git branch -a --sort=-committerdate --list | grep remotes/origin/branch-for | cut -d/ -f3)
|
||||||
for LAST_BUILD_BRANCH in $LAST_BUILD_BRANCHES "not-found" ; do
|
for LAST_BUILD_BRANCH in $LAST_BUILD_BRANCHES "not-found" ; do
|
||||||
LAST_BUILD_SHA=$(cut -d- -f 3 <<< "$LAST_BUILD_BRANCH")
|
LAST_BUILD_SHA=$(cut -d- -f 3 <<< "$LAST_BUILD_BRANCH")
|
||||||
git -C "$SUBSURFACE_SOURCE" merge-base --is-ancestor "$LAST_BUILD_SHA" HEAD && break
|
git -C "$SUBSURFACE_SOURCE" merge-base --is-ancestor "$LAST_BUILD_SHA" HEAD && break
|
||||||
|
@ -51,30 +53,33 @@ if [ ! -f latest-subsurface-buildnumber ] ; then
|
||||||
[ "not-found" = "$LAST_BUILD_BRANCH" ] && croak "can't find a build number for the current working tree"
|
[ "not-found" = "$LAST_BUILD_BRANCH" ] && croak "can't find a build number for the current working tree"
|
||||||
git checkout "$LAST_BUILD_BRANCH" &> /dev/null || croak "failed to check out $LAST_BUILD_BRANCH in nightly-builds"
|
git checkout "$LAST_BUILD_BRANCH" &> /dev/null || croak "failed to check out $LAST_BUILD_BRANCH in nightly-builds"
|
||||||
BUILDNR=$(<./latest-subsurface-buildnumber)
|
BUILDNR=$(<./latest-subsurface-buildnumber)
|
||||||
cd "$SUBSURFACE_SOURCE"
|
popd &> /dev/null
|
||||||
VERSION_EXTENSION="-"
|
|
||||||
VERSION_EXTENSION+=$(git log --pretty="oneline" "${LAST_BUILD_SHA}...HEAD" | wc -l | tr -d '[:space:]')
|
VERSION_EXTENSION+=$(git log --pretty="oneline" "${LAST_BUILD_SHA}...HEAD" | wc -l | tr -d '[:space:]')
|
||||||
VERSION_EXTENSION+="-"
|
VERSION_EXTENSION+="-"
|
||||||
[ "$VERSION_EXTENSION" = "-0-" ] && VERSION_EXTENSION="-"
|
[ "$VERSION_EXTENSION" = "-0-" ] && VERSION_EXTENSION="-"
|
||||||
VERSION_EXTENSION+="local"
|
|
||||||
else
|
else
|
||||||
# use the files included with the sources
|
BUILDNR=$(<"latest-subsurface-buildnumber")
|
||||||
BUILDNR=$(<"$SUBSURFACE_SOURCE/latest-subsurface-buildnumber")
|
fi
|
||||||
VERSION_EXTENSION=""
|
|
||||||
if [ -f "$SUBSURFACE_SOURCE/latest-subsurface-buildnumber-extension" ] ; then
|
if [ -f "latest-subsurface-buildnumber-extension" ] ; then
|
||||||
VERSION_EXTENSION="-"
|
VERSION_EXTENSION+=$(<"latest-subsurface-buildnumber-extension")
|
||||||
VERSION_EXTENSION+=$(<"$SUBSURFACE_SOURCE/latest-subsurface-buildnumber-extension")
|
else
|
||||||
fi
|
VERSION_EXTENSION+="local"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
COMMITS_SINCE=$(tr -cd "[:digit:]" <<<"$VERSION_EXTENSION")
|
COMMITS_SINCE=$(tr -cd "[:digit:]" <<<"$VERSION_EXTENSION")
|
||||||
[[ -z $COMMITS_SINCE ]] && COMMITS_SINCE="0"
|
[[ -z $COMMITS_SINCE ]] && COMMITS_SINCE="0"
|
||||||
|
|
||||||
if [[ $DIGITS == "3" ]] ; then
|
if [[ $DIGITS == "1" ]] ; then
|
||||||
|
VERSION="${BUILDNR}"
|
||||||
|
elif [[ $DIGITS == "3" ]] ; then
|
||||||
VERSION="${SUBSURFACE_BASE_VERSION}.${BUILDNR}"
|
VERSION="${SUBSURFACE_BASE_VERSION}.${BUILDNR}"
|
||||||
elif [[ $DIGITS == "4" ]] ; then
|
elif [[ $DIGITS == "4" ]] ; then
|
||||||
VERSION="${SUBSURFACE_BASE_VERSION}.${BUILDNR}.${COMMITS_SINCE}"
|
VERSION="${SUBSURFACE_BASE_VERSION}.${BUILDNR}.${COMMITS_SINCE}"
|
||||||
else
|
else
|
||||||
VERSION="${SUBSURFACE_BASE_VERSION}.${BUILDNR}${VERSION_EXTENSION}"
|
VERSION="${SUBSURFACE_BASE_VERSION}.${BUILDNR}${VERSION_EXTENSION}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
printf '%s' "$VERSION"
|
printf '%s' "$VERSION"
|
||||||
|
|
||||||
|
popd &> /dev/null
|
|
@ -1,13 +1,13 @@
|
||||||
message(STATUS "processing version.cmake")
|
message(STATUS "processing version.cmake")
|
||||||
execute_process(
|
execute_process(
|
||||||
COMMAND bash ${CMAKE_TOP_SRC_DIR}/../scripts/get-version
|
COMMAND bash ${CMAKE_TOP_SRC_DIR}/../scripts/get-version.sh
|
||||||
WORKING_DIRECTORY ${CMAKE_TOP_SRC_DIR}
|
WORKING_DIRECTORY ${CMAKE_TOP_SRC_DIR}
|
||||||
OUTPUT_VARIABLE CANONICAL_VERSION_STRING
|
OUTPUT_VARIABLE CANONICAL_VERSION_STRING
|
||||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
)
|
)
|
||||||
|
|
||||||
execute_process(
|
execute_process(
|
||||||
COMMAND bash ${CMAKE_TOP_SRC_DIR}/../scripts/get-version 4
|
COMMAND bash ${CMAKE_TOP_SRC_DIR}/../scripts/get-version.sh 4
|
||||||
WORKING_DIRECTORY ${CMAKE_TOP_SRC_DIR}
|
WORKING_DIRECTORY ${CMAKE_TOP_SRC_DIR}
|
||||||
OUTPUT_VARIABLE CANONICAL_VERSION_STRING_4
|
OUTPUT_VARIABLE CANONICAL_VERSION_STRING_4
|
||||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
|
|
|
@ -167,7 +167,7 @@ parts:
|
||||||
else
|
else
|
||||||
craftctl set grade=devel
|
craftctl set grade=devel
|
||||||
fi
|
fi
|
||||||
craftctl set version=$( scripts/get-version )
|
craftctl set version=$( scripts/get-version.sh )
|
||||||
override-build: |
|
override-build: |
|
||||||
mkdir -p ../install-root
|
mkdir -p ../install-root
|
||||||
ln -sf ../../../stage/usr/lib/*/qt5/plugins/geoservices/libqtgeoservices_googlemaps.so \
|
ln -sf ../../../stage/usr/lib/*/qt5/plugins/geoservices/libqtgeoservices_googlemaps.so \
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue