Skip to content

Use a binary bootstrap compiler #4

Use a binary bootstrap compiler

Use a binary bootstrap compiler #4

Workflow file for this run

name: Release
on:
push:
tags:
- "v*.*.*"
permissions:
contents: write
jobs:
linux-x86-64:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v5
- name: Validate tag
shell: bash
run: |
version=$(sed -n 's/^ :version "\([0-9][0-9.]*\)"$/\1/p' autolith.asd)
test "v$version" = "$GITHUB_REF_NAME"
- name: Install build dependencies
run: |
sudo apt-get update
sudo apt-get install --yes \
bubblewrap build-essential cargo cmake libssl-dev libz-dev \
libzstd-dev pkg-config
- name: Build the pinned SBCL runtime
shell: bash
run: |
bootstrap_version=2.4.0
bootstrap_sha256=50afb9765d6a2f937f609ac33ebe553326347aef23eddd49c46d76456a5b3095
bootstrap_archive="/tmp/sbcl-$bootstrap_version-x86-64-linux-binary.tar.bz2"
bootstrap_source="/tmp/sbcl-$bootstrap_version-x86-64-linux"
bootstrap_installation="/tmp/sbcl-bootstrap-$bootstrap_version"
runtime_version=$(tr -d '[:space:]' < sbcl.version)
runtime_root="$HOME/.local/share/autolith/runtimes/$runtime_version"
runtime_installation="$runtime_root/installation"
archive="/tmp/sbcl-$runtime_version-source.tar.bz2"
source="/tmp/sbcl-$runtime_version"
curl --fail --location --show-error --retry 3 \
--proto '=https' --tlsv1.2 \
--output "$bootstrap_archive" \
"https://downloads.sourceforge.net/project/sbcl/sbcl/$bootstrap_version/sbcl-$bootstrap_version-x86-64-linux-binary.tar.bz2"
printf '%s %s\n' "$bootstrap_sha256" "$bootstrap_archive" |
sha256sum --check --status
tar -xjf "$bootstrap_archive" -C /tmp
cd "$bootstrap_source"
env -u SBCL_HOME sh install.sh --prefix="$bootstrap_installation"
test "$(env -u SBCL_HOME "$bootstrap_installation/bin/sbcl" \
--noinform --no-userinit --no-sysinit --non-interactive \
--eval '(write-string (lisp-implementation-version))')" = \
"$bootstrap_version"
curl --fail --location --show-error --retry 3 \
--proto '=https' --tlsv1.2 \
--output "$archive" \
"https://downloads.sourceforge.net/project/sbcl/sbcl/$runtime_version/sbcl-$runtime_version-source.tar.bz2"
printf '%s %s\n' "$(tr -d '[:space:]' < sbcl-source.sha256)" "$archive" |
sha256sum --check --status
tar -xjf "$archive" -C /tmp
cd "$source"
sh make.sh \
--prefix="$runtime_installation" \
--xc-host="$bootstrap_installation/bin/sbcl --no-userinit --no-sysinit"
env -u SBCL_HOME sh install.sh --prefix="$runtime_installation"
test "$("$runtime_installation/bin/sbcl" \
--noinform --no-userinit --no-sysinit --non-interactive \
--eval '(write-string (lisp-implementation-version))')" = \
"$runtime_version"
printf 'AUTOLITH_SBCL=%s/bin/sbcl\n' "$runtime_installation" >> "$GITHUB_ENV"
- name: Install Quicklisp
run: |
curl --fail --location --show-error --retry 3 \
--proto '=https' --tlsv1.2 \
--output /tmp/quicklisp.lisp \
https://beta.quicklisp.org/quicklisp.lisp
"$AUTOLITH_SBCL" --noinform --non-interactive \
--load /tmp/quicklisp.lisp \
--eval '(quicklisp-quickstart:install)'
- name: Build and check Autolith
run: |
./script/bootstrap
./script/check
- name: Build release archive
run: ./script/build-release
- name: Publish release
env:
GH_TOKEN: ${{ github.token }}
run: |
gh release create "$GITHUB_REF_NAME" \
dist/autolith-"$GITHUB_REF_NAME"-x86_64-linux.tar.gz \
dist/autolith-"$GITHUB_REF_NAME"-x86_64-linux.tar.gz.sha256 \
--verify-tag \
--generate-notes \
--title "Autolith ${GITHUB_REF_NAME#v}"