Raymond Toy pushed to branch issue-478-run-analyzer-link-chcker-on-schedule at cmucl / cmucl Commits: d14f058d by Raymond Toy at 2026-03-11T15:09:34-07:00 Restore comments These were accidentally removed. - - - - - 1 changed file: - .gitlab-ci.yml Changes: ===================================== .gitlab-ci.yml ===================================== @@ -21,6 +21,8 @@ workflow: - if: $CI_COMMIT_BRANCH - if: $CI_COMMIT_TAG +# Default install configuration to download the cmucl tarballs to use +# for building. .install_template: &install_configuration stage: install artifacts: @@ -29,12 +31,20 @@ workflow: script: - echo PATH = $PATH - ls -F /usr/local/bin + # Make sure gitlab-runner is available because it's needed by the + # VM to upload artifacts. - type -all gitlab-runner + # Download binaries. (Do we really need the extras tarball?) - $CURL -o cmucl-$version-$osname.tar.$tar_ext $download_url/cmucl-$version-$osname.tar.$tar_ext - $CURL -o cmucl-$version-$osname.extra.tar.$tar_ext $download_url/cmucl-$version-$osname.extra.tar.$tar_ext - mkdir snapshot - (cd snapshot; tar xf ../cmucl-$version-$osname.tar.$tar_ext; tar xf ../cmucl-$version-$osname.extra.tar.$tar_ext) +# Default build configuration to be added to each build stage for each +# OS. This assumes we don't need anything special between OSes, and +# the option '-C ""' is good enough. We also override the default +# build dirs by using the -b option so that we know where the results +# are, independent of OS. .build_template: &build_configuration stage: build artifacts: @@ -44,14 +54,30 @@ workflow: - build-3/*.log - build-4/ - cmucl* + # Needed by Linux analyzer stage - src/lisp/cmucl-version.h + # Save this so we can see the generated errno - src/code/errno.lisp script: + # Do cross compile first + #- bin/create-target.sh xtarget x86_linux_clang + #- bin/create-target.sh xcross x86_linux_clang + #- bin/cross-build-world.sh -crl -B boot-2020-04-1 xtarget xcross src/tools/cross-scripts/cross-x86-x86.lisp snapshot/bin/lisp + # Regular build using the cross-compiled result or snapshot. The + # analyzer job requires gcc, so make sure we build with gcc here + # instead of clang. + # + # Set CONFIG in appropriately each build. - bin/build.sh $bootstrap -b build -R -C $CONFIG -o snapshot/bin/lisp + # When the result of `git describe` cannot be used as a version + # string, an alternative can be provided with the -V flag + # The following stages need this to run tests and such. - sh -x bin/git-version.sh - bin/make-dist.sh -I dist build-4 + # Also make some tarballs so it's easy to download the artifacts. - bin/make-dist.sh -S build-4 +# Default configuration for running the ansi-tests. .ansi_test_template: &ansi_test_configuration stage: ansi-test artifacts: @@ -61,6 +87,7 @@ workflow: - bin/run-ansi-tests.sh -l dist/bin/lisp - cp ../ansi-test/test.out ansi-test.out +# Default configuration for running unit tests. .unit_test_template: &unit_test_configuration stage: test artifacts: @@ -70,13 +97,19 @@ workflow: - echo LANG = $LANG - bin/run-unit-tests.sh -l dist/bin/lisp 2>&1 | tee test.log +# Default configuration to test creation of lisp executable and +# testing the exectuable works. .exec_test_template: &exec_test_configuration stage: test script: + # Create an executable and test it by printing the version. - dist/bin/lisp -eval '(save-lisp "saved-lisp-executable" :executable t)' - ./saved-lisp-executable --version + # Run the unit tests with the executable, just to make sure the + # executable works as expected. - bin/run-unit-tests.sh -l ./saved-lisp-executable +# Default configuration for running the benchmarks. .benchmark_template: &benchmark_configuration stage: benchmark artifacts: @@ -88,7 +121,7 @@ workflow: - CMUCL=../../snapshot/bin/lisp ./run-cmucl.sh - CMUCL=../../dist/bin/lisp ./run-cmucl.sh - ../../snapshot/bin/lisp -load report - + stages: - install - build @@ -117,6 +150,8 @@ linux:build: - job: linux:install artifacts: true variables: + # Fedora 41 must build with gcc because the clang build fails some + # ansi-tests. See [#469]. CONFIG: "x86_linux" linux:cross-build: @@ -129,11 +164,20 @@ linux:cross-build: - linux-2/*.log - linux-3/*.log - linux-4/*.log + # The lisp directory is needed for the static analyzer job. - linux-4/lisp variables: + # This must match the config used for the linux build! CONFIG: "x86_linux" + needs: + + # Normally need the linux:install stage to get the compiler to + # use. But for #337, we need the normal build from linux:build to + # do the cross-compile. Once the snapshot is made, we can use + # linux:install instead. - job: linux:build + #- job: linux:install artifacts: true script: - bin/create-target.sh xtarget $CONFIG @@ -147,6 +191,7 @@ linux:test: tags: - linux needs: + # Needs artifacts from build (dist/) - job: linux:build artifacts: true @@ -167,6 +212,7 @@ linux:cross-test: - ansi-test/test.out - cross-test.log needs: + # Needs artifacts from build (dist/) - job: linux:cross-build artifacts: true script: @@ -177,14 +223,16 @@ linux:ansi-test: tags: - linux needs: + # Needs artifacts from build (dist/) - job: linux:build artifacts: true - + linux:benchmark: <<: *benchmark_configuration tags: - linux needs: + # Needs artifacts from install (snapshot/) and build (dist/) - job: linux:install artifacts: true - job: linux:build @@ -213,6 +261,7 @@ osx:test: tags: - macos-virtualbox needs: + # Needs artifacts from build (dist/) - job: osx:build artifacts: true @@ -223,23 +272,51 @@ osx:exec-test: needs: - job: osx:build artifacts: true - + osx:ansi-test: <<: *ansi_test_configuration tags: - macos-virtualbox needs: + # Needs artifacts from build (dist/) - job: osx:build artifacts: true - + osx:benchmark: <<: *benchmark_configuration tags: - macos-virtualbox needs: + # Needs artifacts from install (snapshot/) and build (dist/) - job: osx:install artifacts: true - - job: osx:build + - job: osx:build + +# Optional job that runs the static analyzer. It needs the files from +# the linux-4 directory built in the linux:build job. +linux:static-analyzer: + stage: analyze + + tags: + - linux + artifacts: + when: always + paths: + - analyzer.log + needs: + - job: linux:build + artifacts: true + rules: + - if: $CI_PIPELINE_SOURCE == "schedule" + - when: manual + allow_failure: true + script: + # Analysis can generate huge amounts of output. For now just save + # the results to the log file instead of also having it go to the + # console. If someday there's less or no output, we can consider + # having the logs go to the console too. + - make -C build-4/lisp clean + - make -C build-4/lisp ANALYZER=-fanalyzer > analyzer.log 2>&1 #### OpenSUSE jobs #### ubuntu:install: @@ -258,6 +335,9 @@ ubuntu:build: - job: ubuntu:install artifacts: true variables: + # Build with gcc on Ubuntu 25.10. It produces a lisp than passes + # the ansi-tests. Clang seems to fail the ansi-tests WRITE.1, + # PRINT.1, and friends when cr_pow is used. CONFIG: "x86_linux" ubuntu:test: @@ -265,6 +345,7 @@ ubuntu:test: tags: - ubuntu needs: + # Needs artifacts from build (dist/) - job: ubuntu:build artifacts: true @@ -273,39 +354,34 @@ ubuntu:ansi-test: tags: - ubuntu needs: + # Needs artifacts from build (dist/) - job: ubuntu:build artifacts: true -linux:static-analyzer: - stage: analyze - tags: - - linux - artifacts: - when: always - paths: - - analyzer.log - needs: - - job: linux:build - artifacts: true - rules: - - if: $CI_PIPELINE_SOURCE == "schedule" - - when: manual - allow_failure: true - script: - - make -C build-4/lisp clean - - make -C build-4/lisp ANALYZER=-fanalyzer > analyzer.log 2>&1 - +# Optional job that runs the markdown link checker. This is optional +# because it's very slow, of course; you have to run it manually. +# +# From https://github.com/tcort/markdown-link-check +# Checks links on the wiki pages whenever any wiki markdown pages change. markdown-link-check: stage: markdown-link-check + + # Only the linux runner has markdown-link-check installed tags: - linux + # It's ok if this fails; we don't want to declare the entire + # pipeline as having failed. allow_failure: true rules: - if: $CI_PIPELINE_SOURCE == "schedule" - when: manual allow_failure: true script: + # Check links in the main repo - find . -name \*.md -print0 | xargs -0 -n1 markdown-link-check + # Clone the wiki pages and check the links there. Lots of + # failures here because of + # https://gitlab.com/gitlab-org/gitlab/-/issues/17845. - git clone https://gitlab.common-lisp.net/cmucl/cmucl.wiki.git - find cmucl.wiki -name \*.md -print0 | xargs -0 -n1 markdown-link-check View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/d14f058d28a2aeefab700dcf... -- View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/d14f058d28a2aeefab700dcf... You're receiving this email because of your account on gitlab.common-lisp.net.