diff --git a/.github/workflows/site-small.rkt b/.github/workflows/site-small.rkt index 1d3ccb73ca..a609e8ae6b 100644 --- a/.github/workflows/site-small.rkt +++ b/.github/workflows/site-small.rkt @@ -1,5 +1,9 @@ #lang distro-build/config -(require racket/format) +(require racket/format racket/runtime-path racket/string) + +(define-runtime-path here ".") + +(define source-dir (path->string (build-path here ".." ".."))) (define (build-dir-name) (case (current-mode) @@ -19,6 +23,42 @@ (or (and (getenv "PLTHOME") (~a (getenv "PLTHOME") "/racket/" "bin/" "racket")) "/usr/bin/racket")) +(define windows "{1} Windows") +(define macosx "{2} Mac OS X") +(define linux "{3} Linux") +(define unix-platforms "{8} Unix") +(define all-platforms "{9} All Platforms") + +(define (convert-log-name name) + (define v (string-trim (regexp-replace* #rx"{[0-9]}|[\\(\\)\\|]" name ""))) + (string-append (string-downcase (regexp-replace* (regexp "[ ,]+") v "_")) ".txt")) + + + +(define (machine/sh+tgz #:name name) + ;; Create all Linux installer forms + (sequential + (machine #:name (~a name " | {1} Installer")) + (machine #:name (~a name " | {3} Tarball") + #:tgz? #t))) + +(define (cs-machine #:name name #:pkgs [pkgs distro-content]) + (machine #:dir "cs-build" + #:repo source-dir + #:pull? #f + #:variant 'cs + #:dist-suffix "cs" + #:versionless? #t + #:pkgs pkgs + #:log-file (convert-log-name name) + #:name name)) + +(define (bc-machine #:name name #:pkgs [pkgs distro-content]) + (machine #:versionless? #t + #:pkgs pkgs + #:log-file (convert-log-name name) + #:name name)) + ;; The overall configuration: (sequential #:pkgs distro-content @@ -27,17 +67,9 @@ #:plt-web-style? #t #:site-title (format "Snapshot: ~a" (current-stamp)) #:fail-on-client-failures #f - (machine #:name "Racket BC (Ubuntu 18.04, x86_64)" - #:versionless? #true - #:log-file "racket_bc_ubuntu18.04.txt" - #:j 2) - (machine #:name "Racket CS (Ubuntu 18.04, x86_64)" - ;; can't use the pre-built Racket with Racket CS - #:versionless? #true - #:log-file "racket_cs_ubuntu18.04.txt" - #:dir "cs_build" - #:j 2 - #:repo (or (getenv "HERE") ".") - #:pull? #f - #:variant 'cs - #:dist-suffix "cs")) + (sequential + (bc-machine #:name "Racket BC (Ubuntu 18.04, x86_64)") + (bc-machine #:name "Minimal Racket BC (Ubuntu 18.04, x86_64)" #:pkgs null)) + (sequential + (cs-machine #:name "Racket CS (Ubuntu 18.04, x86_64)") + (cs-machine #:name "Minimal Racket CS (Ubuntu 18.04, x86_64)" #:pkgs null)))