Raymond Toy pushed to branch issue-386-generate-def-unix-error at cmucl / cmucl

Commits:

1 changed file:

Changes:

  • .gitlab-ci.yml
    ... ... @@ -3,45 +3,40 @@ variables:
    3 3
       version: "2024-08-x86"
    
    4 4
       bootstrap: "-B boot-2024-08"
    
    5 5
     
    
    6
    -
    
    7
    -stages:
    
    8
    -  - install
    
    9
    -  - build
    
    10
    -  - test
    
    11
    -  - ansi-test
    
    12
    -  - benchmark
    
    13
    -  - analyze
    
    14
    -
    
    15
    -cache:
    
    16
    -
    
    17
    -
    
    18
    -linux:install:
    
    6
    +# Default install configuration to download the cmucl tarballs to use
    
    7
    +# for building.
    
    8
    +.install_template: &install_configuration
    
    19 9
       stage: install
    
    20
    -  tags:
    
    21
    -    - linux
    
    22 10
       artifacts:
    
    23 11
         paths:
    
    24 12
           - snapshot/
    
    25 13
       script:
    
    26
    -    - wget -nv $download_url/cmucl-$version-linux.tar.bz2
    
    27
    -    - wget -nv $download_url/cmucl-$version-linux.extra.tar.bz2
    
    14
    +    - echo PATH = $PATH
    
    15
    +    - ls -F /usr/local/bin
    
    16
    +    - type -all gitlab-runner
    
    17
    +    # Download binaries.  (Do we really need the extras tarball?)
    
    18
    +    - $CURL -o cmucl-$version-$osname.tar.bz2 $download_url/cmucl-$version-$osname.tar.bz2
    
    19
    +    - $CURL -o cmucl-$version-$osname.extra.tar.bz2 $download_url/cmucl-$version-$osname.extra.tar.bz2
    
    28 20
         - mkdir snapshot
    
    29
    -    - (cd snapshot; tar xjf ../cmucl-$version-linux.tar.bz2; tar xjf ../cmucl-$version-linux.extra.tar.bz2)
    
    21
    +    - (cd snapshot; tar xjf ../cmucl-$version-$osname.tar.bz2; tar xjf ../cmucl-$version-$osname.extra.tar.bz2)
    
    30 22
     
    
    31
    -linux:build:
    
    23
    +# Default build configuration to be added to each build stage for each
    
    24
    +# OS.  This assumes we don't need anything special between OSes, and
    
    25
    +# the option '-C ""' is good enough.  We also override the default
    
    26
    +# build dirs by using the -b option so that we know where the results
    
    27
    +# are, independent of OS.
    
    28
    +.build_template: &build_configuration
    
    32 29
       stage: build
    
    33
    -  tags:
    
    34
    -    - linux
    
    35 30
       artifacts:
    
    36 31
         paths:
    
    37 32
           - dist/
    
    38
    -      - linux-2/*.log
    
    39
    -      - linux-3/*.log
    
    40
    -      - linux-4/
    
    41
    -      - src/lisp/
    
    42
    -  needs:
    
    43
    -    - job: linux:install
    
    44
    -      artifacts: true
    
    33
    +      - build-2/*.log
    
    34
    +      - build-3/*.log
    
    35
    +      - build-4/
    
    36
    +      # Needed by Linux analyzer stage
    
    37
    +      - src/lisp/cmucl-version.h
    
    38
    +      # Save this so we can see the generated errno
    
    39
    +      - src/code/errno.lisp
    
    45 40
       script:
    
    46 41
         # Do cross compile first
    
    47 42
         #- bin/create-target.sh xtarget x86_linux_clang
    
    ... ... @@ -50,11 +45,79 @@ linux:build:
    50 45
         # Regular build using the cross-compiled result or snapshot.  The
    
    51 46
         # analyzer job requires gcc, so make sure we build with gcc here
    
    52 47
         # instead of clang. 
    
    53
    -    - bin/build.sh $bootstrap -R -C "x86_linux" -o snapshot/bin/lisp
    
    54
    -    # - bin/build.sh $bootstrap -R -C "x86_linux" -o snapshot/bin/lisp
    
    48
    +    - bin/build.sh $bootstrap -b build -R -C "" -o snapshot/bin/lisp
    
    55 49
         # When the result of `git describe` cannot be used as a version
    
    56 50
         # string, an alternative can be provided with the -V flag
    
    57
    -    - bin/make-dist.sh -I dist linux-4
    
    51
    +    - bin/make-dist.sh -I dist build-4
    
    52
    +
    
    53
    +# Default configuration for running the ansi-tests.
    
    54
    +.ansi_test_template: &ansi_test_configuration
    
    55
    +  stage: ansi-test
    
    56
    +  artifacts:
    
    57
    +    paths:
    
    58
    +      - ansi-test/test.out
    
    59
    +  script:
    
    60
    +    - bin/run-ansi-tests.sh -l dist/bin/lisp
    
    61
    +  
    
    62
    +# Default configuration for running unit tests.
    
    63
    +.unit_test_template: &unit_test_configuration
    
    64
    +  stage: test
    
    65
    +  artifacts:
    
    66
    +    paths:
    
    67
    +      - ansi-test/test.out
    
    68
    +      - test.log
    
    69
    +  script:
    
    70
    +    - echo LANG = $LANG
    
    71
    +    - bin/run-unit-tests.sh -l dist/bin/lisp 2>&1 | tee test.log
    
    72
    +
    
    73
    +# Default configuration to test creation of lisp executable and
    
    74
    +# testing the exectuable works.
    
    75
    +.exec_test_template: &exec_test_configuration
    
    76
    +  stage: test
    
    77
    +  script:
    
    78
    +    # Create an executable and test it by printing the version.
    
    79
    +    - dist/bin/lisp -eval '(save-lisp "saved-lisp-executable" :executable t)'
    
    80
    +    - ./saved-lisp-executable --version
    
    81
    +
    
    82
    +# Default configuration for running the benchmarks.
    
    83
    +.benchmark_template: &benchmark_configuration
    
    84
    +  stage: benchmark
    
    85
    +  artifacts:
    
    86
    +    paths:
    
    87
    +      - benchmarks/cl-bench/results
    
    88
    +  script:
    
    89
    +    - cd benchmarks/cl-bench
    
    90
    +    - mkdir tmp
    
    91
    +    - CMUCL=../../snapshot/bin/lisp ./run-cmucl.sh
    
    92
    +    - CMUCL=../../dist/bin/lisp ./run-cmucl.sh
    
    93
    +    - ../../snapshot/bin/lisp -load report
    
    94
    +    
    
    95
    +stages:
    
    96
    +  - install
    
    97
    +  - build
    
    98
    +  - test
    
    99
    +  - ansi-test
    
    100
    +  - benchmark
    
    101
    +  - analyze
    
    102
    +
    
    103
    +cache:
    
    104
    +
    
    105
    +#### Linux jobs ####
    
    106
    +linux:install:
    
    107
    +  <<: *install_configuration
    
    108
    +  tags:
    
    109
    +    - linux
    
    110
    +  variables:
    
    111
    +    osname: "linux"
    
    112
    +    CURL: "curl"
    
    113
    +
    
    114
    +linux:build:
    
    115
    +  <<: *build_configuration
    
    116
    +  tags:
    
    117
    +    - linux
    
    118
    +  needs:
    
    119
    +    - job: linux:install
    
    120
    +      artifacts: true
    
    58 121
     
    
    59 122
     linux:cross-build:
    
    60 123
       stage: build
    
    ... ... @@ -85,31 +148,21 @@ linux:cross-build:
    85 148
         - bin/make-dist.sh -I xdist xlinux-4
    
    86 149
     
    
    87 150
     linux:test:
    
    88
    -  stage: test
    
    151
    +  <<: *unit_test_configuration
    
    89 152
       tags:
    
    90 153
         - linux
    
    91
    -  artifacts:
    
    92
    -    paths:
    
    93
    -      - ansi-test/test.out
    
    94
    -      - test.log
    
    95 154
       needs:
    
    96 155
         # Needs artifacts from build (dist/)
    
    97 156
         - job: linux:build
    
    98 157
           artifacts: true
    
    99
    -  script:
    
    100
    -    - bin/run-unit-tests.sh -l dist/bin/lisp 2>&1 | tee test.log
    
    101 158
     
    
    102 159
     linux:exec-test:
    
    103
    -  stage: test
    
    160
    +  <<: *exec_test_configuration
    
    104 161
       tags:
    
    105 162
         - linux
    
    106 163
       needs:
    
    107 164
         - job: linux:build
    
    108 165
           artifacts: true
    
    109
    -  script:
    
    110
    -    # Create an executable and test it by printing the version.
    
    111
    -    - dist/bin/lisp -eval '(save-lisp "saved-lisp-executable" :executable t)'
    
    112
    -    - ./saved-lisp-executable --version
    
    113 166
     
    
    114 167
     linux:cross-test:
    
    115 168
       stage: test
    
    ... ... @@ -127,142 +180,76 @@ linux:cross-test:
    127 180
         - bin/run-unit-tests.sh -l xdist/bin/lisp 2>&1 | tee cross-test.log
    
    128 181
     
    
    129 182
     linux:ansi-test:
    
    130
    -  stage: ansi-test
    
    183
    +  <<: *ansi_test_configuration
    
    131 184
       tags:
    
    132 185
         - linux
    
    133
    -  artifacts:
    
    134
    -    paths:
    
    135
    -      - ansi-test/test.out
    
    136 186
       needs:
    
    137 187
         # Needs artifacts from build (dist/)
    
    138 188
         - job: linux:build
    
    139 189
           artifacts: true
    
    140
    -  script:
    
    141
    -    - bin/run-ansi-tests.sh -l dist/bin/lisp
    
    142 190
         
    
    143 191
     linux:benchmark:
    
    144
    -  stage: benchmark
    
    192
    +  <<: *benchmark_configuration
    
    145 193
       tags:
    
    146 194
         - linux
    
    147
    -  artifacts:
    
    148
    -    paths:
    
    149
    -      - benchmarks/cl-bench/results
    
    150 195
       needs:
    
    151 196
         # Needs artifacts from install (snapshot/) and build (dist/)
    
    152 197
         - job: linux:install
    
    153 198
           artifacts: true
    
    154 199
         - job: linux:build
    
    155
    -  script:
    
    156
    -    - cd benchmarks/cl-bench
    
    157
    -    - mkdir tmp
    
    158
    -    - CMUCL=../../snapshot/bin/lisp ./run-cmucl.sh
    
    159
    -    - CMUCL=../../dist/bin/lisp ./run-cmucl.sh
    
    160
    -    - ../../snapshot/bin/lisp -load report
    
    161 200
     
    
    201
    +#### OSX (Mac) jobs ####
    
    162 202
     osx:install:
    
    163
    -  stage: install
    
    203
    +  <<: *install_configuration
    
    164 204
       tags:
    
    165 205
         - macos-virtualbox
    
    166
    -  artifacts:
    
    167
    -    paths:
    
    168
    -      - snapshot/
    
    169
    -  script:
    
    170
    -    - echo PATH = $PATH
    
    171
    -    - ls -F /usr/local/bin
    
    172
    -    - type -all gitlab-runner
    
    173
    -    - /opt/local/bin/curl -o cmucl-$version-darwin.tar.bz2 $download_url/cmucl-$version-darwin.tar.bz2
    
    174
    -    - mkdir snapshot
    
    175
    -    - (cd snapshot; tar xjf ../cmucl-$version-darwin.tar.bz2)
    
    206
    +  variables:
    
    207
    +    osname: "darwin"
    
    208
    +    CURL: "/opt/local/bin/curl"
    
    176 209
     
    
    177 210
     osx:build:
    
    178
    -  stage: build
    
    211
    +  <<: *build_configuration
    
    179 212
       tags:
    
    180 213
         - macos-virtualbox
    
    181
    -  artifacts:
    
    182
    -    paths:
    
    183
    -      - dist/
    
    184
    -      - darwin-2/*.log
    
    185
    -      - darwin-3/*.log
    
    186
    -      - darwin-4/*.log
    
    187
    -      - src/code/errno.lisp
    
    188 214
       needs:
    
    189 215
         - job: osx:install
    
    190 216
           artifacts: true
    
    191
    -  script:
    
    192
    -    # Do cross compile first
    
    193
    -    #- bin/create-target.sh xtarget x86_darwin
    
    194
    -    #- bin/create-target.sh xcross x86_darwin
    
    195
    -    #- bin/cross-build-world.sh -crl -B boot-2020-04-1 xtarget xcross src/tools/cross-scripts/cross-x86-x86.lisp snapshot/bin/lisp
    
    196
    -    # Regular build using the cross-compiled result or snapshot.
    
    197
    -    # Need /opt/local/bin to get msgmerge and msgfmt programs.
    
    198
    -    - PATH=/opt/local/bin:$PATH bin/build.sh $bootstrap -R -C "" -o snapshot/bin/lisp
    
    199
    -    # If needed use -V to specify the version in case some tag makes git
    
    200
    -    # describe return something that make-dist.sh doesn't like.
    
    201
    -    - bin/make-dist.sh -I dist darwin-4
    
    202 217
     
    
    203 218
     osx:test:
    
    204
    -  stage: test
    
    219
    +  <<: *unit_test_configuration
    
    205 220
       tags:
    
    206 221
         - macos-virtualbox
    
    207
    -  artifacts:
    
    208
    -    paths:
    
    209
    -      - ansi-test/test.out
    
    210
    -      - test.log
    
    211 222
       needs:
    
    212 223
         # Needs artifacts from build (dist/)
    
    213 224
         - job: osx:build
    
    214 225
           artifacts: true
    
    215
    -  script:
    
    216
    -    - echo LANG = $LANG
    
    217
    -    - bin/run-unit-tests.sh -l dist/bin/lisp 2>&1 | tee test.log
    
    218 226
     
    
    219 227
     osx:exec-test:
    
    220
    -  stage: test
    
    228
    +  <<: *exec_test_configuration
    
    221 229
       tags:
    
    222 230
         - macos-virtualbox
    
    223 231
       needs:
    
    224 232
         - job: osx:build
    
    225 233
           artifacts: true
    
    226
    -  script:
    
    227
    -    # Create an executable and test it by printing the version.
    
    228
    -    - dist/bin/lisp -eval '(save-lisp "saved-lisp-executable" :executable t)'
    
    229
    -    - ./saved-lisp-executable --version
    
    230 234
       
    
    231 235
     osx:ansi-test:
    
    232
    -  stage: ansi-test
    
    236
    +  <<: *ansi_test_configuration
    
    233 237
       tags:
    
    234 238
         - macos-virtualbox
    
    235
    -  artifacts:
    
    236
    -    paths:
    
    237
    -      - ansi-test/test.out
    
    238 239
       needs:
    
    239 240
         # Needs artifacts from build (dist/)
    
    240 241
         - job: osx:build
    
    241 242
           artifacts: true
    
    242
    -  script:
    
    243
    -    # NB: sometimes we can't clone the ansi-test repo (bad cert!?!).
    
    244
    -    # Manually cloning it in the gitlab build dir helps with this
    
    245
    -    # issue until we can figure out what's going on.
    
    246
    -    - bin/run-ansi-tests.sh -l dist/bin/lisp
    
    247 243
       
    
    248 244
     osx:benchmark:
    
    249
    -  stage: benchmark
    
    245
    +  <<: *benchmark_configuration
    
    250 246
       tags:
    
    251 247
         - macos-virtualbox
    
    252
    -  artifacts:
    
    253
    -    paths:
    
    254
    -      - benchmarks/cl-bench/results
    
    255 248
       needs:
    
    256 249
         # Needs artifacts from install (snapshot/) and build (dist/)
    
    257 250
         - job: osx:install
    
    258 251
           artifacts: true
    
    259 252
         - job:  osx:build
    
    260
    -  script:
    
    261
    -    - cd benchmarks/cl-bench
    
    262
    -    - mkdir tmp
    
    263
    -    - CMUCL=../../snapshot/bin/lisp ./run-cmucl.sh
    
    264
    -    - CMUCL=../../dist/bin/lisp ./run-cmucl.sh
    
    265
    -    - ../../snapshot/bin/lisp -load report
    
    266 253
     
    
    267 254
     # Optional job that runs the static analyzer.  It needs the files from
    
    268 255
     # the linux-4 directory built in the linux:build job.
    
    ... ... @@ -282,75 +269,41 @@ linux:static-analyzer:
    282 269
         # the results to the log file instead of also having it go to the
    
    283 270
         # console.  If someday there's less or no output, we can consider
    
    284 271
         # having the logs go to the console too.
    
    285
    -    - make -C linux-4/lisp clean
    
    286
    -    - make -C linux-4/lisp CFLAGS=-fanalyzer > analyzer.log 2>&1 
    
    272
    +    - make -C build-4/lisp clean
    
    273
    +    - make -C build-4/lisp CFLAGS=-fanalyzer > analyzer.log 2>&1 
    
    287 274
     
    
    275
    +#### OpenSUSE jobs ####
    
    288 276
     opensuse:install:
    
    289
    -  stage: install
    
    277
    +  <<: *install_configuration
    
    290 278
       tags:
    
    291 279
         - opensuse
    
    292
    -  artifacts:
    
    293
    -    paths:
    
    294
    -      - snapshot/
    
    295
    -  script:
    
    296
    -    - wget -nv $download_url/cmucl-$version-linux.tar.bz2
    
    297
    -    - wget -nv $download_url/cmucl-$version-linux.extra.tar.bz2
    
    298
    -    - mkdir snapshot
    
    299
    -    - (cd snapshot; tar xjf ../cmucl-$version-linux.tar.bz2; tar xjf ../cmucl-$version-linux.extra.tar.bz2)
    
    280
    +  variables:
    
    281
    +    osname: "linux"
    
    282
    +    CURL: "curl"
    
    300 283
     
    
    301 284
     opensuse:build:
    
    302
    -  stage: build
    
    285
    +  <<: *build_configuration
    
    303 286
       tags:
    
    304 287
         - opensuse
    
    305
    -  artifacts:
    
    306
    -    paths:
    
    307
    -      - dist/
    
    308
    -      - linux-2/*.log
    
    309
    -      - linux-3/*.log
    
    310
    -      - linux-4/
    
    311 288
       needs:
    
    312 289
         - job: opensuse:install
    
    313 290
           artifacts: true
    
    314
    -  script:
    
    315
    -    # Do cross compile first
    
    316
    -    #- bin/create-target.sh xtarget x86_linux_clang
    
    317
    -    #- bin/create-target.sh xcross x86_linux_clang
    
    318
    -    #- bin/cross-build-world.sh -crl -B boot-2020-04-1 xtarget xcross src/tools/cross-scripts/cross-x86-x86.lisp snapshot/bin/lisp
    
    319
    -    # Regular build using the cross-compiled result or snapshot.  The
    
    320
    -    # analyzer job requires gcc, so make sure we build with gcc here
    
    321
    -    # instead of clang. 
    
    322
    -    - bin/build.sh $bootstrap -R -C "x86_linux" -o snapshot/bin/lisp
    
    323
    -    # - bin/build.sh $bootstrap -R -C "x86_linux" -o snapshot/bin/lisp
    
    324
    -    # If needed use -V to specify the version in case some tag makes git
    
    325
    -    # describe return something that make-dist.sh doesn't like.
    
    326
    -    - bin/make-dist.sh -I dist linux-4
    
    327 291
     
    
    328 292
     opensuse:test:
    
    329
    -  stage: test
    
    293
    +  <<: *unit_test_configuration
    
    330 294
       tags:
    
    331
    -    - linux
    
    332
    -  artifacts:
    
    333
    -    paths:
    
    334
    -      - ansi-test/test.out
    
    335
    -      - test.log
    
    295
    +    - opensuse
    
    336 296
       needs:
    
    337 297
         # Needs artifacts from build (dist/)
    
    338 298
         - job: opensuse:build
    
    339 299
           artifacts: true
    
    340
    -  script:
    
    341
    -    - bin/run-unit-tests.sh -l dist/bin/lisp 2>&1 | tee test.log
    
    342 300
     
    
    343 301
     opensuse:ansi-test:
    
    344
    -  stage: ansi-test
    
    302
    +  <<: *ansi_test_configuration
    
    345 303
       tags:
    
    346
    -    - linux
    
    347
    -  artifacts:
    
    348
    -    paths:
    
    349
    -      - ansi-test/test.out
    
    304
    +    - opensuse
    
    350 305
       needs:
    
    351 306
         # Needs artifacts from build (dist/)
    
    352 307
         - job: opensuse:build
    
    353 308
           artifacts: true
    
    354
    -  script:
    
    355
    -    - bin/run-ansi-tests.sh -l dist/bin/lisp
    
    356 309