From 5befc7f2ec8f13e21a5b61ea006af48d9c7d5345 Mon Sep 17 00:00:00 2001 From: Sam Tobin-Hochstadt Date: Wed, 6 May 2020 22:09:24 -0400 Subject: [PATCH] Build RacketCS Snapshots on GHA. --- .github/workflows/ci-snapshot.yml | 29 ++++++++++++++++++----------- .github/workflows/site-small.rkt | 13 +++++++++---- 2 files changed, 27 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci-snapshot.yml b/.github/workflows/ci-snapshot.yml index e2d8f38cdc..6e40d07e53 100644 --- a/.github/workflows/ci-snapshot.yml +++ b/.github/workflows/ci-snapshot.yml @@ -12,28 +12,35 @@ jobs: steps: - uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Cleanup # this is only needed in `act` testing + run: | + rm -rf ~/.racket/ + + - uses: Bogdanp/setup-racket@v0.8 + with: + architecture: 'x64' + # FIXME: use the binary s3-sync pkg + distribution: 'full' + variant: 'regular' + version: '7.7' + packages: 's3-sync' - name: Install pkg dependencies run: | sudo apt update - sudo apt install -y libffi-dev unzip python libxml2-dev libfindbin-libs-perl make gcc g++ git uuid-dev - - uses: Bogdanp/setup-racket@v0.7 - with: - architecture: 'x64' - distribution: 'full' - variant: 'regular' - version: 'current' + sudo apt install -y libffi-dev unzip libfindbin-libs-perl uuid-dev - - name: Install s3-sync - run: | - sudo raco pkg install -i --auto s3-sync - name: Building env: DISTRO_BUILD_SITE_DEST: "${{ runner.temp }}/site-dest/" run: | export cpus=$(grep -c ^processor /proc/cpuinfo) - make snapshot-site PLAIN_RACKET=/usr/bin/racket CONFIG=".github/workflows/site-small.rkt" -j $((cpus+1)) + export HERE=`pwd` + make snapshot-site CONFIG=".github/workflows/site-small.rkt" -j $((cpus+1)) - name: S3 Sync env: diff --git a/.github/workflows/site-small.rkt b/.github/workflows/site-small.rkt index ad17a1d362..2f8505a4f8 100644 --- a/.github/workflows/site-small.rkt +++ b/.github/workflows/site-small.rkt @@ -13,25 +13,30 @@ (define server-base-url (~a "https://snapshots.racket-lang.org/" (dest-dir-name) "/")) (define distro-content - '("main-distribution")) + '("compiler-lib" "racket-lib")) (define (prebuilt-racket) (or (and (getenv "PLTHOME") (~a (getenv "PLTHOME") "/racket/" "bin/" "racket")) "/usr/bin/racket")) ;; The overall configuration: -(parallel +(sequential #:pkgs distro-content #:dist-base-url server-base-url - #:site-dest (build-path (getenv "DISTRO_BUILD_SITE_DEST") (dest-dir-name)) + #:site-dest (build-path (or (getenv "DISTRO_BUILD_SITE_DEST") "/tmp/racket-snapshots/") (dest-dir-name)) #: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)" #:racket (prebuilt-racket) - #:versionless? #true) + #:versionless? #true + #:j 2) (machine #:name "Racket CS (Ubuntu 18.04, x86_64)" ;; can't use the pre-built Racket with Racket CS #:versionless? #true #:dir "cs_build" + #:j 2 + #:repo (or (getenv "HERE") ".") + #:pull? #f #:variant 'cs #:dist-suffix "cs"))