-
Notifications
You must be signed in to change notification settings - Fork 55
/
.travis.yml.old
116 lines (97 loc) · 5.78 KB
/
.travis.yml.old
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
language: cpp
git:
depth: false
matrix:
include:
- os: osx
osx_image: xcode12u
compiler: clang
addons:
homebrew:
packages:
- qt5
if: tag IS blank
- os: linux
dist: focal
compiler: gcc
if: tag IS blank
services:
- xvfb
install:
# C++2a
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo add-apt-repository -y ppa:beineri/opt-qt-5.15.0-focal; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get -qy update; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install -qq g++-10 gcc-10; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 90; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 90; fi
# Qt5
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install qt5; brew upgrade qt5; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew link --force qt5; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export export QTPATH=/usr/local; QMAKE=$QTPATH/bin/qmake; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install -qq qt515base qt515imageformats qt515networkauth-no-lgpl qt515tools qt515x11extras; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install -qq libx11-xcb-dev libglu1-mesa-dev; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export QMAKE=/opt/qt515/bin/qmake; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export PATH=/opt/qt515/bin/:$PATH; fi
before_script:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then gcc --version; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then g++ --version; fi
# linuxdeployqt
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then wget -c -nv "https://github.com/probonopd/linuxdeployqt/releases/download/7/linuxdeployqt-7-x86_64.AppImage"; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then chmod a+x linuxdeployqt-7-x86_64.AppImage; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then unset QTDIR; unset QT_PLUGIN_PATH ; unset LD_LIBRARY_PATH; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then clang --version; fi
- "sh -e ./update_repository.sh"
- $QMAKE -v
script:
# Building the main binaries
# Linux
- $QMAKE -r CONFIG+=release
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then make -j; fi
# Linux: building AppImage
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then cp ./qt-app/resources/icon.png ./bin/release/x64/; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then cp ./installer/linux/file_commander.desktop ./bin/release/x64/; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ./linuxdeployqt-7-x86_64.AppImage ./bin/release/x64/FileCommander -appimage -unsupported-allow-new-glibc -bundle-non-qt-libs -qmake=$QMAKE -executable=./bin/release/x64/libplugin_filecomparison.so.1.0.0 -executable=./bin/release/x64/libplugin_imageviewer.so.1.0.0 -executable=./bin/release/x64/libplugin_textviewer.so.1.0.0; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ls; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then mv ./File_Commander*.AppImage ./FileCommander.AppImage; fi
# macOS
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then sh ./installer/mac/create_dmg.sh $QTPATH; fi
# Test launch
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ./bin/release/x64/FileCommander --test-launch; else ./bin/release/x64/FileCommander.app/Contents/MacOS/FileCommander --test-launch; fi
# Test AppImage launch
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ./FileCommander.AppImage --test-launch; fi
# Building tests
- cd file-commander-core/core-tests
- $QMAKE -r CONFIG+=release
- make -j
- cd ../../
# Running tests
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ./linuxdeployqt-7-x86_64.AppImage ./bin/release/x64/fso_test -unsupported-allow-new-glibc -bundle-non-qt-libs; fi
- set -e; if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ./bin/release/x64/fso_test; else ./bin/release/x64/fso_test.app/Contents/MacOS/fso_test; fi
- set -e; if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ./linuxdeployqt-7-x86_64.AppImage ./bin/release/x64/fso_test_high_level -unsupported-allow-new-glibc -bundle-non-qt-libs; fi
- set -e; if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ./bin/release/x64/fso_test_high_level; else ./bin/release/x64/fso_test_high_level.app/Contents/MacOS/fso_test_high_level; fi
- set -e; if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ./linuxdeployqt-7-x86_64.AppImage ./bin/release/x64/operationperformer_test -unsupported-allow-new-glibc -bundle-non-qt-libs; fi
- set -e; for i in `seq 1 20`; do if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ./bin/release/x64/operationperformer_test --std-seed $(date +%s); else ./bin/release/x64/operationperformer_test.app/Contents/MacOS/operationperformer_test --std-seed $(date +%s); fi; sleep 1; done
- set -e; if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ./linuxdeployqt-7-x86_64.AppImage ./bin/release/x64/filecomparator_test -unsupported-allow-new-glibc -bundle-non-qt-libs; fi
- set -e; if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ./bin/release/x64/filecomparator_test --std-seed $(date +%s); else ./bin/release/x64/filecomparator_test.app/Contents/MacOS/filecomparator_test --std-seed $(date +%s); fi;
deploy:
- provider: releases
edge: true
overwrite: true
token: $GITHUB_TOKEN
file: FileCommander.dmg
prerelease: true
on:
tags: true
all_branches: true
condition: $TRAVIS_OS_NAME = osx
- provider: releases
edge: true
overwrite: true
token: $GITHUB_TOKEN
file: FileCommander.AppImage
prerelease: true
on:
tags: true
all_branches: true
condition: $TRAVIS_OS_NAME = linux