-
Notifications
You must be signed in to change notification settings - Fork 0
184 lines (181 loc) · 8.4 KB
/
linux.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
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' }
- {target: ppc64le,suffix: '-musl1.2.4' }
- {target: ppc64le,suffix: '-musl1.2.2' }
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 zstd sbcl
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