Linux #1451
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Linux | |
on: | |
schedule: | |
- cron: '0 1 * * *' | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
suffix: ['', '-glibc2.39', '-glibc2.31', '-glibc2.23', '-glibc2.19', '-glibc2.10', '-musl', '-musl1.2.4', '-musl1.2.2', '-musl1.1'] | |
target: ['x86-64', 'x86', 'arm64', 'ppc64le'] | |
exclude: | |
- {suffix: -glibc2.10,target: arm64} | |
- {suffix: -glibc2.10,target: ppc64le} | |
- {suffix: -musl1.1,target: x86-64} | |
- {suffix: -musl1.1,target: arm64} | |
- {suffix: -musl1.1,target: ppc64le} | |
include: | |
# default lisp used is sbcl-bin/2.4.0 | |
- lisp: 'sbcl-bin/2.4.0' | |
# suffix default image | |
- {suffix: '' ,image: glibc2.23 } | |
# riscv64 target don't have trusty release. | |
#-{suffix: '',target: riscv64,image: 'glibc2.31'} | |
- {suffix: '-glibc2.10',image: glibc2.10 } | |
- {suffix: '-glibc2.19',image: glibc2.19 } | |
- {suffix: '-glibc2.23',image: glibc2.23 } | |
- {suffix: '-glibc2.31',image: glibc2.31 } | |
- {suffix: '-glibc2.39',image: glibc2.39 } | |
- {suffix: '-musl',image: musl1.2.2 } | |
- {suffix: '-musl1.2.4',image: musl1.2.4 } | |
- {suffix: '-musl1.2.2',image: musl1.2.2 } | |
- {suffix: '-musl1.1',image: musl1.1.24 } | |
# set default docker platform and image suffix. | |
- {docker-platform: linux/amd64 ,docker-image-suffix: ''} | |
- {target: arm64 ,docker-platform: linux/arm64 ,docker-image-suffix: 'aarch64',cross: yes} | |
- {target: ppc64le,docker-platform: linux/ppc64le,docker-image-suffix: 'ppc64le',cross: yes} | |
#-{target: riscv64,docker-platform: linux/riscv64,docker-image-suffix: 'riscv64'} | |
# with suffix glibc2.10 require some treat. | |
- {suffix: '-glibc2.10',linkflags: '-lrt' } | |
- {suffix: '-glibc2.10',target: x86-64,image: glibc2.10-64 } | |
# musl suffix | |
- {suffix: '-musl' ,target: x86,docker-platform: linux/386,docker-build-options: '--build-arg WRAPPER=linux32',docker-image-suffix: 'x86' } | |
- {suffix: '-musl1.2.4',target: x86,docker-platform: linux/386,docker-build-options: '--build-arg WRAPPER=linux32',docker-image-suffix: 'x86' } | |
- {suffix: '-musl1.2.2',target: x86,docker-platform: linux/386,docker-build-options: '--build-arg WRAPPER=linux32',docker-image-suffix: 'x86' } | |
- {suffix: '-musl1.1' ,target: x86,docker-platform: linux/386,docker-build-options: '--build-arg WRAPPER=linux32',docker-image-suffix: 'x86' } | |
- {target: ppc64le,suffix: '-musl' ,sbclpatch: "20241001_ppc64linuxmusl" } | |
- {target: ppc64le,suffix: '-musl1.2.4',sbclpatch: "20241001_ppc64linuxmusl" } | |
- {target: ppc64le,suffix: '-musl1.2.2',sbclpatch: "20241001_ppc64linuxmusl" } | |
environment: SET_VERSION | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
with: | |
image: tonistiigi/binfmt:qemu-v8.1.5 | |
- name: setenv | |
run: | | |
echo "$HOME/.roswell/bin" >> $GITHUB_PATH | |
echo "ROSWELL_BRANCH=release" >> $GITHUB_ENV | |
- name: checkenv | |
run: | | |
uname -s | |
uname -m | |
echo $ROSWELL_INSTALL_DIR | |
echo $ROSWELL_BRANCH | |
- name: Install Roswell | |
env: | |
LISP: ${{ matrix.lisp }} | |
run: | | |
curl -L https://raw.githubusercontent.com/roswell/roswell/master/scripts/install-for-ci.sh | sh | |
ros install snmsts/sn.github roswell/sbcl_bin | |
- name: check uploaded | |
id: check_uploaded | |
env: | |
VERSION: ${{ secrets.VERSION }} | |
ARCH: ${{ matrix.target }} | |
IMAGE: ${{ matrix.image }} | |
SUFFIX: ${{ matrix.suffix }} | |
run: make latest-version upload-archive-p | |
continue-on-error: true | |
- name: Login to GitHub Container Registry | |
if: ${{ steps.check_uploaded.outcome == 'failure' || github.event_name != 'schedule' }} | |
uses: docker/login-action@v3 | |
with: | |
registry: docker.pkg.github.com | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: pull or build&push docker image | |
if: ${{ steps.check_uploaded.outcome == 'failure' || github.event_name != 'schedule' }} | |
env: | |
DOCKER_PLATFORM: ${{ matrix.docker-platform }} | |
DOCKER_BUILD_OPTIONS: ${{ matrix.docker-build-options }} | |
DOCKER_IMAGE_SUFFIX: ${{ matrix.docker-image-suffix }} | |
IMAGE: ${{ matrix.image }} | |
run: | | |
if [ -n "$IMAGE" ]; then | |
make pull-docker || make build-docker push-docker | |
fi | |
- name: build & upload | |
if: ${{ matrix.cross != 'yes' && ( steps.check_uploaded.outcome == 'failure' || github.event_name != 'schedule' ) }} | |
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 }} | |
SBCL_PATCH: ${{ matrix.sbclpatch }} | |
run: | | |
if [ "$VERSION" = "" ]; then | |
make latest-version zstd sbcl docker upload-archive; | |
else | |
make zstd sbcl docker upload-archive; | |
fi | |
- name: config | |
if: ${{ matrix.cross == 'yes' && ( steps.check_uploaded.outcome == 'failure' || github.event_name != 'schedule' ) }} | |
env: | |
VERSION: ${{ secrets.VERSION }} | |
IMAGE: ${{ matrix.image }} | |
SUFFIX: ${{ matrix.suffix }} | |
LINKFLAGS: ${{ matrix.linkflags }} | |
DOCKER_PLATFORM: ${{ matrix.docker-platform }} | |
DOCKER_IMAGE_SUFFIX: ${{ matrix.docker-image-suffix }} | |
DOCKER_ACTION: bash ./tools-for-build/${{ matrix.image }}/setup;make latest-version compile-config | |
SBCL_PATCH: ${{ matrix.sbclpatch }} | |
run: | | |
make latest-version sbcl zstd | |
ARCH="" make latest-version docker | |
- name: make-host-1 | |
if: ${{ matrix.cross == 'yes' && ( steps.check_uploaded.outcome == 'failure' || github.event_name != 'schedule' ) }} | |
run: | | |
sudo bash -c "cd sbcl;sh make-host-1.sh" | |
- name: build-runtime | |
if: ${{ matrix.cross == 'yes' && ( steps.check_uploaded.outcome == 'failure' || github.event_name != 'schedule' ) }} | |
env: | |
VERSION: ${{ secrets.VERSION }} | |
IMAGE: ${{ matrix.image }} | |
SUFFIX: ${{ matrix.suffix }} | |
LINKFLAGS: ${{ matrix.linkflags }} | |
DOCKER_PLATFORM: ${{ matrix.docker-platform }} | |
DOCKER_IMAGE_SUFFIX: ${{ matrix.docker-image-suffix }} | |
DOCKER_ACTION: bash ./tools-for-build/${{ matrix.image }}/setup;cd sbcl;sh make-target-1.sh | |
run: | | |
make latest-version docker | |
- name: make-host2 | |
if: ${{ matrix.cross == 'yes' && ( steps.check_uploaded.outcome == 'failure' || github.event_name != 'schedule' ) }} | |
run: | | |
sudo bash -c "cd sbcl;sh make-host-2.sh" | |
- name: build-target2 and contrib | |
if: ${{ matrix.cross == 'yes' && ( steps.check_uploaded.outcome == 'failure' || github.event_name != 'schedule' ) }} | |
env: | |
VERSION: ${{ secrets.VERSION }} | |
IMAGE: ${{ matrix.image }} | |
SUFFIX: ${{ matrix.suffix }} | |
LINKFLAGS: ${{ matrix.linkflags }} | |
DOCKER_PLATFORM: ${{ matrix.docker-platform }} | |
DOCKER_IMAGE_SUFFIX: ${{ matrix.docker-image-suffix }} | |
DOCKER_ACTION: bash ./tools-for-build/${{ matrix.image }}/setup;cd sbcl;sh make-target-2.sh && sh make-target-contrib.sh;cd ..;make compile-9 | |
run: | | |
make latest-version docker | |
- name: upload | |
if: ${{ matrix.cross == 'yes' && ( steps.check_uploaded.outcome == 'failure' || github.event_name != 'schedule' ) }} | |
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: | | |
make latest-version archive | |
ls | |
env FILE=`ls *.bz2` make latest-version upload-archive |