File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -139,7 +139,16 @@ jobs:
139139 - name : Verify tutorial project zip files build
140140 if : github.event_name != 'release'
141141 run : |
142- scripts/check-tutorial-zips.sh
142+ # On Linux, some nightly toolchains currently report a version string that
143+ # the zips turn into a toolchain name that elan rejects, so build the
144+ # projects with this repository's toolchain instead. Releases and release
145+ # candidates are unaffected and build with the toolchain from the zip.
146+ # See https://github.com/leanprover/lean4/issues/14702
147+ if grep -q nightly lean-toolchain; then
148+ scripts/check-tutorial-zips.sh "$(cat lean-toolchain)"
149+ else
150+ scripts/check-tutorial-zips.sh
151+ fi
143152
144153 - name : Generate proofreading HTML
145154 if : github.event_name == 'pull_request'
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22
33# Verify that tutorial project zip files can be unpacked and built with lake
4+ #
5+ # Usage: check-tutorial-zips.sh [TOOLCHAIN]
6+ #
7+ # When TOOLCHAIN is given, it replaces the `lean-toolchain` file of each
8+ # unpacked project. On Linux, some nightly toolchains currently report a version
9+ # string that the zips turn into a toolchain name that elan rejects, so CI passes
10+ # this repository's toolchain when building from a nightly. Releases and release
11+ # candidates are unaffected and build with the toolchain from the zip.
12+ # See https://github.com/leanprover/lean4/issues/14702
13+ toolchain=" ${1:- } "
414
515# First check that we actually found some zip files
616zip_count=$( find _out/site/tutorials -name " *.zip" 2> /dev/null | wc -l)
@@ -25,6 +35,10 @@ while IFS= read -r zip; do
2535 echo " Warning: No lakefile found in $zip "
2636 (( failures++ ))
2737 else
38+ if [ -n " $toolchain " ]; then
39+ echo " Using toolchain: $toolchain "
40+ echo " $toolchain " > " $project_dir /lean-toolchain"
41+ fi
2842 pushd " $project_dir " > /dev/null
2943 if lake build 2>&1 ; then
3044 echo " Build succeeded"
You can’t perform that action at this time.
0 commit comments