[Git][cmucl/cmucl][master] 2 commits: Fix #489: Rewrite gitlab-ci to use Gitlab extends syntax
Raymond Toy pushed to branch master at cmucl / cmucl Commits: c48d3604 by Raymond Toy at 2026-03-15T07:47:08-07:00 Fix #489: Rewrite gitlab-ci to use Gitlab extends syntax - - - - - 314c203f by Raymond Toy at 2026-03-15T07:47:08-07:00 Merge branch 'issue-489-update-gitlab-to-extends-syntax' into 'master' Fix #489: Rewrite gitlab-ci to use Gitlab extends syntax Closes #489 See merge request cmucl/cmucl!366 - - - - - 1 changed file: - .gitlab-ci.yml Changes: ===================================== .gitlab-ci.yml ===================================== @@ -15,15 +15,19 @@ workflow: - if: $CI_PIPELINE_SOURCE == "schedule" # Run on merge requests - if: $CI_PIPELINE_SOURCE == "merge_request_event" - # Don't create a branch pipeline when an MR pipeline already exists + # Run on the default branch (where there's no MR) + - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH + # Run on feature branches, but only if there's no open MR (to avoid + # duplicate pipelines). - if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS when: never - if: $CI_COMMIT_BRANCH + # Run on tags - if: $CI_COMMIT_TAG # Default install configuration to download the cmucl tarballs to use # for building. -.install_template: &install_configuration +.install: stage: install artifacts: paths: @@ -45,7 +49,7 @@ workflow: # 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 +.build: stage: build artifacts: paths: @@ -78,7 +82,7 @@ workflow: - bin/make-dist.sh -S build-4 # Default configuration for running the ansi-tests. -.ansi_test_template: &ansi_test_configuration +.ansi-test: stage: ansi-test artifacts: paths: @@ -88,7 +92,7 @@ workflow: - cp ../ansi-test/test.out ansi-test.out # Default configuration for running unit tests. -.unit_test_template: &unit_test_configuration +.unit-test: stage: test artifacts: paths: @@ -99,7 +103,7 @@ workflow: # Default configuration to test creation of lisp executable and # testing the exectuable works. -.exec_test_template: &exec_test_configuration +.exec-test: stage: test script: # Create an executable and test it by printing the version. @@ -110,7 +114,7 @@ workflow: - bin/run-unit-tests.sh -l ./saved-lisp-executable # Default configuration for running the benchmarks. -.benchmark_template: &benchmark_configuration +.benchmark: stage: benchmark artifacts: paths: @@ -121,7 +125,68 @@ workflow: - CMUCL=../../snapshot/bin/lisp ./run-cmucl.sh - CMUCL=../../dist/bin/lisp ./run-cmucl.sh - ../../snapshot/bin/lisp -load report - + +# Rules shared by optional/manual jobs (static analyzer, markdown-link-check). +.optional-rules: + rules: + - if: $CI_PIPELINE_SOURCE == "schedule" + - if: $RUN_CHECKS + - when: manual + allow_failure: true + +# Per-platform base jobs: capture tags and the needs chain so individual +# jobs don't have to repeat them. +.linux: + tags: + - linux + +.linux-needs-install: + extends: .linux + needs: + - job: linux:install + artifacts: true + +.linux-needs-build: + extends: .linux + needs: + # Needs artifacts from build (dist/) + - job: linux:build + artifacts: true + +.osx: + tags: + - macos-virtualbox + +.osx-needs-install: + extends: .osx + needs: + - job: osx:install + artifacts: true + +.osx-needs-build: + extends: .osx + needs: + # Needs artifacts from build (dist/) + - job: osx:build + artifacts: true + +.ubuntu: + tags: + - ubuntu + +.ubuntu-needs-install: + extends: .ubuntu + needs: + - job: ubuntu:install + artifacts: true + +.ubuntu-needs-build: + extends: .ubuntu + needs: + # Needs artifacts from build (dist/) + - job: ubuntu:build + artifacts: true + stages: - install - build @@ -135,29 +200,21 @@ cache: #### Linux jobs #### linux:install: - <<: *install_configuration - tags: - - linux + extends: [.install, .linux] variables: osname: "linux" CURL: "curl" linux:build: - <<: *build_configuration - tags: - - linux - needs: - - job: linux:install - artifacts: true + extends: [.build, .linux-needs-install] variables: # Fedora 41 must build with gcc because the clang build fails some # ansi-tests. See [#469]. CONFIG: "x86_linux" linux:cross-build: + extends: .linux-needs-install stage: build - tags: - - linux artifacts: paths: - xdist/ @@ -169,10 +226,6 @@ linux:cross-build: variables: # This must match the config used for the linux build! CONFIG: "x86_linux" - - needs: - - job: linux:install - artifacts: true script: - bin/create-target.sh xtarget $CONFIG - bin/create-target.sh xcross $CONFIG @@ -181,26 +234,14 @@ linux:cross-build: - bin/make-dist.sh -I xdist xlinux-4 linux:test: - <<: *unit_test_configuration - tags: - - linux - needs: - # Needs artifacts from build (dist/) - - job: linux:build - artifacts: true + extends: [.unit-test, .linux-needs-build] linux:exec-test: - <<: *exec_test_configuration - tags: - - linux - needs: - - job: linux:build - artifacts: true + extends: [.exec-test, .linux-needs-build] linux:cross-test: + extends: .linux stage: test - tags: - - linux artifacts: paths: - ansi-test/test.out @@ -213,18 +254,10 @@ linux:cross-test: - bin/run-unit-tests.sh -l xdist/bin/lisp 2>&1 | tee cross-test.log linux:ansi-test: - <<: *ansi_test_configuration - tags: - - linux - needs: - # Needs artifacts from build (dist/) - - job: linux:build - artifacts: true - + extends: [.ansi-test, .linux-needs-build] + linux:benchmark: - <<: *benchmark_configuration - tags: - - linux + extends: [.benchmark, .linux] needs: # Needs artifacts from install (snapshot/) and build (dist/) - job: linux:install @@ -233,78 +266,42 @@ linux:benchmark: #### OSX (Mac) jobs #### osx:install: - <<: *install_configuration - tags: - - macos-virtualbox + extends: [.install, .osx] variables: osname: "darwin" CURL: "/opt/local/bin/curl" osx:build: - <<: *build_configuration - tags: - - macos-virtualbox - needs: - - job: osx:install - artifacts: true + extends: [.build, .osx-needs-install] variables: CONFIG: "x86_darwin" osx:test: - <<: *unit_test_configuration - tags: - - macos-virtualbox - needs: - # Needs artifacts from build (dist/) - - job: osx:build - artifacts: true + extends: [.unit-test, .osx-needs-build] osx:exec-test: - <<: *exec_test_configuration - tags: - - macos-virtualbox - needs: - - job: osx:build - artifacts: true - + extends: [.exec-test, .osx-needs-build] + osx:ansi-test: - <<: *ansi_test_configuration - tags: - - macos-virtualbox - needs: - # Needs artifacts from build (dist/) - - job: osx:build - artifacts: true - + extends: [.ansi-test, .osx-needs-build] + osx:benchmark: - <<: *benchmark_configuration - tags: - - macos-virtualbox + extends: [.benchmark, .osx] 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: + extends: [.optional-rules, .linux-needs-build] stage: analyze - - tags: - - linux artifacts: when: always paths: - analyzer.log - needs: - - job: linux:build - artifacts: true - rules: - - if: $CI_PIPELINE_SOURCE == "schedule" - - if: $RUN_CHECKS - - 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 @@ -315,20 +312,13 @@ linux:static-analyzer: #### OpenSUSE jobs #### ubuntu:install: - <<: *install_configuration - tags: - - ubuntu + extends: [.install, .ubuntu] variables: osname: "linux" CURL: "curl" ubuntu:build: - <<: *build_configuration - tags: - - ubuntu - needs: - - job: ubuntu:install - artifacts: true + extends: [.build, .ubuntu-needs-install] 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, @@ -336,22 +326,10 @@ ubuntu:build: CONFIG: "x86_linux" ubuntu:test: - <<: *unit_test_configuration - tags: - - ubuntu - needs: - # Needs artifacts from build (dist/) - - job: ubuntu:build - artifacts: true + extends: [.unit-test, .ubuntu-needs-build] ubuntu:ansi-test: - <<: *ansi_test_configuration - tags: - - ubuntu - needs: - # Needs artifacts from build (dist/) - - job: ubuntu:build - artifacts: true + extends: [.ansi-test, .ubuntu-needs-build] # Optional job that runs the markdown link checker. This is optional # because it's very slow, of course; you have to run it manually. @@ -359,21 +337,14 @@ ubuntu:ansi-test: # From https://github.com/tcort/markdown-link-check # Checks links on the wiki pages whenever any wiki markdown pages change. markdown-link-check: + extends: [.optional-rules, .linux] 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 # This job doesn't depend on any others. needs: [] - rules: - - if: $CI_PIPELINE_SOURCE == "schedule" - - if: $RUN_CHECKS - - when: manual - allow_failure: true script: # Check links in the main repo - find . -name \*.md -print0 | xargs -0 -n1 markdown-link-check @@ -383,3 +354,4 @@ markdown-link-check: - 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/-/compare/3db302f36355d9eb32c50b7... -- View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/3db302f36355d9eb32c50b7... You're receiving this email because of your account on gitlab.common-lisp.net.
participants (1)
-
Raymond Toy (@rtoy)