summaryrefslogtreecommitdiffstats
path: root/Jenkinsfile.old
blob: e1dbc7590b8a772b9b4893f4a4ec47fefd3f975e (plain)
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
117
def REPO = 'ssh://gerrit1.techsat.local:29418/external/Qt'

node ('build6-win10-64') {
    stage('Prepare environment') {
        result = sh returnStatus: true, script: '''
CWD=`pwd`
export WORKSPACE=`cygpath $WORKSPACE`
rm -Rf $WORKSPACE/*
'''
    	if (result != 0) {
    	    echo '[FAILURE] Failed to build'
    	    currentBuild.result = 'FAILURE'
    	    sh "exit ${result}"
    	}
     }
    	
    stage('Prepare environment') {
    	checkout([$class: 'GitSCM', 
    		branches: [[name: 'master']], 
    		doGenerateSubmoduleConfigurations: false, 
    		extensions: [], 
    		submoduleCfg: [], 
    		userRemoteConfigs: [[url: REPO]]])

        step ([$class: 'CopyArtifact',
          projectName: '202151_NG_ADS2-Tools-GCC-Suite',
          filter: 'gcc-suite-*-x86-mingw64.zip']);

        result = sh returnStatus: true, script: '''
echo $HOME
pwd
mkdir Qt-5.9.1
unzip gcc-suite-*-x86-mingw64.zip
rm -f gcc-suite-*-x86-mingw64.zip
mv gcc-* gcc
'''
    	if (result != 0) {
    	    echo '[FAILURE] Failed to build'
    	    currentBuild.result = 'FAILURE'
    	    sh "exit ${result}"
    	}
    }

    stage('unzip qt') {
        result = sh returnStatus: true, script: '''
TOP=`pwd`
cd SOURCE
/c/"Program Files"/7-Zip/7z.exe x qt-everywhere-opensource-src-*.zip -o.. -y -r
cd ..
'''
    	if (result != 0) {
    	    echo '[FAILURE] Failed to build'
    	    currentBuild.result = 'FAILURE'
    	    sh "exit ${result}"
    	}    
    }

    stage('configure qt') {
        result = sh returnStatus: true, script: '''
TOP=`pwd`
export WORKSPACE=`cygpath $WORKSPACE`
P=`cygpath $DSB_PKGS/x86-mingw64/msys/usr/bin`
export PATH=$WORKSPACE/gcc/bin:$P
hash -r gcc
hash -r g++
gcc --version
cp -f $WORKSPACE/SOURCE/win32-g++.nativ.qmake.conf $WORKSPACE/qt-everywhere-opensource-src-5.9.1/qtbase/mkspecs/win32-g++/qmake.conf
cd $WORKSPACE/qt-everywhere-opensource-src-5.9.1
./configure -prefix $WORKSPACE/Qt-5.9.1 -release -opensource -confirm-license -optimized-tools -strip -platform win32-g++ -opengl desktop -nomake tests
'''
    	if (result != 0) {
    	    echo '[FAILURE] Failed to build'
    	    currentBuild.result = 'FAILURE'
    	    sh "exit ${result}"
    	}
    }

    stage('build qt') {
        result = sh returnStatus: true, script: '''
export WORKSPACE=`cygpath $WORKSPACE`
cd $WORKSPACE
TOP=`pwd`
P=`cygpath $DSB_PKGS/x86-mingw64/msys/usr/bin`
export PATH=$WORKSPACE/gcc-7.1.0/bin:$P
hash -r gcc
hash -r g++
gcc --version
cd qt-everywhere-opensource-src-5.9.1
make -j2
'''
    	if (result != 0) {
    	    echo '[FAILURE] Failed to build'
    	    currentBuild.result = 'FAILURE'
    	    sh "exit ${result}"
    	}
    }

    stage('install qt') {
        result = sh returnStatus: true, script: '''
export WORKSPACE=`cygpath $WORKSPACE`
TOP=`pwd`
P=`cygpath $DSB_PKGS/x86-mingw64/msys/usr/bin`
export PATH=$WORKSPACE/gcc-7.1.0/bin:$P
hash -r gcc
hash -r g++
gcc --version
cd qt-everywhere-opensource-src-5.9.1
make -i install
'''
    	if (result != 0) {
    	    echo '[FAILURE] Failed to build'
    	    currentBuild.result = 'FAILURE'
    	    sh "exit ${result}"
    	}
    }
}