Skip to content

Commit fe934c0

Browse files
nikswamyCopilot
andcommitted
Pin F* release v2026.04.17 in setup.sh and CI
- setup.sh: default 'binary' mode now installs pinned release (v2026.04.17) instead of latest nightly. Supports: './setup.sh binary' (pinned), './setup.sh binary nightly', './setup.sh binary VERSION'. - CI: uses pinned release for reproducible builds. - Nightly workflow: explicitly passes 'nightly' to track master. - Pulse mk files are now fetched from the matching release tag. - Ch15 MatrixChain: bump rlimit 10→20 for one query that became marginal in the new release (was using exactly 10.0/10.0). Full clean build passes with -j$(nproc) on v2026.04.17. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 0ce4021 commit fe934c0

4 files changed

Lines changed: 37 additions & 13 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Checkout
1717
uses: actions/checkout@v4
1818

19-
- name: Install F* (nightly binary)
19+
- name: Install F* (pinned release)
2020
run: ./setup.sh binary
2121

2222
- name: Show F* version

.github/workflows/nightly.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
uses: actions/checkout@v4
1616

1717
- name: Install F* (latest nightly)
18-
run: ./setup.sh binary
18+
run: ./setup.sh binary nightly
1919

2020
- name: Show F* version
2121
run: ./fstar/bin/fstar.exe --version

autoclrs/ch15-dynamic-programming/CLRS.Ch15.MatrixChain.Impl.fst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ let mc_result_eq_mc_cost (dims: Seq.seq int) (n: nat)
8383

8484
open Pulse.Lib.BoundedIntegers
8585

86+
#push-options "--z3rlimit 20"
8687
//SNIPPET_START: mc_sig
8788
fn matrix_chain_order
8889
(#p: perm)
@@ -287,3 +288,4 @@ fn matrix_chain_order
287288

288289
result
289290
}
291+
#pop-options

setup.sh

Lines changed: 33 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
# Two modes:
55
#
66
# 1. Binary install (recommended for most users):
7-
# ./setup.sh binary # install latest nightly F* binary
7+
# ./setup.sh binary # install pinned release (v2026.04.17)
8+
# ./setup.sh binary nightly # install latest nightly build
9+
# ./setup.sh binary v2026.04.17 # install a specific release
810
#
911
# 2. Source build (for F* developers):
1012
# ./setup.sh # build F* stage3 + KaRaMeL from submodule
@@ -27,6 +29,9 @@ NPROC=$(nproc 2>/dev/null || sysctl -n hw.ncpu 2>/dev/null || echo 4)
2729
# Binary install destination
2830
FSTAR_BIN_DIR="$SCRIPT_DIR/fstar"
2931

32+
# Pinned F* release version (update when a new release is validated)
33+
FSTAR_RELEASE_VERSION="v2026.04.17"
34+
3035
red() { printf '\033[1;31m%s\033[0m\n' "$*"; }
3136
green() { printf '\033[1;32m%s\033[0m\n' "$*"; }
3237
info() { printf '\033[1;34m=> %s\033[0m\n' "$*"; }
@@ -123,9 +128,22 @@ build_karamel() {
123128
# ---- Binary install ----
124129

125130
install_binary() {
126-
info "Installing F* nightly binary to $FSTAR_BIN_DIR ..."
131+
local version_arg="${1:-}"
132+
local install_flags=()
133+
134+
if [ "$version_arg" = "nightly" ]; then
135+
info "Installing F* latest nightly binary to $FSTAR_BIN_DIR ..."
136+
install_flags=(--nightly)
137+
elif [ -n "$version_arg" ]; then
138+
info "Installing F* $version_arg binary to $FSTAR_BIN_DIR ..."
139+
install_flags=(--release --version "$version_arg")
140+
else
141+
info "Installing F* $FSTAR_RELEASE_VERSION binary to $FSTAR_BIN_DIR ..."
142+
install_flags=(--release --version "$FSTAR_RELEASE_VERSION")
143+
fi
144+
127145
curl -fsSL https://aka.ms/install-fstar | bash -s -- \
128-
--nightly \
146+
"${install_flags[@]}" \
129147
--dest "$FSTAR_BIN_DIR" \
130148
--no-link
131149

@@ -150,9 +168,11 @@ install_binary() {
150168
# These are small build-infrastructure files not included in binary packages.
151169
install_pulse_mk() {
152170
local mk_dir="$FSTAR_BIN_DIR/pulse/mk"
153-
local base_url="https://raw.githubusercontent.com/FStarLang/FStar/master/pulse/mk"
171+
# Use the pinned release tag for mk files so they match the installed binary
172+
local tag="${FSTAR_RELEASE_VERSION}"
173+
local base_url="https://raw.githubusercontent.com/FStarLang/FStar/${tag}/pulse/mk"
154174

155-
info "Downloading Pulse build infrastructure (mk files)..."
175+
info "Downloading Pulse build infrastructure (mk files from ${tag})..."
156176
mkdir -p "$mk_dir"
157177
for f in common.mk locate.mk test.mk krmlheader; do
158178
curl -fsSL "$base_url/$f" -o "$mk_dir/$f"
@@ -182,7 +202,7 @@ setup_karamel_compat() {
182202
case "${1:-all}" in
183203
binary)
184204
check_prereqs_binary
185-
install_binary
205+
install_binary "${2:-}"
186206
;;
187207
fstar)
188208
check_prereqs
@@ -203,12 +223,14 @@ case "${1:-all}" in
203223
green "Setup complete. Run 'make' to verify all chapters."
204224
;;
205225
*)
206-
echo "Usage: $0 [binary|fstar|karamel|all]"
226+
echo "Usage: $0 [binary [nightly|VERSION]|fstar|karamel|all]"
207227
echo
208-
echo " binary Install F* from a pre-built nightly binary (fast)"
209-
echo " fstar Build F* stage3 from source (requires OCaml)"
210-
echo " karamel Build KaRaMeL from source (requires F* already built)"
211-
echo " all Build F* + KaRaMeL from source (default)"
228+
echo " binary Install pinned F* release ($FSTAR_RELEASE_VERSION)"
229+
echo " binary nightly Install latest nightly F* build"
230+
echo " binary VERSION Install a specific release (e.g. v2026.04.17)"
231+
echo " fstar Build F* stage3 from source (requires OCaml)"
232+
echo " karamel Build KaRaMeL from source (requires F* already built)"
233+
echo " all Build F* + KaRaMeL from source (default)"
212234
exit 1
213235
;;
214236
esac

0 commit comments

Comments
 (0)