File: .appveyor.yml

package info (click to toggle)
wxmaxima 20.12.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 46,476 kB
  • sloc: cpp: 77,833; xml: 10,445; ansic: 3,583; lisp: 1,837; makefile: 13; sh: 7
file content (181 lines) | stat: -rw-r--r-- 6,280 bytes parent folder | download
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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
# This file is based on:
# https://github.com/Ifsttar/I-Simpa/blob/master/appveyor.yml


version: '20.09.0-DevelopmentSnapshot_{build}'

image:
 - Visual Studio 2019 # For MSVC 2019 builds only

# clone directory
clone_folder: c:\projects\wxMaxima
# Do not clone the entire git repository
clone_depth: 15

configuration:
 - debug
 
environment:
  # The wxWidgets version as referred to in the source package
  WXVERSION: 3.1.3
  # The wxWidgets version as referred to in the build folder
  # Typically it'd be the wxWidgets version with an optional suffix
  # to indicate build "epoch". The epoch changes are used to invalidate
  # a cached wxWidgets build and force a rebuild.
  WXBUILDVER: 3.1.3_3
  CMAKEGEN: "Ninja"
  matrix:
    - TOOLKIT_INIT: ".appveyor\\MSVC_2019_x64.ps1"
      WXW_LIB: vc_x64_lib
      EXTRA_CMAKE_ARGS: ""
    - TOOLKIT_INIT: ".appveyor\\MINGW_8.1.0_x64.ps1"
      WXW_LIB: gcc_x64_lib
      EXTRA_CMAKE_ARGS: "-DCMAKE_AR=C:/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/ar.exe"

matrix:
  exclude:
  - configuration: debug
    TOOLKIT_INIT: ".appveyor\\MINGW_8.1.0_x64.ps1"
    WXW_LIB: vc_x64_lib
  - configuration: debug
    TOOLKIT_INIT: ".appveyor\\MSVC_2019_x64.ps1"
    WXW_LIB: gcc_x64_lib

cache:
  - 'C:\wxwidgets-install_%WXBUILDVER%'
  - 'C:\wxwidgets-build_%WXBUILDVER%'
  # The build directory is only cached for the .pdb files. Other files are removed.
  # - C:\ProgramData\chocolatey\bin -> appveyor.yml
  # - C:\ProgramData\chocolatey\lib -> appveyor.yml
  # Do not cache the build itself - we only care about the install!

# branches to build
branches:
  except:
  - gh_pages
  - DebianPackaging
  - DebianPackaging_NightlyBuild

install:
  - ps: |
      echo '- Starting the build'
      echo "    Job:    $env:APPVEYOR_JOB_NAME"
      echo "    Branch: $env:APPVEYOR_REPO_BRANCH"
      echo ''
      echo '- Installing pandoc...'
      choco install -y --no-progress pandoc

