forked from koji-kojiro/cl-repl
-
Notifications
You must be signed in to change notification settings - Fork 3
76 lines (62 loc) · 2.03 KB
/
CI.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
on: [push, pull_request]
jobs:
build:
name: ${{ matrix.OS }}
strategy:
matrix:
OS:
- macos-13 # Intel
- macos-14 # M1
- ubuntu-24.04
- ubuntu-22.04
- ubuntu-20.04
runs-on: ${{ matrix.OS }}
# NOTE: PWD = GITHUB_WORKSPACE = /home/runner/work/cl-repl/cl-repl = ~/work/cl-repl/cl-repl
# HOME = /home/runner
steps:
- uses: actions/checkout@v4
- name: Install Roswell and SBCL (Ubuntu)
if: startsWith(matrix.OS, 'ubuntu')
run: |
curl -L https://raw.githubusercontent.com/roswell/roswell/master/scripts/install-for-ci.sh | sh
ros install sbcl-bin
- name: Dump lisp image (Ubuntu)
if: startsWith(matrix.OS, 'ubuntu')
run: |
ros run -- \
--load cl-repl.asd \
--eval '(ql:quickload :cl-repl)' \
--eval '(asdf:make :cl-repl)' \
--quit
- name: Install SBCL and quicklisp (macOS)
if: startsWith(matrix.OS, 'macos')
run: |
brew install sbcl
wget https://beta.quicklisp.org/quicklisp.lisp
echo -ne '\n' | \
sbcl --load quicklisp.lisp \
--eval '(quicklisp-quickstart:install)' \
--eval '(ql:add-to-init-file)' \
--quit
- name: Dump lisp image (macOS)
if: startsWith(matrix.OS, 'macos')
run: |
sbcl --load cl-repl.asd \
--eval '(ql:quickload :cl-repl)' \
--eval '(asdf:make :cl-repl)' \
--quit
- name: Set release name
run: echo "CL_REPL_BIN=cl-repl.${{ matrix.OS }}.$(uname -m).bin" >> $GITHUB_ENV
- name: Rename lisp image
run: mv cl-repl ${{ env.CL_REPL_BIN }}
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ env.CL_REPL_BIN }}
path: ${{ env.CL_REPL_BIN }}
compression-level: 0
- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/v')
with:
files: ${{ env.CL_REPL_BIN }}