Compare commits
8 Commits
master
...
versionCha
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9c192a27d6 | ||
|
|
128273caad | ||
|
|
67a3c17d8f | ||
|
|
9467c54d01 | ||
|
|
6465bd85c2 | ||
|
|
2f73994c36 | ||
|
|
a25fe08fb2 | ||
|
|
11c74f1e2f |
28
.github/workflows/android.yml
vendored
28
.github/workflows/android.yml
vendored
@ -18,7 +18,7 @@ jobs:
|
|||||||
uses: actions/checkout@v1
|
uses: actions/checkout@v1
|
||||||
|
|
||||||
- name: atomically create or retrieve the build number
|
- name: atomically create or retrieve the build number
|
||||||
id: build_nr
|
id: version_number
|
||||||
if: github.event_name == 'push'
|
if: github.event_name == 'push'
|
||||||
run: |
|
run: |
|
||||||
cd .. # check out parallel to subsurface sources
|
cd .. # check out parallel to subsurface sources
|
||||||
@ -31,6 +31,16 @@ jobs:
|
|||||||
git push origin main
|
git push origin main
|
||||||
cd ..
|
cd ..
|
||||||
bash -x subsurface/scripts/get-or-create-build-nr.sh ${{ github.sha }}
|
bash -x subsurface/scripts/get-or-create-build-nr.sh ${{ github.sha }}
|
||||||
|
cp nightly-builds/latest-subsurface-buildnumber subsurface
|
||||||
|
echo "CICD-release" > subsurface/latest-subsurface-buildnumber-extension
|
||||||
|
version=$(bash subsurface/scripts/get-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: run build
|
- name: run build
|
||||||
id: build
|
id: build
|
||||||
@ -55,17 +65,10 @@ jobs:
|
|||||||
apt-get install --reinstall cpp-7 gcc-7-base libgcc-7-dev libcc1-0 gcc-7
|
apt-get install --reinstall cpp-7 gcc-7-base libgcc-7-dev libcc1-0 gcc-7
|
||||||
git config --global --add safe.directory ${SUBSURFACE_REPO_PATH}
|
git config --global --add safe.directory ${SUBSURFACE_REPO_PATH}
|
||||||
git config --global --add safe.directory ${SUBSURFACE_REPO_PATH}/libdivecomputer
|
git config --global --add safe.directory ${SUBSURFACE_REPO_PATH}/libdivecomputer
|
||||||
|
# get the build number via curl so this works both for a pull request as well as a push
|
||||||
|
curl -q https://raw.githubusercontent.com/subsurface/nightly-builds/main/latest-subsurface-buildnumber > buildnr.dat
|
||||||
OUTPUT_DIR=$GITHUB_WORKSPACE bash -x ./subsurface/packaging/android/qmake-build.sh
|
OUTPUT_DIR=$GITHUB_WORKSPACE bash -x ./subsurface/packaging/android/qmake-build.sh
|
||||||
|
|
||||||
- name: create version number
|
|
||||||
id: version_number
|
|
||||||
if: github.event_name == 'push'
|
|
||||||
run: |
|
|
||||||
latest=$(cat ../nightly-builds/latest-subsurface-buildnumber)
|
|
||||||
today=$(date '+%Y-%m-%d')
|
|
||||||
version="$today.$latest"
|
|
||||||
echo "version=$version" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
# 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'
|
||||||
@ -79,6 +82,11 @@ jobs:
|
|||||||
files: |
|
files: |
|
||||||
Subsurface-mobile*.apk
|
Subsurface-mobile*.apk
|
||||||
body: |
|
body: |
|
||||||
|
| :warning: WARNING |
|
||||||
|
|:---------------------------|
|
||||||
|
| We made some fairly drastic changes to the version numbering methodology. |
|
||||||
|
| It's possible that this causes some confusion / surprising behavior in the next couple of CICD releases. |
|
||||||
|
|
||||||
CICD release artifact
|
CICD release artifact
|
||||||
|
|
||||||
These builds are created on every merge or push into the [Subsurface repo](http://github.com/subsurface/subsurface).
|
These builds are created on every merge or push into the [Subsurface repo](http://github.com/subsurface/subsurface).
|
||||||
|
|||||||
2
.github/workflows/coverity-scan.yml
vendored
2
.github/workflows/coverity-scan.yml
vendored
@ -44,5 +44,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 linux)
|
version: $(/scripts/get-version)
|
||||||
description: Automatic scan on github actions
|
description: Automatic scan on github actions
|
||||||
|
|||||||
21
.github/workflows/fedora-copr-build.yml
vendored
21
.github/workflows/fedora-copr-build.yml
vendored
@ -15,6 +15,25 @@ jobs:
|
|||||||
- name: Check out sources
|
- name: Check out sources
|
||||||
uses: actions/checkout@v1
|
uses: actions/checkout@v1
|
||||||
|
|
||||||
|
- name: atomically create or retrieve the build number
|
||||||
|
id: version_number
|
||||||
|
if: github.event_name == 'push'
|
||||||
|
run: |
|
||||||
|
cd .. # check out parallel to subsurface sources
|
||||||
|
url="https://subsurface:${{ secrets.NIGHTLY_BUILDS }}@github.com/subsurface/nightly-builds"
|
||||||
|
# the clone followed by the pointless push should verify that the password is stored in the config
|
||||||
|
# that way the script doesn't need the password
|
||||||
|
git clone -b main https://github.com/subsurface/nightly-builds
|
||||||
|
cd nightly-builds
|
||||||
|
git remote set-url origin "$url"
|
||||||
|
git push origin main
|
||||||
|
cd ..
|
||||||
|
bash -x subsurface/scripts/get-or-create-build-nr.sh ${{ github.sha }}
|
||||||
|
cp nightly-builds/latest-subsurface-buildnumber subsurface
|
||||||
|
echo "CICD-release" > subsurface/latest-subsurface-buildnumber-extension
|
||||||
|
version=$(bash subsurface/scripts/get-version)
|
||||||
|
echo "version=$version" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Setup API token for copr-cli
|
- name: Setup API token for copr-cli
|
||||||
env:
|
env:
|
||||||
API_TOKEN: ${{ secrets.COPR_TOKEN }}
|
API_TOKEN: ${{ secrets.COPR_TOKEN }}
|
||||||
@ -43,4 +62,4 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
cd ..
|
cd ..
|
||||||
bash -x subsurface/packaging/copr/make-package.sh post
|
bash -x subsurface/packaging/copr/make-package.sh post
|
||||||
|
|
||||||
|
|||||||
9
.github/workflows/ios.yml
vendored
9
.github/workflows/ios.yml
vendored
@ -13,16 +13,25 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: switch to Xcode 11
|
- name: switch to Xcode 11
|
||||||
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@v1
|
||||||
|
|
||||||
- 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: set our Qt build
|
||||||
run: |
|
run: |
|
||||||
env
|
env
|
||||||
curl -L --output Qt-5.14.1-ios.tar.xz https://f002.backblazeb2.com/file/Subsurface-Travis/Qt-5.14.1-ios.tar.xz
|
curl -L --output Qt-5.14.1-ios.tar.xz https://f002.backblazeb2.com/file/Subsurface-Travis/Qt-5.14.1-ios.tar.xz
|
||||||
mkdir -p $HOME/Qt
|
mkdir -p $HOME/Qt
|
||||||
xzcat Qt-5.14.1-ios.tar.xz | tar -x -C $HOME/Qt -f -
|
xzcat Qt-5.14.1-ios.tar.xz | tar -x -C $HOME/Qt -f -
|
||||||
|
|
||||||
|
- 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 for iOS
|
- name: build Subsurface-mobile for iOS
|
||||||
env:
|
env:
|
||||||
SUBSURFACE_REPO_PATH: ${{ github.workspace }}
|
SUBSURFACE_REPO_PATH: ${{ github.workspace }}
|
||||||
|
|||||||
@ -31,6 +31,11 @@ jobs:
|
|||||||
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
|
||||||
|
|
||||||
|
- name: store dummy version and build number for pull request
|
||||||
|
if: github.event_name == 'pull_request'
|
||||||
|
run: |
|
||||||
|
echo "6.0.100" > latest-subsurface-buildnumber
|
||||||
|
|
||||||
- name: build Subsurface
|
- name: build Subsurface
|
||||||
env:
|
env:
|
||||||
SUBSURFACE_REPO_PATH: ${{ github.workspace }}
|
SUBSURFACE_REPO_PATH: ${{ github.workspace }}
|
||||||
|
|||||||
5
.github/workflows/linux-fedora-qt6.yml
vendored
5
.github/workflows/linux-fedora-qt6.yml
vendored
@ -33,6 +33,11 @@ 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
|
||||||
|
run: |
|
||||||
|
echo "100" > latest-subsurface-buildnumber
|
||||||
|
echo "CICD-test-build" > latest-subsurface-buildnumber-extension
|
||||||
|
|
||||||
- name: build Subsurface
|
- name: build Subsurface
|
||||||
env:
|
env:
|
||||||
SUBSURFACE_REPO_PATH: ${{ github.workspace }}
|
SUBSURFACE_REPO_PATH: ${{ github.workspace }}
|
||||||
|
|||||||
5
.github/workflows/linux-focal-5.12.yml
vendored
5
.github/workflows/linux-focal-5.12.yml
vendored
@ -35,6 +35,11 @@ jobs:
|
|||||||
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
|
||||||
|
|
||||||
|
- 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
|
- name: build Subsurface-mobile
|
||||||
env:
|
env:
|
||||||
SUBSURFACE_REPO_PATH: ${{ github.workspace }}
|
SUBSURFACE_REPO_PATH: ${{ github.workspace }}
|
||||||
|
|||||||
5
.github/workflows/linux-jammy-5.15.yml
vendored
5
.github/workflows/linux-jammy-5.15.yml
vendored
@ -35,6 +35,11 @@ jobs:
|
|||||||
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
|
||||||
|
|
||||||
|
- 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
|
- name: build Subsurface-mobile
|
||||||
env:
|
env:
|
||||||
SUBSURFACE_REPO_PATH: ${{ github.workspace }}
|
SUBSURFACE_REPO_PATH: ${{ github.workspace }}
|
||||||
|
|||||||
26
.github/workflows/linux-snap.yml
vendored
26
.github/workflows/linux-snap.yml
vendored
@ -20,6 +20,31 @@ jobs:
|
|||||||
# Needed for version determination to work
|
# Needed for version determination to work
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: atomically create or retrieve the build number
|
||||||
|
id: version_number
|
||||||
|
if: github.event_name == 'push'
|
||||||
|
run: |
|
||||||
|
cd .. # check out parallel to subsurface sources
|
||||||
|
url="https://subsurface:${{ secrets.NIGHTLY_BUILDS }}@github.com/subsurface/nightly-builds"
|
||||||
|
# the clone followed by the pointless push should verify that the password is stored in the config
|
||||||
|
# that way the script doesn't need the password
|
||||||
|
git clone -b main https://github.com/subsurface/nightly-builds
|
||||||
|
cd nightly-builds
|
||||||
|
git remote set-url origin "$url"
|
||||||
|
git push origin main
|
||||||
|
cd ..
|
||||||
|
bash -x subsurface/scripts/get-or-create-build-nr.sh ${{ github.sha }}
|
||||||
|
cp nightly-builds/latest-subsurface-buildnumber subsurface
|
||||||
|
echo "CICD-release" > subsurface/latest-subsurface-buildnumber-extension
|
||||||
|
version=$(bash subsurface/scripts/get-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: Set up LXD
|
- name: Set up LXD
|
||||||
uses: canonical/setup-lxd@main
|
uses: canonical/setup-lxd@main
|
||||||
|
|
||||||
@ -56,6 +81,7 @@ jobs:
|
|||||||
run: ccache --show-stats --zero-stats
|
run: ccache --show-stats --zero-stats
|
||||||
|
|
||||||
- name: Upload the snap
|
- name: Upload the snap
|
||||||
|
if: github.event_name == 'push'
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: ${{ steps.build-snap.outputs.snap-name }}
|
name: ${{ steps.build-snap.outputs.snap-name }}
|
||||||
|
|||||||
62
.github/workflows/linux-trusty-5.12.yml
vendored
62
.github/workflows/linux-trusty-5.12.yml
vendored
@ -17,6 +17,31 @@ jobs:
|
|||||||
- name: checkout sources
|
- name: checkout sources
|
||||||
uses: actions/checkout@v1
|
uses: actions/checkout@v1
|
||||||
|
|
||||||
|
- name: atomically create or retrieve the build number
|
||||||
|
id: version_number
|
||||||
|
if: github.event_name == 'push'
|
||||||
|
run: |
|
||||||
|
cd .. # check out parallel to subsurface sources
|
||||||
|
url="https://subsurface:${{ secrets.NIGHTLY_BUILDS }}@github.com/subsurface/nightly-builds"
|
||||||
|
# the clone followed by the pointless push should verify that the password is stored in the config
|
||||||
|
# that way the script doesn't need the password
|
||||||
|
git clone -b main https://github.com/subsurface/nightly-builds
|
||||||
|
cd nightly-builds
|
||||||
|
git remote set-url origin "$url"
|
||||||
|
git push origin main
|
||||||
|
cd ..
|
||||||
|
bash -x subsurface/scripts/get-or-create-build-nr.sh ${{ github.sha }}
|
||||||
|
cp nightly-builds/latest-subsurface-buildnumber subsurface
|
||||||
|
echo "CICD-release" > subsurface/latest-subsurface-buildnumber-extension
|
||||||
|
version=$(bash subsurface/scripts/get-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: run build
|
- name: run build
|
||||||
env:
|
env:
|
||||||
SUBSURFACE_REPO_PATH: ${{ github.workspace }}
|
SUBSURFACE_REPO_PATH: ${{ github.workspace }}
|
||||||
@ -39,3 +64,40 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: Linux-artifacts
|
name: Linux-artifacts
|
||||||
path: Linux-artifacts
|
path: Linux-artifacts
|
||||||
|
|
||||||
|
- 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)
|
||||||
|
- name: upload binaries
|
||||||
|
if: github.event_name == 'push'
|
||||||
|
uses: softprops/action-gh-release@v1
|
||||||
|
with:
|
||||||
|
tag_name: v${{ steps.version_number.outputs.version }}
|
||||||
|
repository: subsurface/nightly-builds
|
||||||
|
token: ${{ secrets.NIGHTLY_BUILDS }}
|
||||||
|
prerelease: false
|
||||||
|
fail_on_unmatched_files: true
|
||||||
|
files: |
|
||||||
|
./Subsurface*.AppImage
|
||||||
|
body: |
|
||||||
|
| :warning: WARNING |
|
||||||
|
|:---------------------------|
|
||||||
|
| We made some fairly drastic changes to the version numbering methodology. |
|
||||||
|
| It's possible that this causes some confusion / surprising behavior in the next couple of CICD releases. |
|
||||||
|
|
||||||
|
CICD release artifact
|
||||||
|
|
||||||
|
These builds are created on every merge or push into the [Subsurface repo](http://github.com/subsurface/subsurface).
|
||||||
|
This build is based on http://github.com/subsurface/subsurface/commit/${{ github.sha }}
|
||||||
|
|
||||||
|
None of these artifacts are signed.
|
||||||
|
The Android APK can be side-loaded on most Android devices. If you had a previous Subsurface-mobile version installed from the Google Play store, you'll have to uninstall that first.
|
||||||
|
The Windows installer will ask you to confirm installation of an app from an unknown developer.
|
||||||
|
The macOS DMG makes it even harder with a multi-step dance that requires opening the Privacy & Security settings in the System Preferences and explicitly confirming that you are willing to install this app.
|
||||||
|
|
||||||
|
You can find similar Subsurface-Daily builds for [Ubuntu](https://ppa.launchpadcontent.net/subsurface) and Subsurface-test for [Fedora](https://copr.fedorainfracloud.org/coprs/dirkhh/Subsurface-test).
|
||||||
|
|
||||||
|
Please report any issues with these builds in the [Subsurface user forum](https://groups.google.com/g/subsurface-divelog).
|
||||||
|
|||||||
27
.github/workflows/mac.yml
vendored
27
.github/workflows/mac.yml
vendored
@ -13,8 +13,9 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: checkout sources
|
- name: checkout sources
|
||||||
uses: actions/checkout@v1
|
uses: actions/checkout@v1
|
||||||
|
|
||||||
- name: atomically create or retrieve the build number
|
- name: atomically create or retrieve the build number
|
||||||
id: build_nr
|
id: version_number
|
||||||
if: github.event_name == 'push'
|
if: github.event_name == 'push'
|
||||||
run: |
|
run: |
|
||||||
cd .. # check out parallel to subsurface sources
|
cd .. # check out parallel to subsurface sources
|
||||||
@ -27,6 +28,16 @@ jobs:
|
|||||||
git push origin main
|
git push origin main
|
||||||
cd ..
|
cd ..
|
||||||
bash -x subsurface/scripts/get-or-create-build-nr.sh ${{ github.sha }}
|
bash -x subsurface/scripts/get-or-create-build-nr.sh ${{ github.sha }}
|
||||||
|
cp nightly-builds/latest-subsurface-buildnumber subsurface
|
||||||
|
echo "CICD-release" > subsurface/latest-subsurface-buildnumber-extension
|
||||||
|
version=$(bash subsurface/scripts/get-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: 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
|
||||||
@ -55,15 +66,6 @@ jobs:
|
|||||||
echo "Created $IMG"
|
echo "Created $IMG"
|
||||||
echo "dmg=$IMG" >> $GITHUB_OUTPUT
|
echo "dmg=$IMG" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: create version number
|
|
||||||
id: version_number
|
|
||||||
if: github.event_name == 'push'
|
|
||||||
run: |
|
|
||||||
latest=$(cat ../nightly-builds/latest-subsurface-buildnumber)
|
|
||||||
today=$(date '+%Y-%m-%d')
|
|
||||||
version="$today.$latest"
|
|
||||||
echo "version=$version" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
# 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'
|
||||||
@ -76,6 +78,11 @@ jobs:
|
|||||||
fail_on_unmatched_files: true
|
fail_on_unmatched_files: true
|
||||||
files: ${{ steps.build.outputs.dmg }}
|
files: ${{ steps.build.outputs.dmg }}
|
||||||
body: |
|
body: |
|
||||||
|
| :warning: WARNING |
|
||||||
|
|:---------------------------|
|
||||||
|
| We made some fairly drastic changes to the version numbering methodology. |
|
||||||
|
| It's possible that this causes some confusion / surprising behavior in the next couple of CICD releases. |
|
||||||
|
|
||||||
CICD release artifact
|
CICD release artifact
|
||||||
|
|
||||||
These builds are created on every merge or push into the [Subsurface repo](http://github.com/subsurface/subsurface).
|
These builds are created on every merge or push into the [Subsurface repo](http://github.com/subsurface/subsurface).
|
||||||
|
|||||||
@ -49,7 +49,7 @@ unset LD_LIBRARY_PATH
|
|||||||
./linuxdeployqt*.AppImage --appimage-extract-and-run ./appdir/usr/share/applications/*.desktop -exclude-libs=libdbus-1.so.3 -bundle-non-qt-libs -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 -bundle-non-qt-libs -qmldir=./subsurface/stats -qmldir=./subsurface/map-widget/ -verbose=2
|
||||||
|
|
||||||
# create the AppImage
|
# create the AppImage
|
||||||
export VERSION=$(cd subsurface/scripts ; ./get-version linux) # linuxdeployqt uses this for naming the file
|
export VERSION=$(cd subsurface/scripts ; ./get-version) # linuxdeployqt uses this for naming the file
|
||||||
./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
|
||||||
|
|||||||
19
.github/workflows/ubuntu-launchpad-build.yml
vendored
19
.github/workflows/ubuntu-launchpad-build.yml
vendored
@ -14,6 +14,25 @@ jobs:
|
|||||||
- name: Check out sources
|
- name: Check out sources
|
||||||
uses: actions/checkout@v1
|
uses: actions/checkout@v1
|
||||||
|
|
||||||
|
- name: atomically create or retrieve the build number
|
||||||
|
id: version_number
|
||||||
|
if: github.event_name == 'push'
|
||||||
|
run: |
|
||||||
|
cd .. # check out parallel to subsurface sources
|
||||||
|
url="https://subsurface:${{ secrets.NIGHTLY_BUILDS }}@github.com/subsurface/nightly-builds"
|
||||||
|
# the clone followed by the pointless push should verify that the password is stored in the config
|
||||||
|
# that way the script doesn't need the password
|
||||||
|
git clone -b main https://github.com/subsurface/nightly-builds
|
||||||
|
cd nightly-builds
|
||||||
|
git remote set-url origin "$url"
|
||||||
|
git push origin main
|
||||||
|
cd ..
|
||||||
|
bash -x subsurface/scripts/get-or-create-build-nr.sh ${{ github.sha }}
|
||||||
|
cp nightly-builds/latest-subsurface-buildnumber subsurface
|
||||||
|
echo "CICD-release" > subsurface/latest-subsurface-buildnumber-extension
|
||||||
|
version=$(bash subsurface/scripts/get-version)
|
||||||
|
echo "version=$version" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Setup build dependencies
|
- name: Setup build dependencies
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
|
|||||||
26
.github/workflows/windows.yml
vendored
26
.github/workflows/windows.yml
vendored
@ -18,7 +18,7 @@ jobs:
|
|||||||
uses: actions/checkout@v1
|
uses: actions/checkout@v1
|
||||||
|
|
||||||
- name: atomically create or retrieve the build number
|
- name: atomically create or retrieve the build number
|
||||||
id: build_nr
|
id: version_number
|
||||||
if: github.event_name == 'push'
|
if: github.event_name == 'push'
|
||||||
run: |
|
run: |
|
||||||
cd .. # check out parallel to subsurface sources
|
cd .. # check out parallel to subsurface sources
|
||||||
@ -31,6 +31,16 @@ jobs:
|
|||||||
git push origin main
|
git push origin main
|
||||||
cd ..
|
cd ..
|
||||||
bash -x subsurface/scripts/get-or-create-build-nr.sh ${{ github.sha }}
|
bash -x subsurface/scripts/get-or-create-build-nr.sh ${{ github.sha }}
|
||||||
|
cp nightly-builds/latest-subsurface-buildnumber subsurface
|
||||||
|
echo "CICD-release" > subsurface/latest-subsurface-buildnumber-extension
|
||||||
|
version=$(bash subsurface/scripts/get-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:
|
||||||
@ -49,15 +59,6 @@ jobs:
|
|||||||
bash -x subsurface/.github/workflows/scripts/windows-in-container-build.sh 2>&1 | tee build.log
|
bash -x subsurface/.github/workflows/scripts/windows-in-container-build.sh 2>&1 | tee build.log
|
||||||
grep "Built target installer" build.log
|
grep "Built target installer" build.log
|
||||||
|
|
||||||
- name: create version number
|
|
||||||
id: version_number
|
|
||||||
if: github.event_name == 'push'
|
|
||||||
run: |
|
|
||||||
latest=$(cat ../nightly-builds/latest-subsurface-buildnumber)
|
|
||||||
today=$(date '+%Y-%m-%d')
|
|
||||||
version="$today.$latest"
|
|
||||||
echo "version=$version" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
# 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'
|
||||||
@ -72,6 +73,11 @@ jobs:
|
|||||||
./subsurface*.exe*
|
./subsurface*.exe*
|
||||||
./smtk2ssrf*.exe
|
./smtk2ssrf*.exe
|
||||||
body: |
|
body: |
|
||||||
|
| :warning: WARNING |
|
||||||
|
|:---------------------------|
|
||||||
|
| We made some fairly drastic changes to the version numbering methodology. |
|
||||||
|
| It's possible that this causes some confusion / surprising behavior in the next couple of CICD releases. |
|
||||||
|
|
||||||
CICD release artifact
|
CICD release artifact
|
||||||
|
|
||||||
These builds are created on every merge or push into the [Subsurface repo](http://github.com/subsurface/subsurface).
|
These builds are created on every merge or push into the [Subsurface repo](http://github.com/subsurface/subsurface).
|
||||||
|
|||||||
@ -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 sh scripts/get-version linux
|
COMMAND bash scripts/get-version
|
||||||
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,8 +1,7 @@
|
|||||||
# Generate the ssrf-config.h every 'make'
|
# Generate the ssrf-config.h every 'make'
|
||||||
file(WRITE ${CMAKE_BINARY_DIR}/version.h.in
|
file(WRITE ${CMAKE_BINARY_DIR}/version.h.in
|
||||||
"#define GIT_VERSION_STRING \"@GIT_VERSION_STRING@\"
|
"#define CANONICAL_VERSION_STRING \"@CANONICAL_VERSION_STRING@\"
|
||||||
#define CANONICAL_VERSION_STRING \"@CANONICAL_VERSION_STRING@\"
|
#define CANONICAL_VERSION_STRING_4 \"@CANONICAL_VERSION_STRING_4@\"
|
||||||
#define MOBILE_VERSION_STRING \"@MOBILE_VERSION_STRING@\"
|
|
||||||
")
|
")
|
||||||
|
|
||||||
file(COPY cmake/Modules/version.cmake
|
file(COPY cmake/Modules/version.cmake
|
||||||
|
|||||||
@ -1,23 +1,31 @@
|
|||||||
|
|
||||||
execute_process(
|
execute_process(
|
||||||
COMMAND sh ${CMAKE_TOP_SRC_DIR}/scripts/get-version linux
|
COMMAND bash ${CMAKE_TOP_SRC_DIR}/scripts/get-version 4
|
||||||
WORKING_DIRECTORY ${CMAKE_TOP_SRC_DIR}
|
WORKING_DIRECTORY ${CMAKE_TOP_SRC_DIR}
|
||||||
OUTPUT_VARIABLE GIT_VERSION_STRING
|
OUTPUT_VARIABLE CANONICAL_VERSION_STRING_4
|
||||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
)
|
)
|
||||||
|
|
||||||
execute_process(
|
execute_process(
|
||||||
COMMAND sh ${CMAKE_TOP_SRC_DIR}/scripts/get-version full
|
COMMAND bash ${CMAKE_TOP_SRC_DIR}/scripts/get-version 3
|
||||||
|
WORKING_DIRECTORY ${CMAKE_TOP_SRC_DIR}
|
||||||
|
OUTPUT_VARIABLE CANONICAL_VERSION_STRING_3
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
|
)
|
||||||
|
|
||||||
|
execute_process(
|
||||||
|
COMMAND bash ${CMAKE_TOP_SRC_DIR}/scripts/get-version
|
||||||
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
|
||||||
)
|
)
|
||||||
set(MOBILE_VERSION_STRING "3.4.8")
|
|
||||||
|
|
||||||
configure_file(${SRC} ${DST} @ONLY)
|
configure_file(${SRC} ${DST} @ONLY)
|
||||||
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
||||||
execute_process(
|
execute_process(
|
||||||
COMMAND cat ${CMAKE_TOP_SRC_DIR}/packaging/windows/subsurface.nsi.in
|
COMMAND cat ${CMAKE_TOP_SRC_DIR}/packaging/windows/subsurface.nsi.in
|
||||||
COMMAND sed -e "s/VERSIONTOKEN/${GIT_VERSION_STRING}/"
|
COMMAND sed -e "s/VERSIONTOKEN/${CANONICAL_VERSION_STRING}/"
|
||||||
COMMAND sed -e "s/PRODVTOKEN/${CANONICAL_VERSION_STRING}/"
|
COMMAND sed -e "s/PRODVTOKEN/${CANONICAL_VERSION_STRING_4}/"
|
||||||
OUTPUT_FILE ${CMAKE_BINARY_DIR}/staging/subsurface.nsi
|
OUTPUT_FILE ${CMAKE_BINARY_DIR}/staging/subsurface.nsi
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
@ -410,7 +410,7 @@ QString getUserAgent()
|
|||||||
// fill in the system data - use ':' as separator
|
// fill in the system data - use ':' as separator
|
||||||
// replace all other ':' with ' ' so that this is easy to parse
|
// replace all other ':' with ' ' so that this is easy to parse
|
||||||
#ifdef SUBSURFACE_MOBILE
|
#ifdef SUBSURFACE_MOBILE
|
||||||
QString userAgent = QString("Subsurface-mobile:%1(%2):").arg(subsurface_mobile_version()).arg(subsurface_canonical_version());
|
QString userAgent = QString("Subsurface-mobile:%1:").arg(subsurface_canonical_version());
|
||||||
#elif SUBSURFACE_DOWNLOADER
|
#elif SUBSURFACE_DOWNLOADER
|
||||||
QString userAgent = QString("Subsurface-downloader:%1:").arg(subsurface_canonical_version());
|
QString userAgent = QString("Subsurface-downloader:%1:").arg(subsurface_canonical_version());
|
||||||
#else
|
#else
|
||||||
|
|||||||
@ -1,9 +1,10 @@
|
|||||||
// SPDX-License-Identifier: GPL-2.0
|
// SPDX-License-Identifier: GPL-2.0
|
||||||
#include "ssrf-version.h"
|
#include "ssrf-version.h"
|
||||||
|
|
||||||
|
// let's leave the two redundant functions in case we change our minds on git SHAs
|
||||||
const char *subsurface_git_version(void)
|
const char *subsurface_git_version(void)
|
||||||
{
|
{
|
||||||
return GIT_VERSION_STRING;
|
return CANONICAL_VERSION_STRING_4;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *subsurface_canonical_version(void)
|
const char *subsurface_canonical_version(void)
|
||||||
@ -11,9 +12,3 @@ const char *subsurface_canonical_version(void)
|
|||||||
return CANONICAL_VERSION_STRING;
|
return CANONICAL_VERSION_STRING;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef SUBSURFACE_MOBILE
|
|
||||||
const char *subsurface_mobile_version(void)
|
|
||||||
{
|
|
||||||
return MOBILE_VERSION_STRING;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|||||||
@ -8,10 +8,6 @@ extern "C" {
|
|||||||
const char *subsurface_git_version(void);
|
const char *subsurface_git_version(void);
|
||||||
const char *subsurface_canonical_version(void);
|
const char *subsurface_canonical_version(void);
|
||||||
|
|
||||||
#ifdef SUBSURFACE_MOBILE
|
|
||||||
const char *subsurface_mobile_version(void);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -84,13 +84,10 @@ 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
|
||||||
GITVERSION=$(cd "$SUBSURFACE_SOURCE" ; git describe --match "v[0-9]*" --abbrev=12)
|
CANONICALVERSION=$("$SUBSURFACE_SOURCE"/scripts/get-version)
|
||||||
CANONICALVERSION=$(echo "$GITVERSION" | sed -e 's/-g.*$// ; s/^v//' | sed -e 's/-/./')
|
|
||||||
MOBILEVERSION=$(grep MOBILE "$SUBSURFACE_SOURCE"/cmake/Modules/version.cmake | cut -d\" -f 2)
|
|
||||||
echo "#define GIT_VERSION_STRING \"$GITVERSION\"" > ssrf-version.h
|
|
||||||
echo "#define CANONICAL_VERSION_STRING \"$CANONICALVERSION\"" >> ssrf-version.h
|
echo "#define CANONICAL_VERSION_STRING \"$CANONICALVERSION\"" >> ssrf-version.h
|
||||||
echo "#define MOBILE_VERSION_STRING \"$MOBILEVERSION\"" >> ssrf-version.h
|
CANONICALVERSION_4=$("$SUBSURFACE_SOURCE"/scripts/get-version 4)
|
||||||
SUBSURFACE_MOBILE_VERSION="$MOBILEVERSION ($CANONICALVERSION)"
|
echo "#define CANONICAL_VERSION_STRING_4 \"$CANONICALVERSION_4\"" >> ssrf-version.h
|
||||||
popd
|
popd
|
||||||
|
|
||||||
if [ "$versionOnly" = "1" ] ; then
|
if [ "$versionOnly" = "1" ] ; then
|
||||||
@ -387,7 +384,7 @@ popd
|
|||||||
|
|
||||||
# call qmake to set up the build
|
# call qmake to set up the build
|
||||||
echo "Run qmake to setup the Subsurface-mobile build for all architectures"
|
echo "Run qmake to setup the Subsurface-mobile build for all architectures"
|
||||||
$QMAKE BUILD_NR="$BUILDNR" BUILD_VERSION_NAME="$SUBSURFACE_MOBILE_VERSION" ANDROID_ABIS="$BUILD_ABIS" "$SUBSURFACE_SOURCE"/Subsurface-mobile.pro
|
$QMAKE BUILD_NR="$BUILDNR" BUILD_VERSION_NAME="$CANONICALVERSION" ANDROID_ABIS="$BUILD_ABIS" "$SUBSURFACE_SOURCE"/Subsurface-mobile.pro
|
||||||
|
|
||||||
# if this isn't just a quick rebuild compile the translations
|
# if this isn't just a quick rebuild compile the translations
|
||||||
if [ "$QUICK" = "" ] ; then
|
if [ "$QUICK" = "" ] ; then
|
||||||
|
|||||||
@ -17,7 +17,7 @@
|
|||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>APPL</string>
|
<string>APPL</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>@MOBILE_VERSION@</string>
|
<string>@CANONICAL_VERSION@</string>
|
||||||
<key>CFBundleSignature</key>
|
<key>CFBundleSignature</key>
|
||||||
<string>????</string>
|
<string>????</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
|
|||||||
@ -77,12 +77,10 @@ if [[ $QT_VERSION = 5.15* ]] ; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# set up the Subsurface versions by hand
|
# set up the Subsurface versions by hand
|
||||||
GITVERSION=$(cd "$SUBSURFACE_SOURCE" ; git describe --match "v[0-9]*" --abbrev=12)
|
CANONICALVERSION=$("$SUBSURFACE_SOURCE"/scripts/get-version)
|
||||||
CANONICALVERSION=$(echo "$GITVERSION" | sed -e 's/-g.*$// ; s/^v//' | sed -e 's/-/./')
|
|
||||||
MOBILEVERSION=$(grep MOBILE "$SUBSURFACE_SOURCE"/cmake/Modules/version.cmake | cut -d\" -f 2)
|
|
||||||
echo "#define GIT_VERSION_STRING \"$GITVERSION\"" > "$SUBSURFACE_SOURCE"/ssrf-version.h
|
|
||||||
echo "#define CANONICAL_VERSION_STRING \"$CANONICALVERSION\"" >> "$SUBSURFACE_SOURCE"/ssrf-version.h
|
echo "#define CANONICAL_VERSION_STRING \"$CANONICALVERSION\"" >> "$SUBSURFACE_SOURCE"/ssrf-version.h
|
||||||
echo "#define MOBILE_VERSION_STRING \"$MOBILEVERSION\"" >> "$SUBSURFACE_SOURCE"/ssrf-version.h
|
CANONICALVERSION_4=$("$SUBSURFACE_SOURCE"/scripts/get-version 4)
|
||||||
|
echo "#define CANONICAL_VERSION_STRING_4 \"$CANONICALVERSION_4\"" >> "$SUBSURFACE_SOURCE"/ssrf-version.h
|
||||||
|
|
||||||
BUNDLE=org.subsurface-divelog.subsurface-mobile
|
BUNDLE=org.subsurface-divelog.subsurface-mobile
|
||||||
if [ "${IOS_BUNDLE_PRODUCT_IDENTIFIER}" != "" ] ; then
|
if [ "${IOS_BUNDLE_PRODUCT_IDENTIFIER}" != "" ] ; then
|
||||||
@ -92,7 +90,7 @@ fi
|
|||||||
pushd "$SUBSURFACE_SOURCE"/packaging/ios
|
pushd "$SUBSURFACE_SOURCE"/packaging/ios
|
||||||
# create Info.plist with the correct versions
|
# create Info.plist with the correct versions
|
||||||
# shellcheck disable=SC2002
|
# shellcheck disable=SC2002
|
||||||
cat Info.plist.in | sed "s/@MOBILE_VERSION@/$MOBILEVERSION/;s/@CANONICAL_VERSION@/$CANONICALVERSION/;s/@PRODUCT_BUNDLE_IDENTIFIER@/$BUNDLE/" > Info.plist
|
cat Info.plist.in | sed "s/@CANONICAL_VERSION@/$CANONICALVERSION/;s/@PRODUCT_BUNDLE_IDENTIFIER@/$BUNDLE/" > Info.plist
|
||||||
|
|
||||||
popd
|
popd
|
||||||
if [ "$versionOnly" = "1" ] ; then
|
if [ "$versionOnly" = "1" ] ; then
|
||||||
@ -266,7 +264,7 @@ if [ "$QUICK" != "1" ] ; then
|
|||||||
if [ ! "$CURRENT_SHA" = "$PREVIOUS_SHA" ] ; then
|
if [ ! "$CURRENT_SHA" = "$PREVIOUS_SHA" ] ; then
|
||||||
echo "$CURRENT_SHA" > "${PARENT_DIR}/libdivecomputer-build-${ARCH}/git.SHA"
|
echo "$CURRENT_SHA" > "${PARENT_DIR}/libdivecomputer-build-${ARCH}/git.SHA"
|
||||||
pushd "${PARENT_DIR}/libdivecomputer-build-${ARCH}"
|
pushd "${PARENT_DIR}/libdivecomputer-build-${ARCH}"
|
||||||
"${SUBSURFACE_SOURCE}/libdivecomputer/configure" --host=${BUILDCHAIN} --prefix="$PREFIX" --enable-static --disable-shared --enable-examples=no --without-libusb --without-hidapi
|
"${SUBSURFACE_SOURCE}/libdivecomputer/configure" --host=${BUILDCHAIN} --prefix="$PREFIX" --enable-static --disable-shared --enable-examples=no --without-libusb --without-hidapi
|
||||||
make -j
|
make -j
|
||||||
make install
|
make install
|
||||||
popd
|
popd
|
||||||
|
|||||||
@ -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 linux)
|
VERSION=$(cd ${DIR}/subsurface; ./scripts/get-version)
|
||||||
|
|
||||||
# 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
|
||||||
|
|||||||
@ -7,7 +7,7 @@ cd /__w
|
|||||||
|
|
||||||
# grab the version number
|
# grab the version number
|
||||||
cd subsurface
|
cd subsurface
|
||||||
VERSION=$(./scripts/get-version linux)
|
VERSION=$(./scripts/get-version)
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
# prep the container
|
# prep the container
|
||||||
|
|||||||
@ -1,15 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
if [ ! -z $TRAVIS_BRANCH ] && [ "$TRAVIS_BRANCH" != "master" ] ; then
|
|
||||||
export UPLOADTOOL_SUFFIX=$TRAVIS_BRANCH
|
|
||||||
fi
|
|
||||||
|
|
||||||
# set up the release message to use
|
|
||||||
source ${TRAVIS_BUILD_DIR}/scripts/release-message.sh
|
|
||||||
|
|
||||||
echo "Submitting the folloing apk for continuous build release:"
|
|
||||||
ls -lh ../subsurface-mobile-build-docker-arm*/build/outputs/apk/debug/*.apk
|
|
||||||
|
|
||||||
# get and run the upload script
|
|
||||||
wget -c https://raw.githubusercontent.com/dirkhh/uploadtool/master/upload.sh
|
|
||||||
bash ./upload.sh ../subsurface-mobile-build-docker-arm*/build/outputs/apk/debug/*.apk
|
|
||||||
@ -1,23 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Travis only pulls shallow repos. But that messes with git describe.
|
|
||||||
# Sorry Travis, fetching the whole thing and the tags as well...
|
|
||||||
git fetch --unshallow
|
|
||||||
git pull --tags
|
|
||||||
git describe --match "v[0-9]*"
|
|
||||||
|
|
||||||
# setup build dir on the host, not inside of the container
|
|
||||||
mkdir -p ../subsurface-mobile-build-docker-arm
|
|
||||||
mkdir -p ../subsurface-mobile-build-docker-arm64
|
|
||||||
|
|
||||||
# this uses a custom built Ubuntu image that includes Qt for Android and
|
|
||||||
# Android NDK/SDK
|
|
||||||
# Running sleep to keep the container running during the build
|
|
||||||
PARENT="$( cd .. && pwd )"
|
|
||||||
docker run -v $PWD:/android/subsurface \
|
|
||||||
-v $PARENT/subsurface-mobile-build-docker-arm:/android/subsurface-mobile-build-arm \
|
|
||||||
-v $PARENT/subsurface-mobile-build-docker-arm64:/android/subsurface-mobile-build-arm64 \
|
|
||||||
--name=android-builder \
|
|
||||||
-w /android \
|
|
||||||
-d subsurface/android-build-container:5.13.10 \
|
|
||||||
/bin/sleep 60m
|
|
||||||
@ -1,11 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
set -x
|
|
||||||
set -e
|
|
||||||
|
|
||||||
# by running the build wrapper again we should be able to test newer
|
|
||||||
# versions of the dependencies even without updating the docker image
|
|
||||||
# (but of course having the right things in place will save a ton of time)
|
|
||||||
docker exec -e TRAVIS="$TRAVIS" -t android-builder sh -c "ln -s /android/Qt . ; ln -s /android/android-ndk-r18b . ; ln -s /android/android-sdk-linux . ; subsurface/packaging/android/android-build-wrapper.sh"
|
|
||||||
|
|
||||||
ls -l ../subsurface-mobile-build-docker-arm*/build/outputs/apk/debug
|
|
||||||
@ -18,7 +18,7 @@ cd nightly-builds
|
|||||||
latest=$(<latest-subsurface-buildnumber)
|
latest=$(<latest-subsurface-buildnumber)
|
||||||
|
|
||||||
# now let's see if a branch for the current SHA exists
|
# now let's see if a branch for the current SHA exists
|
||||||
if git checkout $SHA_BRANCH
|
if git checkout "$SHA_BRANCH"
|
||||||
then
|
then
|
||||||
# one of the other workflows created a release number already
|
# one of the other workflows created a release number already
|
||||||
latest=$(<latest-subsurface-buildnumber)
|
latest=$(<latest-subsurface-buildnumber)
|
||||||
@ -27,13 +27,13 @@ else
|
|||||||
# the main branch should have held the previous release number
|
# the main branch should have held the previous release number
|
||||||
# increment by one and write as new build number into the named branch
|
# increment by one and write as new build number into the named branch
|
||||||
latest=$((latest+1))
|
latest=$((latest+1))
|
||||||
git checkout -b $SHA_BRANCH
|
git checkout -b "$SHA_BRANCH"
|
||||||
echo $latest > latest-subsurface-buildnumber
|
echo $latest > latest-subsurface-buildnumber
|
||||||
git commit -a -m "record build number for this SHA"
|
git commit -a -m "record build number for this SHA"
|
||||||
|
|
||||||
# now comes the moment of truth - are we the first one?
|
# now comes the moment of truth - are we the first one?
|
||||||
# the push will succeed for exactly one of the workflows
|
# the push will succeed for exactly one of the workflows
|
||||||
if git push https://github.com/subsurface/nightly-builds $SHA_BRANCH
|
if git push https://github.com/subsurface/nightly-builds "$SHA_BRANCH"
|
||||||
then
|
then
|
||||||
# yay - we win! now let's make sure that we remember this number for next time
|
# yay - we win! now let's make sure that we remember this number for next time
|
||||||
git checkout main
|
git checkout main
|
||||||
@ -42,16 +42,16 @@ else
|
|||||||
if ! git push https://github.com/subsurface/nightly-builds main
|
if ! git push https://github.com/subsurface/nightly-builds main
|
||||||
then
|
then
|
||||||
echo "push to main failed - we'll lose monotonic property"
|
echo "push to main failed - we'll lose monotonic property"
|
||||||
exit -1
|
exit 1
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
# someone else was faster - get the number they wrote
|
# someone else was faster - get the number they wrote
|
||||||
git checkout main
|
git checkout main &> /dev/null
|
||||||
git branch -D $SHA_BRANCH
|
git branch -D "$SHA_BRANCH" &> /dev/null
|
||||||
if ! git checkout -b $SHA_BRANCH
|
if ! git checkout -b "$SHA_BRANCH" &> /dev/null
|
||||||
then
|
then
|
||||||
echo "push to $SHA_BRANCH failed, but switching to it failed as well"
|
echo "push to $SHA_BRANCH failed, but switching to it failed as well"
|
||||||
exit -2
|
exit 2
|
||||||
fi
|
fi
|
||||||
latest=$(<latest-subsurface-buildnumber)
|
latest=$(<latest-subsurface-buildnumber)
|
||||||
fi
|
fi
|
||||||
|
|||||||
@ -1,76 +1,80 @@
|
|||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
|
# shellcheck disable=SC2164
|
||||||
|
|
||||||
# $1 - os name {linux|darwin|win}
|
# consistently name all builds, regardless of OS or desktop/mobile
|
||||||
# $2 - [optional] raw version string "vX.Y-patchN-sha1". as from `git describe'
|
#
|
||||||
# (see below)
|
# 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
|
||||||
set -eu
|
#
|
||||||
#set -x
|
# we hardcode a base version - this will rarely change
|
||||||
|
# (we actually haven't discussed a situation where it would change...)
|
||||||
|
SUBSURFACE_BASE_VERSION=6.0
|
||||||
|
|
||||||
|
# little silly helper functions
|
||||||
croak() {
|
croak() {
|
||||||
echo "$0: $*" >&2
|
echo "$0: $*" >&2
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
croak_usage() {
|
||||||
|
croak "Usage: $0 [3|4]"
|
||||||
|
}
|
||||||
|
|
||||||
[ $# -ge 1 ] || croak "missing OS argument"
|
if [[ $# -gt 1 ]] ; then croak_usage ; fi
|
||||||
os=$1
|
if [[ $# -eq 1 ]] ; then
|
||||||
|
if [[ $1 != "4" && $1 != "3" ]] ; then croak_usage ; fi
|
||||||
if [ $# -eq 2 ] && [ "$2" ]; then
|
DIGITS="$1"
|
||||||
v0=$2
|
|
||||||
else
|
|
||||||
cmd="git describe --match "v[0-9]*" --abbrev=12"
|
|
||||||
v0=$($cmd) || v0=$(cat .gitversion) || croak "odd; command '$cmd' failed"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# strip off the 'v' prefix, if any
|
# figure out where we are in the file system
|
||||||
v0=${v0#v}
|
cd "$(dirname "$0")/../"
|
||||||
|
export SUBSURFACE_SOURCE=$PWD
|
||||||
|
|
||||||
case $os in
|
# add the build number to this as 'patch' component
|
||||||
linux)
|
# if we run in an environment where we are given a build number (e.g. CICD builds)
|
||||||
v=$v0
|
# we just grab that - otherwise we have to figure it out on the fly
|
||||||
;;
|
if [ ! -f latest-subsurface-buildnumber ] ; then
|
||||||
darwin)
|
# figure out the most recent build number, given our own git history
|
||||||
# just the dots in the version string - this way we can
|
# this assumes that (a) we are in a checked out git tree and
|
||||||
# count them
|
# (b) we have the ability to check out another git repo
|
||||||
IFS=.
|
# in situations where either of these isn't true, it's the caller's
|
||||||
set -- $v0 # split $v0 using $IFS separator
|
# responsibility to ensure that the latest-subsurface-buildnumber file exists
|
||||||
dots=$(($# - 1)) # use positional argument count
|
if [ ! -d "$SUBSURFACE_SOURCE/nightly-builds" ] ; then
|
||||||
# split version string using a '-' separator
|
git clone https://github.com/subsurface/nightly-builds &> /dev/null || croak "failed to clone nightly-builds repo"
|
||||||
IFS=-
|
fi
|
||||||
set -- $v0
|
cd nightly-builds
|
||||||
v=$1
|
git fetch &> /dev/null
|
||||||
# do we need to add another digit?
|
LAST_BUILD_BRANCHES=$(git branch -a --sort=-committerdate --list | grep remotes/origin/branch-for | head -50 | cut -d/ -f3)
|
||||||
# We know there are 1 or 2 dots in $v, so if it's just one
|
for LAST_BUILD_BRANCH in $LAST_BUILD_BRANCHES "not-found" ; do
|
||||||
# or we are trying to get to 4, add one digit
|
LAST_BUILD_SHA=$(cut -d- -f 3 <<< "$LAST_BUILD_BRANCH")
|
||||||
if [ $dots -eq 1 ]; then
|
git -C "$SUBSURFACE_SOURCE" merge-base --is-ancestor "$LAST_BUILD_SHA" HEAD && break
|
||||||
if [ $# -gt 1 ]; then
|
done
|
||||||
v=$v.$2
|
[ "not-found" = "$LAST_BUILD_BRANCH" ] && croak "can't find a build number for the current working tree"
|
||||||
else
|
git checkout "$LAST_BUILD_BRANCH" &> /dev/null || croak "failed to check out $LAST_BUILD_BRANCH in nightly-builds"
|
||||||
v=$v.0
|
BUILDNR=$(<./latest-subsurface-buildnumber)
|
||||||
fi
|
cd "$SUBSURFACE_SOURCE"
|
||||||
fi
|
VERSION_EXTENSION="-"
|
||||||
;;
|
VERSION_EXTENSION+=$(git log --pretty="oneline" "${LAST_BUILD_SHA}...HEAD" | wc -l | tr -d '[:space:]')
|
||||||
full|win)
|
VERSION_EXTENSION+="-"
|
||||||
# just the dots in the version string - this way we can
|
[ "$VERSION_EXTENSION" = "-0-" ] && VERSION_EXTENSION="-"
|
||||||
# count them
|
VERSION_EXTENSION+="local"
|
||||||
IFS=.
|
else
|
||||||
set -- $v0 # split $v0 using $IFS separator
|
# use the files included with the sources
|
||||||
dots=$(($# - 1)) # use positional argument count
|
BUILDNR=$(<"$SUBSURFACE_SOURCE/latest-subsurface-buildnumber")
|
||||||
# split version string using a '-' separator
|
VERSION_EXTENSION=""
|
||||||
IFS=-
|
if [ -f "$SUBSURFACE_SOURCE/latest-subsurface-buildnumber-extension" ] ; then
|
||||||
set -- $v0
|
VERSION_EXTENSION="-"
|
||||||
v=$1
|
VERSION_EXTENSION+=$(<"$SUBSURFACE_SOURCE/latest-subsurface-buildnumber-extension")
|
||||||
if [ $dots -eq 1 ]; then
|
fi
|
||||||
v=$v.0
|
fi
|
||||||
fi
|
|
||||||
if [ $# -gt 1 ]; then
|
COMMITS_SINCE=$(tr -cd "[:digit:]" <<<"$VERSION_EXTENSION")
|
||||||
v=$v.$2
|
[[ -z $COMMITS_SINCE ]] && COMMITS_SINCE="0"
|
||||||
else
|
|
||||||
v=$v.0
|
if [[ $DIGITS == "3" ]] ; then
|
||||||
fi
|
VERSION="${SUBSURFACE_BASE_VERSION}.${BUILDNR}"
|
||||||
;;
|
elif [[ $DIGITS == "4" ]] ; then
|
||||||
*)
|
VERSION="${SUBSURFACE_BASE_VERSION}.${BUILDNR}.${COMMITS_SINCE}"
|
||||||
v=git.missing.please.hardcode.version
|
else
|
||||||
;;
|
VERSION="${SUBSURFACE_BASE_VERSION}.${BUILDNR}${VERSION_EXTENSION}"
|
||||||
esac
|
fi
|
||||||
printf '%s' $v
|
printf '%s' "$VERSION"
|
||||||
|
|||||||
@ -1,3 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
echo "Nothing to be done after build"
|
|
||||||
@ -1,45 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
set -x
|
|
||||||
set -e
|
|
||||||
|
|
||||||
# try to get rid of the insane debug crap
|
|
||||||
unalias -a
|
|
||||||
unset -f rvm_debug
|
|
||||||
unset -f cd
|
|
||||||
unset -f pushd
|
|
||||||
unset -f popd
|
|
||||||
|
|
||||||
# Travis only pulls shallow repos. But that messes with git describe.
|
|
||||||
# Sorry Travis, fetching the whole thing and the tags as well...
|
|
||||||
git fetch --unshallow
|
|
||||||
git pull --tags
|
|
||||||
git describe --match "v[0-9]*"
|
|
||||||
|
|
||||||
git submodule init
|
|
||||||
git submodule update --recursive
|
|
||||||
|
|
||||||
pushd libdivecomputer
|
|
||||||
autoreconf --install
|
|
||||||
autoreconf --install
|
|
||||||
popd
|
|
||||||
|
|
||||||
# prep things so we can build for iOS
|
|
||||||
# we have a custom built Qt some gives us just what we need
|
|
||||||
|
|
||||||
pushd ${TRAVIS_BUILD_DIR}/..
|
|
||||||
|
|
||||||
echo "Get custom Qt build and unpack it"
|
|
||||||
curl --output ./Qt-5.11.1-ios.tar.xz \
|
|
||||||
https://f002.backblazeb2.com/file/Subsurface-Travis/Qt-5.11.1-ios.tar.xz
|
|
||||||
md5 ./Qt-5.11.1-ios.tar.xz
|
|
||||||
|
|
||||||
mkdir -p Qt/5.11.1
|
|
||||||
|
|
||||||
tar -xJ -C Qt/5.11.1 -f Qt-5.11.1-ios.tar.xz
|
|
||||||
|
|
||||||
# our scripts assume that there is a convenience link
|
|
||||||
cd subsurface/packaging/ios
|
|
||||||
ln -s ${TRAVIS_BUILD_DIR}/../Qt Qt
|
|
||||||
|
|
||||||
popd
|
|
||||||
@ -1,25 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
set -x
|
|
||||||
set -e
|
|
||||||
|
|
||||||
# this gets executed by Travis when building for iOS
|
|
||||||
# it gets started from inside the subsurface directory
|
|
||||||
|
|
||||||
GITVERSION=$(git describe --match "v[0-9]*" --abbrev=12 | sed -e 's/-g.*$// ; s/^v//')
|
|
||||||
VERSION=$(echo $GITVERSION | sed -e 's/-/./')
|
|
||||||
|
|
||||||
echo "preparing dependencies for Subsurface-mobile ${VERSION} for iOS"
|
|
||||||
|
|
||||||
cd packaging/ios
|
|
||||||
bash -x build.sh -simulator
|
|
||||||
|
|
||||||
echo "now it's time to build Subsurface-mobile ${VERSION} for iOS"
|
|
||||||
|
|
||||||
cd build-Subsurface-mobile-*for_iOS-Release
|
|
||||||
|
|
||||||
sed -i.bak 's/-Wall/-Wno-everything/' Makefile
|
|
||||||
|
|
||||||
make -j4
|
|
||||||
|
|
||||||
# we don't even attempt to create an ipa on Travis
|
|
||||||
@ -1,23 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
cd ${TRAVIS_BUILD_DIR}
|
|
||||||
|
|
||||||
if [ ! -z $TRAVIS_BRANCH ] && [ "$TRAVIS_BRANCH" != "master" ] ; then
|
|
||||||
export UPLOADTOOL_SUFFIX=$TRAVIS_BRANCH
|
|
||||||
fi
|
|
||||||
|
|
||||||
# set up the release message to use
|
|
||||||
source ./scripts/release-message.sh
|
|
||||||
|
|
||||||
echo "Submitting the folloing AppImage for continuous build release:"
|
|
||||||
find . -name "Subsurface*.AppImage"
|
|
||||||
|
|
||||||
# get and run the upload script
|
|
||||||
wget -c https://raw.githubusercontent.com/dirkhh/uploadtool/master/upload.sh
|
|
||||||
|
|
||||||
# don't fail if the zsync file is missing
|
|
||||||
if [ -f Subsurface*.AppImage.zsync ] ; then
|
|
||||||
bash ./upload.sh Subsurface*.AppImage Subsurface*.AppImage.zsync
|
|
||||||
else
|
|
||||||
bash ./upload.sh Subsurface*.AppImage
|
|
||||||
fi
|
|
||||||
@ -1,31 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# prep things so we can build for Linux
|
|
||||||
# we have a custom built Qt some gives us just what we need, including QtWebKit
|
|
||||||
#
|
|
||||||
|
|
||||||
set -x
|
|
||||||
|
|
||||||
# when running this locally, set TRAVIS_BUILD_DIR to the Subsurface
|
|
||||||
# directory inside your Windows build tree
|
|
||||||
TRAVIS_BUILD_DIR=${TRAVIS_BUILD_DIR:-$PWD}
|
|
||||||
|
|
||||||
git fetch --unshallow || true # if running locally, unshallow could fail
|
|
||||||
git pull --tags
|
|
||||||
git submodule init
|
|
||||||
git describe --match "v[0-9]*"
|
|
||||||
|
|
||||||
# make sure we have libdivecomputer
|
|
||||||
echo "Get libdivecomputer"
|
|
||||||
cd ${TRAVIS_BUILD_DIR}
|
|
||||||
git submodule update --recursive
|
|
||||||
cd libdivecomputer
|
|
||||||
autoreconf --install
|
|
||||||
autoreconf --install
|
|
||||||
|
|
||||||
export QT_ROOT=/usr/local/Qt/5.12.4
|
|
||||||
|
|
||||||
cd ${TRAVIS_BUILD_DIR}/..
|
|
||||||
|
|
||||||
# start the container and keep it running
|
|
||||||
docker run -v $PWD/subsurface:/subsurface --name=trusty-qt512 -w / -d dirkhh/trusty-qt512:0.7 /bin/sleep 60m
|
|
||||||
@ -1,45 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
set -x
|
|
||||||
set -e
|
|
||||||
|
|
||||||
# this gets executed by Travis when building an AppImage for Linux
|
|
||||||
# inside of the trusty-qt512 container
|
|
||||||
|
|
||||||
export PATH=$QT_ROOT/bin:$PATH # Make sure correct qmake is found on the $PATH for linuxdeployqt
|
|
||||||
export CMAKE_PREFIX_PATH=$QT_ROOT/lib/cmake
|
|
||||||
|
|
||||||
# first make sure that no one broke Subsurface-mobile
|
|
||||||
bash -e -x /subsurface/scripts/build.sh -mobile -quick
|
|
||||||
|
|
||||||
# now build our AppImage
|
|
||||||
bash -e -x /subsurface/scripts/build.sh -desktop -create-appdir -build-with-webkit -quick
|
|
||||||
|
|
||||||
export QT_PLUGIN_PATH=$QT_ROOT/plugins
|
|
||||||
export QT_QPA_PLATFORM_PLUGIN_PATH=$QT_ROOT/plugins
|
|
||||||
export QT_DEBUG_PLUGINS=1
|
|
||||||
|
|
||||||
# set up the appdir
|
|
||||||
mkdir -p appdir/usr/plugins/
|
|
||||||
|
|
||||||
# mv googlemaps plugins into place
|
|
||||||
mv appdir/usr/usr/local/Qt/5.12.4/gcc_64/plugins/* appdir/usr/plugins # the usr/usr is not a typo, that's where it ends up
|
|
||||||
rm -rf appdir/usr/home/ appdir/usr/include/ appdir/usr/share/man/ # No need to ship developer and man files as part of the AppImage
|
|
||||||
rm -rf appdir/usr/usr appdir/usr/lib/cmake appdir/usr/lib/pkgconfig
|
|
||||||
cp /ssllibs/libssl.so appdir/usr/lib/libssl.so.1.1
|
|
||||||
cp /ssllibs/libcrypto.so appdir/usr/lib/libcrypto.so.1.1
|
|
||||||
|
|
||||||
# get the linuxdeployqt tool and run it to collect the libraries
|
|
||||||
curl -L -O "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage"
|
|
||||||
chmod a+x linuxdeployqt*.AppImage
|
|
||||||
unset QTDIR
|
|
||||||
unset QT_PLUGIN_PATH
|
|
||||||
unset LD_LIBRARY_PATH
|
|
||||||
./linuxdeployqt*.AppImage --appimage-extract-and-run ./appdir/usr/share/applications/*.desktop -bundle-non-qt-libs -qmldir=./subsurface/map-widget/ -verbose=2
|
|
||||||
|
|
||||||
# create the AppImage
|
|
||||||
export VERSION=$(cd /subsurface/scripts ; ./get-version linux) # linuxdeployqt uses this for naming the file
|
|
||||||
./linuxdeployqt*.AppImage --appimage-extract-and-run ./appdir/usr/share/applications/*.desktop -appimage -qmldir=./subsurface/map-widget/ -verbose=2
|
|
||||||
|
|
||||||
# copy AppImage to the calling VM
|
|
||||||
cp Subsurface*.AppImage* /subsurface
|
|
||||||
@ -1,16 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
set -x
|
|
||||||
set -e
|
|
||||||
|
|
||||||
# this is run to actually trigger the creation of the AppImage
|
|
||||||
# inside the container
|
|
||||||
|
|
||||||
docker exec -t trusty-qt512 bash subsurface/scripts/linux-trusty-qt512/in-container-build.sh 2>&1 | tee build.log
|
|
||||||
|
|
||||||
# fail the build if we didn't create Subsurface-mobile
|
|
||||||
grep "Built target subsurface-mobile" build.log
|
|
||||||
|
|
||||||
# fail the build if we didn't create the AppImage
|
|
||||||
grep "Please consider submitting your AppImage to AppImageHub" build.log
|
|
||||||
|
|
||||||
@ -1,13 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
if [ ! -z $TRAVIS_BRANCH ] && [ "$TRAVIS_BRANCH" != "master" ] ; then
|
|
||||||
export UPLOADTOOL_SUFFIX=$TRAVIS_BRANCH
|
|
||||||
fi
|
|
||||||
|
|
||||||
# set up the release message to use
|
|
||||||
source ${TRAVIS_BUILD_DIR}/scripts/release-message.sh
|
|
||||||
|
|
||||||
# get and run the upload script
|
|
||||||
wget -c https://raw.githubusercontent.com/dirkhh/uploadtool/master/upload.sh
|
|
||||||
|
|
||||||
bash ./upload.sh smtk2ssrf*.AppImage
|
|
||||||
@ -1,33 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# prep things so we can build for Linux
|
|
||||||
# we have a custom built Qt some gives us just what we need, including QtWebKit
|
|
||||||
#
|
|
||||||
# this is built from the latest version as of 2017-11-09 in the 5.9 branch and
|
|
||||||
# therefore calls itself Qt-5.9.3
|
|
||||||
|
|
||||||
set -x
|
|
||||||
|
|
||||||
# Travis only pulls shallow repos. But that messes with git describe.
|
|
||||||
# Sorry Travis, fetching the whole thing and the tags as well...
|
|
||||||
git fetch --unshallow
|
|
||||||
git pull --tags
|
|
||||||
git describe --match "v[0-9]*"
|
|
||||||
|
|
||||||
export QT_ROOT=$PWD/Qt/5.9.3
|
|
||||||
rm -rf Qt
|
|
||||||
mkdir -p $QT_ROOT
|
|
||||||
wget -q http://subsurface-divelog.org/downloads/Qt-5.9.3-trusty.tar.xz
|
|
||||||
tar -xJ -C $QT_ROOT -f Qt-5.9.3-trusty.tar.xz
|
|
||||||
|
|
||||||
sudo ln -s $QT_ROOT /usr/local/Qt-5.9.3
|
|
||||||
|
|
||||||
# TestPreferences uses gui calls, so run a xvfb so it has something to talk to
|
|
||||||
export DISPLAY=:99.0
|
|
||||||
sh -e /etc/init.d/xvfb start
|
|
||||||
|
|
||||||
# TestParsePerformance needs this data file to test XML parsing performance
|
|
||||||
pushd ..
|
|
||||||
git clone https://github.com/Subsurface/large-anonymous-sample-data
|
|
||||||
xzcat large-anonymous-sample-data/large-anon.ssrf.xz > subsurface/dives/large-anon.ssrf
|
|
||||||
popd
|
|
||||||
@ -1,72 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
set -x
|
|
||||||
set -e
|
|
||||||
|
|
||||||
# this gets executed by Travis when building an AppImage for Linux
|
|
||||||
# it gets started from inside the subsurface directory
|
|
||||||
|
|
||||||
export PATH=$QT_ROOT/bin:$PATH # Make sure correct qmake is found on the $PATH for linuxdeployqt
|
|
||||||
export CMAKE_PREFIX_PATH=$QT_ROOT/lib/cmake
|
|
||||||
|
|
||||||
# the global build script expects to be called from the directory ABOVE subsurface
|
|
||||||
# build both desktop and mobile - first desktop without BT support and without
|
|
||||||
# webkit to make sure that still works, then with all components in order
|
|
||||||
# to create an AppImage
|
|
||||||
cd ..
|
|
||||||
|
|
||||||
bash -e -x ./subsurface/scripts/build.sh -desktop -create-appdir -build-with-webkit
|
|
||||||
|
|
||||||
export QT_PLUGIN_PATH=$QT_ROOT/plugins
|
|
||||||
export QT_QPA_PLATFORM_PLUGIN_PATH=$QT_ROOT/plugins
|
|
||||||
export QT_DEBUG_PLUGINS=1
|
|
||||||
|
|
||||||
# for debugging: find $QT_ROOT/plugins
|
|
||||||
|
|
||||||
# build export-html to make sure that didn't get broken
|
|
||||||
make -C subsurface/build export-html
|
|
||||||
|
|
||||||
env CTEST_OUTPUT_ON_FAILURE=1 make -C subsurface/build check
|
|
||||||
ls -lR subsurface/build | grep LastTest.log
|
|
||||||
grep -A1 RESULT\ :\ TestParsePerformance subsurface/build/tests/Testing/Temporary/LastTest.log
|
|
||||||
|
|
||||||
# set up the appdir
|
|
||||||
mkdir -p appdir/usr/plugins/
|
|
||||||
|
|
||||||
# mv googlemaps plugins into place
|
|
||||||
mv appdir/usr/usr/local/Qt*/plugins/* appdir/usr/plugins # the usr/usr is not a typo - that's where it ends up
|
|
||||||
rm -rf appdir/usr/home/ appdir/usr/include/ appdir/usr/share/man/ # No need to ship developer and man files as part of the AppImage
|
|
||||||
rm -rf appdir/usr/usr appdir/usr/lib/cmake appdir/usr/lib/pkgconfig
|
|
||||||
|
|
||||||
# get the linuxdeployqt tool and run it to collect the libraries
|
|
||||||
wget -q -c "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage"
|
|
||||||
chmod a+x linuxdeployqt*.AppImage
|
|
||||||
unset QTDIR
|
|
||||||
unset QT_PLUGIN_PATH
|
|
||||||
unset LD_LIBRARY_PATH
|
|
||||||
./linuxdeployqt*.AppImage ./appdir/usr/share/applications/*.desktop -bundle-non-qt-libs -qmldir=./subsurface/map-widget/ -verbose=2
|
|
||||||
|
|
||||||
# create the AppImage
|
|
||||||
export VERSION=$(cd ${TRAVIS_BUILD_DIR}/scripts ; ./get-version linux) # linuxdeployqt uses this for naming the file
|
|
||||||
./linuxdeployqt*.AppImage ./appdir/usr/share/applications/*.desktop -appimage -qmldir=./subsurface/map-widget/ -verbose=2
|
|
||||||
find ./appdir -executable -type f -exec ldd {} \; | grep " => /usr" | cut -d " " -f 2-3 | sort | uniq
|
|
||||||
|
|
||||||
# SmartTrak import tool
|
|
||||||
bash -e -x ./subsurface/scripts/smtk2ssrf-build.sh
|
|
||||||
|
|
||||||
# Create AppImage for smtk2ssrf
|
|
||||||
mkdir -p ./smtk2ssrf_appdir/usr/share
|
|
||||||
mkdir -p ./smtk2ssrf_appdir/usr/plugins
|
|
||||||
mkdir -p ./smtk2ssrf_appdir/usr/bin
|
|
||||||
mkdir -p ./smtk2ssrf_appdir/usr/lib
|
|
||||||
cp -f subsurface/icons/subsurface-icon.svg smtk2ssrf_appdir/
|
|
||||||
cp -f subsurface/smtk-import/smtk2ssrf.desktop smtk2ssrf_appdir/
|
|
||||||
cp -f install-root/bin/smtk2ssrf smtk2ssrf_appdir/usr/bin/
|
|
||||||
cp -f install-root/lib/libdivecomputer.so.0 smtk2ssrf_appdir/usr/lib/
|
|
||||||
cp -f install-root/lib/libgit2* smtk2ssrf_appdir/usr/lib/
|
|
||||||
cp -rf appdir/usr/plugins/{bearer,iconengines,imageformats,platforms,xcbglintegrations} smtk2ssrf_appdir/usr/plugins
|
|
||||||
|
|
||||||
./linuxdeployqt*.AppImage ./smtk2ssrf_appdir/smtk2ssrf.desktop -bundle-non-qt-libs -verbose=2
|
|
||||||
./linuxdeployqt*.AppImage ./smtk2ssrf_appdir/smtk2ssrf.desktop -appimage -verbose=2
|
|
||||||
find ./smtk2ssrf_appdir -executable -type f -exec ldd {} \; | grep " => /usr" | cut -d " " -f 2-3 | sort | uniq
|
|
||||||
|
|
||||||
@ -1,5 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# we don't do anything here
|
|
||||||
|
|
||||||
exit 0
|
|
||||||
@ -1,27 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# prep things so we can build for Linux
|
|
||||||
# we have a custom built Qt some gives us just what we need, including QtWebKit
|
|
||||||
#
|
|
||||||
# this is built from the latest version as of 2017-11-09 in the 5.9 branch and
|
|
||||||
# therefore calls itself Qt-5.9.3
|
|
||||||
|
|
||||||
set -x
|
|
||||||
|
|
||||||
# make sure we use a new enough compiler
|
|
||||||
export CC=gcc-5
|
|
||||||
export CXX=g++-5
|
|
||||||
|
|
||||||
# Travis only pulls shallow repos. But that messes with git describe.
|
|
||||||
# Sorry Travis, fetching the whole thing and the tags as well...
|
|
||||||
git fetch --unshallow
|
|
||||||
git pull --tags
|
|
||||||
git describe --match "v[0-9]*"
|
|
||||||
|
|
||||||
. /opt/qt510/bin/qt510-env.sh
|
|
||||||
export QT_ROOT=/opt/qt510
|
|
||||||
|
|
||||||
# TestPreferences uses gui calls, so run a xvfb so it has something to talk to
|
|
||||||
export DISPLAY=:99.0
|
|
||||||
sh -e /etc/init.d/xvfb start
|
|
||||||
|
|
||||||
@ -1,21 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
set -x
|
|
||||||
set -e
|
|
||||||
|
|
||||||
# this gets executed by Travis when building an AppImage for Linux
|
|
||||||
# it gets started from inside the subsurface directory
|
|
||||||
|
|
||||||
export PATH=$QT_ROOT/bin:$PATH # Make sure correct qmake is found on the $PATH for linuxdeployqt
|
|
||||||
export CMAKE_PREFIX_PATH=$QT_ROOT/lib/cmake
|
|
||||||
|
|
||||||
# the global build script expects to be called from the directory ABOVE subsurface
|
|
||||||
# build both desktop and mobile - first desktop without BT support and without
|
|
||||||
# webkit to make sure that still works, then with all components in order
|
|
||||||
# to create an AppImage
|
|
||||||
cd ..
|
|
||||||
|
|
||||||
bash -e -x ./subsurface/scripts/build.sh -desktop -no-bt
|
|
||||||
rm -rf subsurface/build
|
|
||||||
bash -e -x ./subsurface/scripts/build.sh -mobile
|
|
||||||
|
|
||||||
@ -1,19 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
if [ ! -z $TRAVIS_BRANCH ] && [ "$TRAVIS_BRANCH" != "master" ] ; then
|
|
||||||
export UPLOADTOOL_SUFFIX=$TRAVIS_BRANCH
|
|
||||||
fi
|
|
||||||
|
|
||||||
# set up the release message to use
|
|
||||||
source ${TRAVIS_BUILD_DIR}/scripts/release-message.sh
|
|
||||||
|
|
||||||
cd ${TRAVIS_BUILD_DIR}/build
|
|
||||||
zip -r -y Subsurface-$VERSION.app.zip Subsurface.app
|
|
||||||
|
|
||||||
echo "Submitting the folloing App for continuous build release:"
|
|
||||||
ls -lh Subsurface-$VERSION.app.zip
|
|
||||||
|
|
||||||
# get and run the upload script
|
|
||||||
wget -c https://raw.githubusercontent.com/dirkhh/uploadtool/master/upload.sh
|
|
||||||
bash ./upload.sh Subsurface-$VERSION.app.zip
|
|
||||||
|
|
||||||
@ -1,33 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
set -x
|
|
||||||
|
|
||||||
# try to get rid of the insane debug crap
|
|
||||||
unalias -a
|
|
||||||
unset -f rvm_debug
|
|
||||||
unset -f cd
|
|
||||||
unset -f pushd
|
|
||||||
unset -f popd
|
|
||||||
|
|
||||||
# Travis only pulls shallow repos. But that messes with git describe.
|
|
||||||
# Sorry Travis, fetching the whole thing and the tags as well...
|
|
||||||
git fetch --unshallow
|
|
||||||
git pull --tags
|
|
||||||
git describe --match "v[0-9]*"
|
|
||||||
|
|
||||||
# prep things so we can build for Mac
|
|
||||||
# we have a custom built Qt some gives us just what we need, including QtWebKit
|
|
||||||
#
|
|
||||||
# we should just build and install this into /usr/local/ as well and have
|
|
||||||
# it all be part of the cache...
|
|
||||||
|
|
||||||
pushd ${TRAVIS_BUILD_DIR}
|
|
||||||
|
|
||||||
mkdir -p Qt/5.12.3
|
|
||||||
|
|
||||||
echo "Get custom Qt build and unpack it"
|
|
||||||
curl --output Qt-5.12.3-mac.tar.xz \
|
|
||||||
https://f002.backblazeb2.com/file/Subsurface-Travis/Qt-5.12.3-mac.tar.xz
|
|
||||||
|
|
||||||
tar -xJ -C Qt/5.12.3 -f Qt-5.12.3-mac.tar.xz
|
|
||||||
|
|
||||||
@ -1,52 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
set -x
|
|
||||||
set -e
|
|
||||||
|
|
||||||
# this gets executed by Travis when building an App for Mac
|
|
||||||
# it gets started from inside the subsurface directory
|
|
||||||
|
|
||||||
export QT_ROOT=${TRAVIS_BUILD_DIR}/Qt/5.12.3/clang_64
|
|
||||||
export PATH=$QT_ROOT/bin:$PATH # Make sure correct qmake is found on the $PATH
|
|
||||||
export CMAKE_PREFIX_PATH=$QT_ROOT/lib/cmake
|
|
||||||
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH
|
|
||||||
|
|
||||||
# the global build script expects to be called from the directory ABOVE subsurface
|
|
||||||
cd ${TRAVIS_BUILD_DIR}/..
|
|
||||||
DIR=$(pwd)
|
|
||||||
|
|
||||||
# first build Subsurface-mobile to ensure this didn't get broken
|
|
||||||
bash -e -x ./subsurface/scripts/build.sh -mobile
|
|
||||||
|
|
||||||
# now Subsurface with WebKit
|
|
||||||
bash -e -x ./subsurface/scripts/build.sh -desktop -build-with-webkit -release
|
|
||||||
|
|
||||||
cd ${TRAVIS_BUILD_DIR}/build
|
|
||||||
|
|
||||||
# build export-html to make sure that didn't get broken
|
|
||||||
make export-html
|
|
||||||
|
|
||||||
# first build and install Subsurface and then clean up the staging area
|
|
||||||
LIBRARY_PATH=${DIR}/install-root/lib make -j2 install
|
|
||||||
|
|
||||||
# now adjust a few references that macdeployqt appears to miss
|
|
||||||
# there used to be more - having the for-loop for just one seems overkill, but I
|
|
||||||
# wouldn't be surprised if there will be more again in the future, so leave it for now
|
|
||||||
EXECUTABLE=Subsurface.app/Contents/MacOS/Subsurface
|
|
||||||
for i in libgit2 ; do
|
|
||||||
OLD=$(otool -L ${EXECUTABLE} | grep $i | cut -d\ -f1 | tr -d "\t")
|
|
||||||
if [[ ! -z ${OLD} && ! -f Subsurface.app/Contents/Frameworks/$(basename ${OLD}) ]] ; then
|
|
||||||
# copy the library into the bundle and make sure its id and the reference to it are correct
|
|
||||||
cp ${DIR}/install-root/lib/$(basename ${OLD}) Subsurface.app/Contents/Frameworks
|
|
||||||
SONAME=$(basename $OLD)
|
|
||||||
install_name_tool -change ${OLD} @executable_path/../Frameworks/${SONAME} ${EXECUTABLE}
|
|
||||||
install_name_tool -id @executable_path/../Frameworks/${SONAME} Subsurface.app/Contents/Frameworks/${SONAME}
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
# next, replace @rpath references with @executable_path references in Subsurface
|
|
||||||
RPATH=$(otool -L ${EXECUTABLE} | grep rpath | cut -d\ -f1 | tr -d "\t" | cut -b 8- )
|
|
||||||
for i in ${RPATH}; do
|
|
||||||
install_name_tool -change @rpath/$i @executable_path/../Frameworks/$i ${EXECUTABLE}
|
|
||||||
done
|
|
||||||
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
echo "Build with Qt 5.5 succeeded"
|
|
||||||
@ -1,23 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Travis only pulls shallow repos. But that messes with git describe.
|
|
||||||
# Sorry Travis, fetching the whole thing and the tags as well...
|
|
||||||
git fetch --unshallow
|
|
||||||
git pull --tags
|
|
||||||
git describe --match "v[0-9]*"
|
|
||||||
|
|
||||||
# Ugly, but keeps it running during the build
|
|
||||||
docker run -v $PWD:/workspace/subsurface --name=builder -w /workspace -d ubuntu:16.04 /bin/sleep 60m
|
|
||||||
|
|
||||||
# Subsurface build dependencies
|
|
||||||
docker exec -t builder apt-get update
|
|
||||||
docker exec -t builder apt-get install -y wget unzip bzip2 \
|
|
||||||
git g++ make autoconf automake libtool cmake pkg-config \
|
|
||||||
libxml2-dev libxslt1-dev libzip-dev libsqlite3-dev \
|
|
||||||
libusb-1.0-0-dev libssl-dev \
|
|
||||||
qt5-default qt5-qmake qtchooser qttools5-dev-tools libqt5svg5-dev \
|
|
||||||
libqt5webkit5-dev libqt5qml5 libqt5quick5 qtdeclarative5-dev \
|
|
||||||
qtscript5-dev libssh2-1-dev libcurl4-openssl-dev qttools5-dev \
|
|
||||||
qtconnectivity5-dev qtlocation5-dev qtpositioning5-dev \
|
|
||||||
libcrypto++-dev libssl-dev qml-module-qtpositioning qml-module-qtlocation \
|
|
||||||
qml-module-qtquick2
|
|
||||||
@ -1,9 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
set -x
|
|
||||||
set -e
|
|
||||||
|
|
||||||
docker exec -t builder subsurface/scripts/build.sh -desktop 2>&1 | tee build.log
|
|
||||||
# fail the build if we didn't create the target binary
|
|
||||||
grep /workspace/install-root/bin/subsurface build.log
|
|
||||||
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
echo "Build with Qt 5.6 succeeded"
|
|
||||||
@ -1,21 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Travis only pulls shallow repos. But that messes with git describe.
|
|
||||||
# Sorry Travis, fetching the whole thing and the tags as well...
|
|
||||||
git fetch --unshallow
|
|
||||||
git pull --tags
|
|
||||||
git describe --match "v[0-9]*"
|
|
||||||
|
|
||||||
# Ugly, but keeps it running during the build
|
|
||||||
docker run -v $PWD:/workspace/subsurface --name=builder -w /workspace -d opensuse:42.3 /bin/sleep 60m
|
|
||||||
|
|
||||||
# Subsurface build dependencies
|
|
||||||
docker exec -t builder zypper refresh
|
|
||||||
docker exec -t builder zypper --non-interactive install \
|
|
||||||
git gcc-c++ make autoconf automake libtool cmake libzip-devel \
|
|
||||||
libssh2-devel libxml2-devel libxslt-devel sqlite3-devel libusb-1_0-devel \
|
|
||||||
libqt5-linguist-devel libqt5-qttools-devel libQt5WebKitWidgets-devel \
|
|
||||||
libqt5-qtbase-devel libQt5WebKit5-devel libqt5-qtsvg-devel \
|
|
||||||
libqt5-qtscript-devel libqt5-qtdeclarative-devel \
|
|
||||||
libqt5-qtconnectivity-devel libqt5-qtlocation-devel libcurl-devel which \
|
|
||||||
openssl-devel curl
|
|
||||||
@ -1,9 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
set -x
|
|
||||||
set -e
|
|
||||||
|
|
||||||
docker exec -t builder subsurface/scripts/build.sh -desktop 2>&1 | tee build.log
|
|
||||||
# fail the build if we didn't create the target binary
|
|
||||||
grep /workspace/install-root/bin/subsurface build.log
|
|
||||||
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
echo "Build with Qt 5.7 succeeded"
|
|
||||||
@ -1,22 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Travis only pulls shallow repos. But that messes with git describe.
|
|
||||||
# Sorry Travis, fetching the whole thing and the tags as well...
|
|
||||||
git fetch --unshallow
|
|
||||||
git pull --tags
|
|
||||||
git describe --match "v[0-9]*"
|
|
||||||
|
|
||||||
# Ugly, but keeps it running during the build
|
|
||||||
docker run -v $PWD:/workspace/subsurface --name=builder -w /workspace -d fedora:26 /bin/sleep 60m
|
|
||||||
|
|
||||||
# Subsurface build dependencies
|
|
||||||
docker exec -t builder zypper refresh
|
|
||||||
docker exec -t builder dnf install -y \
|
|
||||||
git gcc-c++ make autoconf automake libtool cmake bzip2-devel \
|
|
||||||
libzip-devel libxml2-devel libxslt-devel libsqlite3x-devel \
|
|
||||||
libudev-devel libusbx-devel libcurl-devel libssh2-devel\
|
|
||||||
qt5-qtbase-devel qt5-qtdeclarative-devel qt5-qtscript-devel \
|
|
||||||
qt5-qtwebkit-devel qt5-qtsvg-devel qt5-qttools-devel \
|
|
||||||
qt5-qtconnectivity-devel qt5-qtlocation-devel \
|
|
||||||
which redhat-rpm-config patch qt5-qtquickcontrols \
|
|
||||||
qt5-qtquickcontrols2-devel
|
|
||||||
@ -1,10 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
set -x
|
|
||||||
set -e
|
|
||||||
|
|
||||||
docker exec -t builder subsurface/scripts/build.sh -both 2>&1 | tee build.log
|
|
||||||
# fail the build if we didn't create the target binary
|
|
||||||
grep /workspace/install-root/bin/subsurface build.log
|
|
||||||
grep /workspace/install-root/bin/subsurface-mobile build.log
|
|
||||||
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
echo "Build with Qt 5.9 succeeded"
|
|
||||||
@ -1,20 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Travis only pulls shallow repos. But that messes with git describe.
|
|
||||||
# Sorry Travis, fetching the whole thing and the tags as well...
|
|
||||||
git fetch --unshallow
|
|
||||||
git pull --tags
|
|
||||||
git describe --match "v[0-9]*"
|
|
||||||
|
|
||||||
# Ugly, but keeps it running during the build
|
|
||||||
docker run -v $PWD:/workspace/subsurface --name=builder -w /workspace -d fedora:27 /bin/sleep 60m
|
|
||||||
|
|
||||||
# Subsurface build dependencies
|
|
||||||
docker exec -t builder zypper refresh
|
|
||||||
docker exec -t builder dnf install -y \
|
|
||||||
git gcc-c++ make autoconf automake libtool cmake bzip2-devel \
|
|
||||||
libzip-devel libxml2-devel libxslt-devel libsqlite3x-devel \
|
|
||||||
libudev-devel libusbx-devel libcurl-devel libssh2-devel\
|
|
||||||
qt5-qtbase-devel qt5-qtdeclarative-devel qt5-qtscript-devel \
|
|
||||||
qt5-qtwebkit-devel qt5-qtsvg-devel qt5-qttools-devel \
|
|
||||||
qt5-qtconnectivity-devel qt5-qtlocation-devel
|
|
||||||
@ -1,9 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
set -x
|
|
||||||
set -e
|
|
||||||
|
|
||||||
docker exec -t builder subsurface/scripts/build.sh -desktop 2>&1 | tee build.log
|
|
||||||
# fail the build if we didn't create the target binary
|
|
||||||
grep /workspace/install-root/bin/subsurface build.log
|
|
||||||
|
|
||||||
@ -1,11 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# create a more useful release message body
|
|
||||||
|
|
||||||
export VERSION=$(cd ${TRAVIS_BUILD_DIR}; ./scripts/get-version linux)
|
|
||||||
T_BUILD_REF="Travis CI build log: https://travis-ci.org/Subsurface-divelog/subsurface/builds/$TRAVIS_BUILD_ID/\n\n"
|
|
||||||
WIN_BINS="subsurface.exe and subsurface.exe.debug are just the Subsurface executable for this build, the full Windows installer is subsurface-$VERSION.exe.\n\n"
|
|
||||||
MAC_ZIP="Subsurface-$VERSION.app.zip is a zip archive containing an unsigned app folder; you will have to override Mac security settings in order to be able to run this app.\n\n"
|
|
||||||
ANDROID_APK="The Android APK is not signed with the release key, most Android phones will force you to uninstall Subsurface-mobile before you can install this APK if you already have an official binary installed on your Android device.\n\n"
|
|
||||||
MISSING_BINARIES="While the continuous builds are running not all binaries may be posted here - please reload the page in a few minutes if the binary you are looking for is missing.\n"
|
|
||||||
export UPLOADTOOL_BODY=$T_BUILD_REF$WIN_BINS$MAC_ZIP$ANDROID_APK$MISSING_BINARIES
|
|
||||||
@ -1,28 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
if [ ! -z $TRAVIS_BRANCH ] && [ "$TRAVIS_BRANCH" != "master" ] ; then
|
|
||||||
export UPLOADTOOL_SUFFIX=$TRAVIS_BRANCH
|
|
||||||
fi
|
|
||||||
|
|
||||||
cd ${TRAVIS_BUILD_DIR}/../win32/subsurface
|
|
||||||
|
|
||||||
echo "Submitting the following Windows files for continuous build release:"
|
|
||||||
find . -name subsurface\*.exe*
|
|
||||||
|
|
||||||
# set up the release message to use
|
|
||||||
source ${TRAVIS_BUILD_DIR}/scripts/release-message.sh
|
|
||||||
|
|
||||||
# for debugging, let's look around a bit
|
|
||||||
ls -la
|
|
||||||
|
|
||||||
# the win32 dir is owned by root, as is all its content (because that's
|
|
||||||
# the user inside the docker container, I guess. So let's create upload.sh
|
|
||||||
# in the TRAVIS_BUILD_DIR
|
|
||||||
cd ${TRAVIS_BUILD_DIR}
|
|
||||||
|
|
||||||
# get and run the upload script
|
|
||||||
wget -c https://raw.githubusercontent.com/dirkhh/uploadtool/master/upload.sh
|
|
||||||
bash ./upload.sh ${TRAVIS_BUILD_DIR}/../win32/subsurface/subsurface*.exe*
|
|
||||||
|
|
||||||
# upload smtk2ssrf
|
|
||||||
bash ./upload.sh ${TRAVIS_BUILD_DIR}/../win32/smtk-import/smtk2ssrf*.exe*
|
|
||||||
@ -1,50 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
set -x
|
|
||||||
set -e
|
|
||||||
|
|
||||||
# when running this locally, set TRAVIS_BUILD_DIR to the Subsurface
|
|
||||||
# directory inside your Windows build tree
|
|
||||||
TRAVIS_BUILD_DIR=${TRAVIS_BUILD_DIR:-$PWD}
|
|
||||||
|
|
||||||
git fetch --unshallow || true # if running locally, unshallow could fail
|
|
||||||
git pull --tags
|
|
||||||
git submodule init
|
|
||||||
git describe --match "v[0-9]*"
|
|
||||||
|
|
||||||
# make sure we have libdivecomputer
|
|
||||||
echo "Get libdivecomputer"
|
|
||||||
cd ${TRAVIS_BUILD_DIR}
|
|
||||||
git submodule update --recursive
|
|
||||||
cd libdivecomputer
|
|
||||||
autoreconf --install
|
|
||||||
autoreconf --install
|
|
||||||
|
|
||||||
# the intended layout as seen inside the container is
|
|
||||||
# /win/subsurface # sources that we are testing
|
|
||||||
# /win32 # binaries that are build
|
|
||||||
# /libzip
|
|
||||||
# /hidapi
|
|
||||||
# /googlemaps
|
|
||||||
#
|
|
||||||
# the first two are mounted as volumes (this way we get access to the
|
|
||||||
# build results outside of the container
|
|
||||||
cd ${TRAVIS_BUILD_DIR}/..
|
|
||||||
mkdir -p win32
|
|
||||||
|
|
||||||
# start the container and keep it running
|
|
||||||
docker run -v $PWD/win32:/win/win32 -v $PWD/subsurface:/win/subsurface --name=builder -w /win -d dirkhh/mxe-build-container:0.9 /bin/sleep 60m
|
|
||||||
|
|
||||||
# for some reason this package was installed but still isn't there?
|
|
||||||
# hmmmm. The container doesn't seem to have libtool installed
|
|
||||||
docker exec -t builder apt-get update
|
|
||||||
docker exec -t builder apt-get install -y ca-certificates libtool
|
|
||||||
|
|
||||||
# now set up our other dependencies
|
|
||||||
# these are either not available in MXE, or a version that's too old
|
|
||||||
docker exec -t builder bash subsurface/scripts/get-dep-lib.sh single . libzip
|
|
||||||
docker exec -t builder bash subsurface/scripts/get-dep-lib.sh single . hidapi
|
|
||||||
docker exec -t builder bash subsurface/scripts/get-dep-lib.sh single . googlemaps
|
|
||||||
|
|
||||||
# smtk2ssrf build
|
|
||||||
docker exec -t builder bash subsurface/scripts/get-dep-lib.sh single . mdbtools
|
|
||||||
@ -1,21 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
# this gets executed inside the container when building a Windows
|
|
||||||
# installer on Travis
|
|
||||||
#
|
|
||||||
# working directory is assumed to be the directory including all the
|
|
||||||
# source directories (subsurface, googlemaps, etc)
|
|
||||||
# in order to be compatible with the assumed layout in the MXE script, we
|
|
||||||
# need to create the secondary build directory
|
|
||||||
|
|
||||||
set -x
|
|
||||||
set -e
|
|
||||||
|
|
||||||
mkdir -p win64
|
|
||||||
cd win64
|
|
||||||
|
|
||||||
# right now the container still has an older version of MXE installed
|
|
||||||
export MXEBUILDTYPE=x86_64-w64-mingw32.shared
|
|
||||||
|
|
||||||
bash -ex ../subsurface/packaging/windows/mxe-based-build.sh installer
|
|
||||||
|
|
||||||
bash -ex ../subsurface/packaging/windows/smtk2ssrf-mxe-build.sh -a -i
|
|
||||||
@ -1,13 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# this is run to actually trigger the creation of the Windows installer
|
|
||||||
# inside the container
|
|
||||||
|
|
||||||
set -x
|
|
||||||
set -e
|
|
||||||
|
|
||||||
docker exec -t builder bash subsurface/scripts/windows-container/in-container-build.sh 2>&1 | tee build.log
|
|
||||||
|
|
||||||
# fail the build if we didn't create the target binary
|
|
||||||
grep "Built target installer" build.log
|
|
||||||
|
|
||||||
@ -1,21 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
if [ -n $TRAVIS_BRANCH ] && [ "$TRAVIS_BRANCH" != "master" ] ; then
|
|
||||||
export UPLOADTOOL_SUFFIX=$TRAVIS_BRANCH
|
|
||||||
fi
|
|
||||||
|
|
||||||
cd ${TRAVIS_BUILD_DIR}/../win32/subsurface
|
|
||||||
|
|
||||||
echo "Submitting the following Windows files for continuous build release:"
|
|
||||||
find . -name subsurface\*.exe*
|
|
||||||
|
|
||||||
# set up the release message to use
|
|
||||||
source ${TRAVIS_BUILD_DIR}/scripts/release-message.sh
|
|
||||||
|
|
||||||
# get the upload script
|
|
||||||
wget -c https://raw.githubusercontent.com/dirkhh/uploadtool/master/upload.sh
|
|
||||||
|
|
||||||
# don't upload the Subsurface build (we get that from the container based
|
|
||||||
# Windows build, just upload smtk2ssrf
|
|
||||||
cd ${TRAVIS_BUILD_DIR}/../win32/smtk-import
|
|
||||||
bash ../subsurface/upload.sh smtk2ssrf*.exe*
|
|
||||||
@ -1,72 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
set -x
|
|
||||||
|
|
||||||
# Travis only pulls shallow repos. But that messes with git describe.
|
|
||||||
# Sorry Travis, fetching the whole thing and the tags as well...
|
|
||||||
git fetch --unshallow
|
|
||||||
git pull --tags
|
|
||||||
git describe --match "v[0-9]*"
|
|
||||||
|
|
||||||
# grab our own custom MXE environment
|
|
||||||
pushd ${TRAVIS_BUILD_DIR}/..
|
|
||||||
echo "Downloading prebuilt MXE environment from Subsurface-divelog.org"
|
|
||||||
wget -q http://subsurface-divelog.org/downloads/mxe-994ad473.tar.xz
|
|
||||||
mkdir -p mxe
|
|
||||||
tar xJ -C mxe -f mxe-994ad473.tar.xz
|
|
||||||
|
|
||||||
# hack around path dependency - needs to be fixed
|
|
||||||
sudo mkdir -p /data/winqt551/
|
|
||||||
sudo ln -s ${TRAVIS_BUILD_DIR}/../mxe /data/winqt551/mxe-current
|
|
||||||
ls -l /data/winqt551/mxe-current/usr
|
|
||||||
sudo ln -s ${TRAVIS_BUILD_DIR}/../mxe /usr/src/mxe
|
|
||||||
popd
|
|
||||||
|
|
||||||
# now set up our other dependencies
|
|
||||||
|
|
||||||
CURRENT_LIBZIP="1.2.0"
|
|
||||||
CURRENT_HIDAPI="hidapi-0.7.0"
|
|
||||||
CURRENT_LIBUSB="v1.0.21"
|
|
||||||
CURRENT_LIBGIT2="v0.26.0"
|
|
||||||
|
|
||||||
# make sure we have libdivecomputer
|
|
||||||
echo "Get libdivecomputer"
|
|
||||||
cd ${TRAVIS_BUILD_DIR}
|
|
||||||
git submodule update --recursive
|
|
||||||
cd libdivecomputer
|
|
||||||
autoreconf --install
|
|
||||||
autoreconf --install
|
|
||||||
|
|
||||||
echo "Get libusb"
|
|
||||||
cd ${TRAVIS_BUILD_DIR}/..
|
|
||||||
git clone https://github.com/libusb/libusb
|
|
||||||
cd libusb
|
|
||||||
if ! git checkout $CURRENT_LIBUSB ; then
|
|
||||||
echo "Can't find the right tag in libusb - giving up"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Get libgit2"
|
|
||||||
cd ${TRAVIS_BUILD_DIR}/..
|
|
||||||
git clone https://github.com/libgit2/libgit2.git
|
|
||||||
cd libgit2
|
|
||||||
if ! git checkout $CURRENT_LIBGIT2 ; then
|
|
||||||
echo "Can't find the right tag in libgit2 - giving up"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Get googlemaps"
|
|
||||||
cd ${TRAVIS_BUILD_DIR}/..
|
|
||||||
git clone https://github.com/Subsurface/googlemaps.git
|
|
||||||
|
|
||||||
echo "Get mdbtools"
|
|
||||||
cd ${TRAVIS_BUILD_DIR}/..
|
|
||||||
git clone https://github.com/mdbtools/mdbtools.git
|
|
||||||
|
|
||||||
# get prebuilt mxe libraries for mdbtools and glib.
|
|
||||||
# do not overwrite upstream prebuilt mxe binaries if there is any coincidence.
|
|
||||||
wget https://www.dropbox.com/s/842skyusb96ii1u/mxe-static-minimal-994ad473.tar.xz
|
|
||||||
[[ ! -f mxe-static-minimal-994ad473.tar.xz ]] && exit 1
|
|
||||||
cd mxe
|
|
||||||
tar -xJf ../mxe-static-minimal-994ad473.tar.xz --skip-old-files
|
|
||||||
ls -al usr/
|
|
||||||
@ -1,21 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
set -x
|
|
||||||
set -e
|
|
||||||
|
|
||||||
# this gets executed by Travis when building an installer for Windows
|
|
||||||
# it gets started from inside the subsurface directory
|
|
||||||
# with all the other projects downloaded and installed in parallel to
|
|
||||||
# subsurface; in order to be compatible with the assumed layout, we
|
|
||||||
# need to create the secondary build directory
|
|
||||||
cd ${TRAVIS_BUILD_DIR}/..
|
|
||||||
mkdir win32
|
|
||||||
ls -l
|
|
||||||
cd win32
|
|
||||||
|
|
||||||
# make sure we use the pre-installed version of MXE
|
|
||||||
export MXEBUILDTYPE=i686-w64-mingw32.shared
|
|
||||||
|
|
||||||
# the MXE build used in this VM doesn't support FTDI
|
|
||||||
bash -ex ${TRAVIS_BUILD_DIR}/packaging/windows/mxe-based-build.sh -noftdi installer
|
|
||||||
bash -ex ${TRAVIS_BUILD_DIR}/packaging/windows/smtk2ssrf-mxe-build.sh -i
|
|
||||||
@ -1,49 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
#
|
|
||||||
# arguments:
|
|
||||||
# $1 - target H file
|
|
||||||
# $2 - fallback version string
|
|
||||||
# $3 - os name {linux|darwin|win}
|
|
||||||
#
|
|
||||||
# doesn't have much error checking!
|
|
||||||
# should be started from where .git is!
|
|
||||||
#
|
|
||||||
|
|
||||||
if [ "$#" -lt 3 ]; then
|
|
||||||
echo "ERROR: missing arguments";
|
|
||||||
exit 1;
|
|
||||||
fi
|
|
||||||
|
|
||||||
# set OS and TARGET
|
|
||||||
TARGET=$1
|
|
||||||
TARGET_TEMP=$TARGET.tmp
|
|
||||||
VERSION=$2
|
|
||||||
OS=$3
|
|
||||||
|
|
||||||
# get the full version: git based or hardcoded from .gitversion or the fallback version string
|
|
||||||
if gitpwd=`git rev-parse --show-toplevel 2> /dev/null`; then
|
|
||||||
FULL_VER=`sh "$gitpwd/scripts/get-version" linux`
|
|
||||||
else
|
|
||||||
FULL_VER=`cat .gitversion 2> /dev/null || echo $VERSION`
|
|
||||||
fi
|
|
||||||
|
|
||||||
# grab some strings from get-version
|
|
||||||
CANONICAL_VER=`sh ./scripts/get-version full $FULL_VER`
|
|
||||||
OS_USABLE_VER=`sh ./scripts/get-version $OS $FULL_VER`
|
|
||||||
|
|
||||||
# write to a temp file
|
|
||||||
echo "#define VERSION_STRING \"$OS_USABLE_VER\"" > $TARGET_TEMP
|
|
||||||
echo "#define GIT_VERSION_STRING \"$FULL_VER\"" >> $TARGET_TEMP
|
|
||||||
echo "#define CANONICAL_VERSION_STRING \"$CANONICAL_VER\"" >> $TARGET_TEMP
|
|
||||||
|
|
||||||
# if the target file is missing create it
|
|
||||||
if [ ! -f $TARGET ]; then
|
|
||||||
CMD=`touch $TARGET`
|
|
||||||
fi
|
|
||||||
|
|
||||||
# if the temp file and the target file differ, replace the target file with the temp file
|
|
||||||
CMD=`diff -q $TARGET $TARGET_TEMP || cp $TARGET_TEMP $TARGET`
|
|
||||||
|
|
||||||
# remove the temp file
|
|
||||||
CMD=`rm -f $TARGET_TEMP`
|
|
||||||
@ -1,24 +1,24 @@
|
|||||||
message(STATUS "processing version.cmake")
|
message(STATUS "processing version.cmake")
|
||||||
execute_process(
|
execute_process(
|
||||||
COMMAND sh ${CMAKE_TOP_SRC_DIR}/../scripts/get-version linux
|
COMMAND bash ${CMAKE_TOP_SRC_DIR}/../scripts/get-version
|
||||||
WORKING_DIRECTORY ${CMAKE_TOP_SRC_DIR}
|
|
||||||
OUTPUT_VARIABLE GIT_VERSION_STRING
|
|
||||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
|
||||||
)
|
|
||||||
execute_process(
|
|
||||||
COMMAND sh ${CMAKE_TOP_SRC_DIR}/../scripts/get-version full
|
|
||||||
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
|
||||||
)
|
)
|
||||||
set(MOBILE_VERSION_STRING "1.2.1")
|
|
||||||
|
execute_process(
|
||||||
|
COMMAND bash ${CMAKE_TOP_SRC_DIR}/../scripts/get-version 4
|
||||||
|
WORKING_DIRECTORY ${CMAKE_TOP_SRC_DIR}
|
||||||
|
OUTPUT_VARIABLE CANONICAL_VERSION_STRING_4
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
|
)
|
||||||
|
|
||||||
configure_file(${SRC} ${DST} @ONLY)
|
configure_file(${SRC} ${DST} @ONLY)
|
||||||
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
||||||
execute_process(
|
execute_process(
|
||||||
COMMAND cat ${CMAKE_TOP_SRC_DIR}/../packaging/windows/smtk-import.nsi.in
|
COMMAND cat ${CMAKE_TOP_SRC_DIR}/../packaging/windows/smtk-import.nsi.in
|
||||||
COMMAND sed -e "s/VERSIONTOKEN/${GIT_VERSION_STRING}/"
|
COMMAND sed -e "s/VERSIONTOKEN/${CANONICAL_VERSION_STRING}/"
|
||||||
COMMAND sed -e "s/PRODVTOKEN/${CANONICAL_VERSION_STRING}/"
|
COMMAND sed -e "s/PRODVTOKEN/${CANONICAL_VERSION_STRING_4}/"
|
||||||
OUTPUT_FILE ${CMAKE_BINARY_DIR}/staging/smtk-import.nsi
|
OUTPUT_FILE ${CMAKE_BINARY_DIR}/staging/smtk-import.nsi
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user