Add Linux builds to AppVeyor

Using Qt5.15.2, their 6.x installations are incomplete.
This commit is contained in:
Alejandro Martinez
2025-04-29 20:38:56 -03:00
parent 7e3d0a4350
commit 1694a2b660
4 changed files with 231 additions and 21 deletions

View File

@@ -4,8 +4,10 @@ skip_tags: true
image:
- Visual Studio 2019
- macos-monterey
- Ubuntu2204
environment:
APPVEYOR_SAVE_CACHE_ON_ERROR: true
GC_GOOGLE_CALENDAR_CLIENT_SECRET:
secure: hwjHTrSAMEbKd9PA+5x/zI4x5Uk4KQm1hdfZzkwiu8k=
GC_GOOGLE_DRIVE_CLIENT_ID:
@@ -57,13 +59,23 @@ init:
# Setup NSIS
- cmd: set PATH=%PATH%;C:\"Program Files (x86)"\NSIS
# macOS
# Setup QT 6.5
- sh: export QTDIR=$HOME/Qt/6.5/macos
- sh: export PATH=$HOME/Qt/6.5/macos/bin:$PATH
- sh: qmake --version
# Setup Xcode 14.2
- sh: sudo xcode-select -s /Applications/Xcode-14.2.0.app
# Linux / macOS
- sh: >-
if $CI_LINUX; then
export OS_NAME=linux
# Setup QT 5.15
export QTDIR=$HOME/Qt/5.15/gcc_64
export PATH=$HOME/Qt/5.15/gcc_64/bin:$PATH
qmake --version
else
export OS_NAME=macos
# Setup QT 6.5
export QTDIR=$HOME/Qt/6.5/macos
export PATH=$HOME/Qt/6.5/macos/bin:$PATH
qmake --version
# Setup Xcode 14.2
sudo xcode-select -s /Applications/Xcode-14.2.0.app
fi
cache:
- gc-ci-libs.zip -> appveyor.yml
@@ -137,8 +149,8 @@ install:
- cmd: echo GSL_INCLUDES=c:\tools\vcpkg\installed\x64-windows\include >> src\gcconfig.pri
- cmd: echo GSL_LIBS=-Lc:\tools\vcpkg\installed\x64-windows\lib -lgsl -lgslcblas >> src\gcconfig.pri
# macOS
- sh: appveyor/macos/install.sh
# Linux / macOS
- sh: bash appveyor/$OS_NAME/install.sh
before_build:
@@ -159,10 +171,12 @@ before_build:
# Avoid macro redefinition warnings
- cmd: echo DEFINES+=_MATH_DEFINES_DEFINED >> src\gcconfig.pri
# macOS
- sh: appveyor/macos/before_build.sh
# Linux / macOS
- sh: bash appveyor/$OS_NAME/before_build.sh
# Define GC version string, only for tagged builds
- sh: if $APPVEYOR_REPO_TAG; then echo DEFINES+=GC_VERSION=VERSION_STRING >> src/gcconfig.pri; fi
# Patch Secrets.h (Windows and macOS)
# Patch Secrets.h (Windows / Linux / macOS)
- ps: (Get-Content src\Core\Secrets.h) -replace '__GC_GOOGLE_CALENDAR_CLIENT_SECRET__', $env:GC_GOOGLE_CALENDAR_CLIENT_SECRET | Set-Content src\Core\Secrets.h
- ps: (Get-Content src\Core\Secrets.h) -replace '__GC_GOOGLE_DRIVE_CLIENT_ID__', $env:GC_GOOGLE_DRIVE_CLIENT_ID | Set-Content src\Core\Secrets.h
- ps: (Get-Content src\Core\Secrets.h) -replace '__GC_GOOGLE_DRIVE_CLIENT_SECRET__', $env:GC_GOOGLE_DRIVE_CLIENT_SECRET | Set-Content src\Core\Secrets.h
@@ -192,7 +206,7 @@ build_script:
- cmd: if not exist qwt\lib\qwt.lib jom -j1 sub-qwt
- cmd: jom -j4 sub-src
# macOS
# Linux / macOS
- sh: qmake build.pro -r QMAKE_CXXFLAGS_WARN_ON+="-Wno-unused-private-field -Wno-c++11-narrowing -Wno-deprecated-declarations -Wno-deprecated-register -Wno-nullability-completeness -Wno-sign-compare -Wno-inconsistent-missing-override" QMAKE_CFLAGS_WARN_ON+="-Wno-deprecated-declarations -Wno-sign-compare"
- sh: if test ! -f qwt/lib/libqwt.a; then make sub-qwt; fi
- sh: make -j4 sub-src
@@ -231,8 +245,8 @@ after_build:
- ps: if ($isWindows) { Set-AppveyorBuildVariable -Name 'PUBLISH_BINARIES' -Value false }
- ps: if ($isWindows -And $env:APPVEYOR_REPO_COMMIT_MESSAGE_EXTENDED -Match "\[publish binaries\]") { Set-AppveyorBuildVariable -Name 'PUBLISH_BINARIES' -Value true }
# macOS
- sh: appveyor/macos/after_build.sh
# Linux / macOS
- sh: bash appveyor/$OS_NAME/after_build.sh
test_script:
@@ -242,16 +256,24 @@ test_script:
- ps: if ($isWindows) { CertUtil -hashfile GoldenCheetah_v3.7_x64.exe sha256 | Select-Object -First 2 | Add-Content GCversionWindows.txt }
- cmd: type GCversionWindows.txt
# macOS
- sh: src/GoldenCheetah.app/Contents/MacOS/GoldenCheetah --version 2>GCversionMacOS.txt
- sh: git log -1 >> GCversionMacOS.txt
- sh: shasum -a 256 GoldenCheetah_v3.7_x64.dmg | cut -f 1 -d ' ' >> GCversionMacOS.txt
- sh: cat GCversionMacOS.txt
# Linux / macOS
- sh: >-
if $CI_LINUX; then
./GoldenCheetah_v3.7_x64.AppImage --version 2>GCversionLinux.txt
git log -1 >> GCversionLinux.txt
shasum -a 256 GoldenCheetah_v3.7_x64.AppImage | cut -f 1 -d ' ' >> GCversionLinux.txt
cat GCversionLinux.txt
else
src/GoldenCheetah.app/Contents/MacOS/GoldenCheetah --version 2>GCversionMacOS.txt
git log -1 >> GCversionMacOS.txt
shasum -a 256 GoldenCheetah_v3.7_x64.dmg | cut -f 1 -d ' ' >> GCversionMacOS.txt
cat GCversionMacOS.txt
fi
artifacts:
# Windows
- path: GoldenCheetah_v3.7_x64.exe
name: GCinstallerWindows
name: GCwindowsInstaller
- path: GCversionWindows.txt
name: GCversionWindows
# macOS
@@ -259,6 +281,11 @@ artifacts:
name: GCmacOSpackage
- path: GCversionMacOS.txt
name: GCversionMacOS
# Linux
- path: GoldenCheetah_v3.7_x64.AppImage
name: GClinuxAppImage
- path: GCversionLinux.txt
name: GCversionLinux
deploy:
# deploy continuous builds to GitHub release