Skip to content

FreeBSD

FreeBSD #81

Workflow file for this run

name: FreeBSD
on:
schedule:
- cron: '5 0 * * *'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
env:
UNAME: ${{ matrix.os }}
VERSION: ${{ secrets.VERSION }}
ARCH: ${{ matrix.target }}
SUFFIX: ${{ matrix.suffix }}
LINKFLAGS: ${{ matrix.linkflags }}
ROSWELL_BRANCH: master
SBCL_PATCH: ${{ matrix.sbclpatch }}
SBCL_OPTIONS: ${{ matrix.sbcloptions }}
GITHUB_OAUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
strategy:
fail-fast: false
matrix:
suffix: ['', '-13.2', '-13.3', '-14.0', '-14.1']
target: ['x86-64', 'x86', 'arm64']
include:
# default lisp used is sbcl-bin/2.4.8
- lisp: 'sbcl-bin/2.4.8'
os: freebsd
- { suffix: '' ,release: '13.3'}
- { suffix: '-13.2',release: '13.2'}
- { suffix: '-13.3',release: '13.3'}
- { suffix: '-14.0',release: '14.0'}
- { suffix: '-14.1',release: '14.1'}
environment: SET_VERSION
steps:
- uses: actions/checkout@v4
- name: setenv
run: |
echo "$HOME/.roswell/bin" >> $GITHUB_PATH
echo "ROSWELL_BRANCH=release" >> $GITHUB_ENV
- name: Install Roswell
env:
LISP: ${{ matrix.lisp }}
GITHUB_OAUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
curl -L https://raw.githubusercontent.com/roswell/roswell/master/scripts/install-for-ci.sh | sh
ros install snmsts/sn.github roswell/sbcl_bin
make latest-version zstd sbcl
sed -i "s/-lzstd/-Wl,-Bstatic -lzstd -Wl,-Bdynamic/g" sbcl/src/runtime/Config.*-bsd
- name: check uploaded
id: check_uploaded
env:
VERSION: ${{ secrets.VERSION }}
ARCH: ${{ matrix.target }}
SUFFIX: ${{ matrix.suffix }}
run: make latest-version upload-archive-p
continue-on-error: true
- name: Config on ${{ matrix.os }}
if: ${{ matrix.target != 'x86' && ( steps.check_uploaded.outcome == 'failure' || github.event_name != 'schedule' ) }}
uses: cross-platform-actions/[email protected]
with:
environment_variables: VERSION ARCH IMAGE SUFFIX LINKFLAGS GH_USER GH_REPO GITHUB_OAUTH_TOKEN
operating_system: ${{ matrix.os }}
architecture: ${{ matrix.target == 'x86' && 'x86-64' || matrix.target }}
version: ${{ matrix.release }}
shell: bash
run: |
uname -a
freebsd-version
whoami
pwd
sudo env IGNORE_OSVERSION=yes pkg update -f
sudo pkg install -y bash roswell autoconf texinfo perl5 gmake gcc libffi git findutils
SBCL_OPTIONS=$SBCL_OPTIONS LISP_IMPL='ros run' gmake latest-version compile-config
- name: make-host-1
if: ${{ matrix.target != 'x86' && ( steps.check_uploaded.outcome == 'failure' || github.event_name != 'schedule' ) }}
run: |
bash -c "cd sbcl;sh make-host-1.sh"
- name: build-runtime on ${{ matrix.os }}
if: ${{ matrix.target != 'x86' && ( steps.check_uploaded.outcome == 'failure' || github.event_name != 'schedule' ) }}
uses: cross-platform-actions/[email protected]
with:
environment_variables: VERSION ARCH IMAGE SUFFIX LINKFLAGS GH_USER GH_REPO GITHUB_OAUTH_TOKEN
operating_system: ${{ matrix.os }}
architecture: ${{ matrix.target == 'x86' && 'x86-64' || matrix.target }}
version: ${{ matrix.release }}
shell: bash
run: |
sudo bash -c 'cd zstd/lib; gmake PREFIX=/usr CFLAGS="-fPIC" install-includes install-static clean'
cd sbcl;sh make-target-1.sh
- name: make-host2
if: ${{ matrix.target != 'x86' && ( steps.check_uploaded.outcome == 'failure' || github.event_name != 'schedule' ) }}
run: |
bash -c "cd sbcl;sh make-host-2.sh"
- name: build-target2 and contrib on ${{ matrix.os }}
if: ${{ matrix.target != 'x86' && ( steps.check_uploaded.outcome == 'failure' || github.event_name != 'schedule' ) }}
uses: cross-platform-actions/[email protected]
with:
environment_variables: VERSION ARCH IMAGE SUFFIX LINKFLAGS GH_USER GH_REPO GITHUB_OAUTH_TOKEN
operating_system: ${{ matrix.os }}
architecture: ${{ matrix.target }}
version: ${{ matrix.release }}
shell: bash
run: |
bash -c "cd sbcl;sh make-target-2.sh && sh make-target-contrib.sh"
gmake compile-9
- name: FreeBSD on x86
if: ${{ matrix.target == 'x86' && ( steps.check_uploaded.outcome == 'failure' || github.event_name != 'schedule' ) }}
id: test
uses: vmactions/freebsd-vm@v1
with:
release: ${{ matrix.release }}
envs: 'VERSION ARCH IMAGE SUFFIX LINKFLAGS GH_USER GH_REPO GITHUB_OAUTH_TOKEN'
usesh: true
prepare: |
pkg install -y bash roswell autoconf texinfo perl5 gmake gcc libffi git
ros install ${{ matrix.lisp }}
ros install snmsts/sn.github roswell/sbcl_bin
run: |
bash -c 'cd zstd/lib; gmake PREFIX=/usr LIBDIR=/usr/lib32 CFLAGS="-m32 -fPIC" install-includes install-static clean'
gmake latest-version compile archive;
- if: ${{ steps.check_uploaded.outcome == 'failure' || github.event_name != 'schedule' }}
name: upload
env:
GITHUB_OAUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VERSION: ${{ secrets.VERSION }}
ARCH: ${{ matrix.target }}
IMAGE: ${{ matrix.image }}
SUFFIX: ${{ matrix.suffix }}
LINKFLAGS: ${{ matrix.linkflags }}
DOCKER_PLATFORM: ${{ matrix.docker-platform }}
DOCKER_IMAGE_SUFFIX: ${{ matrix.docker-image-suffix }}
run: |
OS=${{ matrix.os }} make latest-version archive
ls
env FILE=`ls *.bz2` make latest-version upload-archive