Skip to content

Build and release

Build and release #243

Workflow file for this run

name: Build and release
on:
workflow_dispatch:
schedule:
- cron: "15 1 * * *"
jobs:
build:
name: Build
runs-on: windows-latest
steps:
# SBCL on Windows does not support CRLF.
- name: Ensure LF line endings
run: git config --global core.autocrlf input
- name: Check out sbcl-builds
uses: actions/checkout@v4
with:
path: sbcl-builds
- name: Check out SBCL mirror
uses: actions/checkout@v4
with:
repository: sbcl/sbcl
path: sbcl-source
# Make sure we don't do a shallow clone.
# We need the full commit history, as this is required by 'git describe',
# which is called by generate-version.sh.
fetch-depth: 0
- name: Set up MSYS2
uses: msys2/setup-msys2@v2
with:
msystem: UCRT64
update: true
install: >-
make
git
zip
unzip
mingw-w64-ucrt-x86_64-gcc
mingw-w64-ucrt-x86_64-github-cli
- name: Set environment variables
shell: msys2 {0}
run: |
echo "SBCL_HASH=$(cd sbcl-source && git rev-parse --short HEAD)" >> $GITHUB_ENV
echo "SBCL_HOME=$GITHUB_WORKSPACE/sbcl-builds/lib/sbcl" >> $GITHUB_ENV
- name: Build SBCL
shell: msys2 {0}
run: |
echo CURRENT DIR: $(pwd), WORKSPACE DIR: $GITHUB_WORKSPACE, WIX DIR: $WIX
cd sbcl-builds
unzip sbcl-2.4.1.zip
cd ../sbcl-source
sh make.sh --prefix=../build --xc-host="../sbcl-builds/bin/sbcl.exe --no-userinit --no-sysinit"
unset SBCL_HOME
sh install.sh
cd "$GITHUB_WORKSPACE"/build
zip -r sbcl-ucrt64-$SBCL_HASH.zip *
- name: Build MSI
shell: msys2 {0}
run: |
cd sbcl-source
sh make-windows-installer.sh
- name: Release
shell: msys2 {0}
run: >
cd sbcl-builds &&
gh release create SBCL-$(date +"%Y.%m.%d")-$SBCL_HASH
--notes "Source: https://github.com/sbcl/sbcl"
../build/sbcl-ucrt64-$SBCL_HASH.zip
../sbcl-source/output/sbcl-$(cat ../sbcl-source/output/version.txt).msi
env:
GITHUB_TOKEN: ${{ secrets.SBCL_BUILDS_TOKEN }}