before_build:
  - ps: |
      iex $env:TOOLKIT_INIT
      refreshenv
      $SRC_ARCHIVE="wxWidgets-${env:WXVERSION}.7z"
      $BUILD_DIR="C:\wxwidgets-build_${env:WXBUILDVER}"
      $INSTALL_DIR="C:\wxwidgets-install_${env:WXBUILDVER}"
      $INSTALL_LIB_DIR="$INSTALL_DIR\lib\${env:WXW_LIB}"
      $SOURCE_DIR="C:\wxwidgets-source_${env:WXVERSION}"
      copy C:/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/windres.exe C:/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/x86_64-w64-mingw32-windres.exe
      # If there's no installation of wxWidgets available, we have to build it
      if (!(Test-Path $INSTALL_DIR)) {
          echo '- No wxWidgets installation $INSTALL_DIR was found'
          
          echo '* Downloading wxWidgets sources'
          Start-FileDownload "https://github.com/wxWidgets/wxWidgets/releases/download/v${env:WXVERSION}/$SRC_ARCHIVE"
          
          echo '* Unpacking wxWidgets sources'
          7z x "$SRC_ARCHIVE" "-o$SOURCE_DIR" -y
          
          echo '* Building wxWidgets from sources'
          mkdir $BUILD_DIR | Out-Null
          pushd $BUILD_DIR
          # Note: wxWidgets unity builds fail at least for version 3.1.3. This is a fixable problem but would
          # require patching the CMakeLists there. So for now it's disabled, since we don'y rebuild wxWidgets
          # often.
          echo cmake -G "$env:CMAKEGEN" "$env:EXTRA_CMAKE_ARGS" --config Release  `
            -DwxBUILD_SHARED=NO  `
            -DwxUSE_STC=NO  `
            -DwxUSE_RIBBON=NO  `
            "-DCMAKE_INSTALL_PREFIX=$INSTALL_DIR" -Wno-dev `
            "$SOURCE_DIR"
          cmake -G "$env:CMAKEGEN" "$env:EXTRA_CMAKE_ARGS" --config Release  `
            -DwxBUILD_SHARED=NO  `
            -DwxUSE_STC=NO  `
            -DwxUSE_RIBBON=NO  `
            "-DCMAKE_INSTALL_PREFIX=$INSTALL_DIR" -Wno-dev `
            "$SOURCE_DIR"
          cmake --build . --config Release -v
          cmake --build . --config Release --target install
          # Remove all files other than .pdb files - we do need those so that the build is quiet
          Get-ChildItem -Recurse -File | Where {($_.Extension -ne ".pdb")} | Remove-Item
          # List the PDB files for diagnostic purposes
          Get-ChildItem -Recurse -File | Select-Object FullName
          popd
      }
      $env:INSTALL_DIR = $INSTALL_DIR
      $env:INSTALL_LIB_DIR = $INSTALL_LIB_DIR

  - ps: |
      $INSTALL_DIR = $env:INSTALL_DIR -replace '\\', '/'
      $INSTALL_LIB_DIR = $env:INSTALL_LIB_DIR -replace '\\', '/'

      echo '- Configuring wxMaxima'
      echo "    Job:    $env:APPVEYOR_JOB_NAME"
      echo "    Branch: $env:APPVEYOR_REPO_BRANCH"
      mkdir build | Out-Null
      pushd build
      # WX_ROOT_DIR is a workaround for a nasty bug in FindwxWidgets. Without it, the value
      # of wxWidgets_LIB_DIR gets cleared (!) in FindwxWidgets.cmake(495)
      # cmake issue report: https://gitlab.kitware.com/cmake/cmake/-/issues/19176
      cmake -G "$env:CMAKEGEN" --config Release  `
        -DAPPVEYOR_BUILD=1 -DCMAKE_UNITY_BUILD=YES  `
        -DWX_ROOT_DIR="$INSTALL_DIR"  `
        -DwxWidgets_ROOT_DIR="$INSTALL_DIR"  `
        -DwxWidgets_LIB_DIR="$INSTALL_LIB_DIR"  `
        -DwxWidgets_CONFIGURATION=mswu  `
        $env:TOOLKIT_CMAKE_ARGS ..
      popd

build_script:
  - ps: |
      echo '- Building wxMaxima'
      echo "    Job:    $env:APPVEYOR_JOB_NAME"
      echo "    Branch: $env:APPVEYOR_REPO_BRANCH"
      iex $env:TOOLKIT_INIT
      pushd build
      cmake --build . --config Release
      if (! $?) { throw "CMake failed with exit code $LastExitCode" }
      popd

test_script:
  - ps: |
      pushd build
      #ctest -C Release
      if (! $?) { throw "CTest failed with exit code $LastExitCode" }
      popd

after_test:
  - ps: |
      echo '* Packing the installer'
      pushd build
      cpack -G NSIS
      if (! $?) { throw "CPack failed with exit code $LastExitCode" }
      popd
#      echo '* Compressing the executable'
#      7z a wxMaxima.exe.7z build/src/*.exe


for:
  -
    matrix:
      only:
        - WXW_LIB: gcc_x64_lib
#    artifacts:
#    - path: 'wxMaxima.exe.7z'
#      name: wxMaxima.exe.7z
    deploy:
      - provider: Environment
        name: GithubReleases
        draft: false
        prerelease: false
        on:
          APPVEYOR_REPO_TAG: true