mirror of
https://github.com/roswell/roswell.git
synced 2026-09-10 07:16:17 -04:00
try build static roswell on github actions
This commit is contained in:
parent
21d6359533
commit
32fbad1df8
69
.github/workflows/linux.yml
vendored
Normal file
69
.github/workflows/linux.yml
vendored
Normal file
|
|
@ -0,0 +1,69 @@
|
||||||
|
name: linux
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-18.04
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- lisp: sbcl-bin/2.0.0
|
||||||
|
target: x86-64
|
||||||
|
image: musl64
|
||||||
|
makeopts: musl
|
||||||
|
environment: SET_VERSION
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: setenv
|
||||||
|
run: |
|
||||||
|
echo "$HOME/.roswell/bin" >> $GITHUB_PATH
|
||||||
|
echo "ROSWELL_BRANCH=release" >> $GITHUB_ENV
|
||||||
|
- name: checkenv
|
||||||
|
run: |
|
||||||
|
uname -s
|
||||||
|
uname -m
|
||||||
|
- name: Install Roswell
|
||||||
|
env:
|
||||||
|
LISP: ${{ matrix.lisp }}
|
||||||
|
GITHUB_OAUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
IMAGE: ${{ matrix.image }}
|
||||||
|
run: |
|
||||||
|
sh scripts/install-for-ci.sh
|
||||||
|
ros install snmsts/sn.github
|
||||||
|
if [ -n "$IMAGE" ]; then
|
||||||
|
docker login docker.pkg.github.com -u snmsts -p $GITHUB_OAUTH_TOKEN;
|
||||||
|
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 }}
|
||||||
|
IMAGE: ${{ matrix.image }}
|
||||||
|
MAKEOPTS: ${{ matrix.makeopts }}
|
||||||
|
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 }}
|
||||||
|
MAKEOPTS: ${{ matrix.makeopts }}
|
||||||
|
run: |
|
||||||
|
if [ "$VERSION" = "" ]; then
|
||||||
|
make -f scripts/Makefile latest-version $(MAKEOPTS)-upload
|
||||||
|
else
|
||||||
|
make -f scripts/Makefile $(MAKEOPTS)-upload
|
||||||
|
fi
|
||||||
5
.gitignore
vendored
5
.gitignore
vendored
|
|
@ -3,12 +3,15 @@
|
||||||
*.AppImage
|
*.AppImage
|
||||||
*.fasl
|
*.fasl
|
||||||
.deps
|
.deps
|
||||||
|
.env
|
||||||
src/ros
|
src/ros
|
||||||
src/ros.exe
|
src/ros.exe
|
||||||
src/html_sbcl
|
src/html_sbcl
|
||||||
src/html_sbcl.exe
|
src/html_sbcl.exe
|
||||||
src/gend.h
|
src/gend.h
|
||||||
Makefile
|
/Makefile
|
||||||
|
/src/Makefile
|
||||||
|
/documents/Makefile
|
||||||
Makefile.in
|
Makefile.in
|
||||||
configure
|
configure
|
||||||
config.status
|
config.status
|
||||||
|
|
|
||||||
51
scripts/Makefile
Normal file
51
scripts/Makefile
Normal file
|
|
@ -0,0 +1,51 @@
|
||||||
|
-include .env
|
||||||
|
export $(shell sed 's/=.*//' .env)
|
||||||
|
|
||||||
|
all:
|
||||||
|
echo all
|
||||||
|
|
||||||
|
latest-version:
|
||||||
|
$(eval VERSION := $(shell grep AC_INIT configure.ac|sed 's/.*\[\(.*\)\].*/\1/'))
|
||||||
|
#'
|
||||||
|
checkout:
|
||||||
|
if [ ! "v$(VERSION)" = "v" ];then \
|
||||||
|
git checkout v$(VERSION); \
|
||||||
|
fi
|
||||||
|
|
||||||
|
show:
|
||||||
|
@echo VERSION=$(VERSION) VARIANT=$(VARIANT)
|
||||||
|
|
||||||
|
build-docker:
|
||||||
|
docker build -t docker.pkg.github.com/roswell/roswell/$$(cat ./scripts/Docker/$(IMAGE)/Name) ./scripts/Docker/$(IMAGE)
|
||||||
|
push-docker:
|
||||||
|
docker push docker.pkg.github.com/roswell/roswell/$$(cat ./scripts/Docker/$(IMAGE)/Name);
|
||||||
|
pull-docker:
|
||||||
|
docker pull docker.pkg.github.com/roswell/roswell/$$(cat ./scripts/Docker/$(IMAGE)/Name);
|
||||||
|
docker:
|
||||||
|
docker run \
|
||||||
|
-v `pwd`:/tmp \
|
||||||
|
-e ARCH=$(ARCH) \
|
||||||
|
-e VERSION=$(VERSION) \
|
||||||
|
-e CFLAGS=$(CFLAGS) \
|
||||||
|
-e LINKFLAGS=$(LINKFLAGS) \
|
||||||
|
-e VARIANT=$(VARIANT) \
|
||||||
|
docker.pkg.github.com/roswell/roswell/$$(cat ./scripts/Docker/$(IMAGE)/Name) \
|
||||||
|
bash \
|
||||||
|
-c "cd /tmp;make -f scripts/Makefile $(MAKEOPTS)"
|
||||||
|
upload:
|
||||||
|
echo upload!!! $(FILE)
|
||||||
|
ros install roswell/sbcl_bin
|
||||||
|
ros -s roswell.github.utils -e "(roswell.github.utils:github \"$(FILE)\" \"v$(VERSION)\" \"roswell\" \"roswell\")"
|
||||||
|
|
||||||
|
musl:
|
||||||
|
./bootstrap
|
||||||
|
./configure --enable-maintainer-mode --with-sbcl-bin-variant=$(VARIANT) \
|
||||||
|
LDFLAGS="--static -static-libgcc -static-libstdc++ -static" \
|
||||||
|
LIBS="-lcurl -lbrotlidec-static -lbrotlicommon-static -lnghttp2 -lssl -lcrypto -lz"
|
||||||
|
make
|
||||||
|
make pack
|
||||||
|
|
||||||
|
musl-upload:
|
||||||
|
env FILE=`echo roswell-*.tar.bz2` $(MAKE) -f $(realpath $(firstword $(MAKEFILE_LIST))) upload
|
||||||
|
|
||||||
|
.PHONY: all latest-version checkout show build-docker pull-docker docker upload musl
|
||||||
Loading…
Reference in a new issue