mirror of
https://github.com/roswell/roswell.git
synced 2026-09-10 07:16:17 -04:00
94 lines
3.2 KiB
YAML
94 lines
3.2 KiB
YAML
name: Linux
|
|
|
|
on:
|
|
push:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
image: [musl64]
|
|
variant: ['', '-musl', '-glibc2.31']
|
|
target: ['x86_64', 'arm64', 'riscv64']
|
|
include:
|
|
# set default docker platform and image suffix.
|
|
- {docker-platform: linux/amd64 ,docker-image-suffix: '', makeopts: musl }
|
|
- {target: arm64 ,docker-platform: linux/arm64 ,docker-image-suffix: 'aarch64' }
|
|
- {target: riscv64 ,docker-platform: linux/riscv64 ,docker-image-suffix: 'riscv64' }
|
|
- {image: deb, makeopts: deb, target: x86-64 ,docker-platform: linux/amd64}
|
|
- {image: pandoc, makeopts: docs, target: x86-64 ,docker-platform: linux/amd64}
|
|
|
|
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 -m
|
|
- name: Install Roswell
|
|
env:
|
|
LISP: sbcl-bin/2.4.0
|
|
GITHUB_OAUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
IMAGE: ${{ matrix.image }}
|
|
run: |
|
|
sh scripts/install-for-ci.sh
|
|
ros install snmsts/sn.github
|
|
- name: Login to GitHub Container Registry
|
|
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
|
|
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 -f scripts/Makefile pull-docker || make -f scripts/Makefile build-docker push-docker
|
|
fi
|
|
- name: build
|
|
env:
|
|
VERSION: ${{ secrets.VERSION }}
|
|
ARCH: ${{ matrix.target }}
|
|
DOCKER: ${{ matrix.docker }}
|
|
SUFFIX: ${{ matrix.suffix }}
|
|
LINKFLAGS: ${{ matrix.linkflags }}
|
|
DOCKER_PLATFORM: ${{ matrix.docker-platform }}
|
|
DOCKER_BUILD_OPTIONS: ${{ matrix.docker-build-options }}
|
|
DOCKER_IMAGE_SUFFIX: ${{ matrix.docker-image-suffix }}
|
|
IMAGE: ${{ matrix.image }}
|
|
MAKEOPTS: ${{ matrix.makeopts }}
|
|
VARIANT: ${{ matrix.variant }}
|
|
run: |
|
|
if [ "$VERSION" = "" ]; then
|
|
make -f scripts/Makefile latest-version docker
|
|
else
|
|
make -f scripts/Makefile docker
|
|
fi
|
|
- name: upload
|
|
env:
|
|
GITHUB_OAUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
VERSION: ${{ secrets.VERSION }}
|
|
ARCH: ${{ matrix.target }}
|
|
SUFFIX: ${{ matrix.suffix }}
|
|
run: |
|
|
if [ "$VERSION" = "" ]; then
|
|
make -f scripts/Makefile latest-version ${{ matrix.makeopts }}-upload
|
|
else
|
|
make -f scripts/Makefile ${{ matrix.makeopts }}-upload
|
|
fi
|