-
Notifications
You must be signed in to change notification settings - Fork 1
65 lines (63 loc) · 2.04 KB
/
build.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
name: Build orch
on:
push:
branches: ['*']
pull_request:
types: [opened, reopened, edited, synchronize]
permissions:
contents: read
jobs:
build:
name: Build ${{ matrix.os }} (lua${{ matrix.lua }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, ubuntu-22.04, macos-latest]
lua: [5.2, 5.3, 5.4]
include:
- os: ubuntu-20.04
- os: ubuntu-22.04
- os: macos-latest
lua: 5.4
pkgs: bmake coreutils [email protected]
exclude:
- os: ubuntu-20.04
lua: 5.4
- os: macos-latest
lua: 5.2
- os: macos-latest
lua: 5.3
steps:
- name: checkout
uses: actions/checkout@v4
- name: install system packages (Ubuntu)
if: runner.os == 'Linux'
run: |
sudo apt-get update --quiet || true
sudo apt-get -yq --no-install-suggests --no-install-recommends install bmake liblua${{ matrix.lua }}-dev
- name: install system packages (macOS)
if: runner.os == 'macOS'
run: |
brew update --quiet || true
brew install ${{ matrix.pkgs }}
- name: build orch(1) (Ubuntu)
if: runner.os == 'Linux'
run: |
env ORCHLUA_PATH=/usr/local/share/orch LUA_INCDIR=/usr/include/lua${{ matrix.lua }} \
LUA_LIB=-llua${{ matrix.lua }} bmake
- name: build orch(1)
run: |
if [ -d /opt/homebrew ]; then
lua_incdir="/opt/homebrew/Cellar/lua/5.4.6/include/lua"
lua_lib="-L/opt/homebrew/Cellar/lua/5.4.6/lib -llua5.4"
else
lua_incdir="/usr/local/Cellar/lua/5.4.6/include/lua"
lua_lib="-L/usr/local/Cellar/lua/5.4.6/lib -llua5.4"
fi
env ORCHLUA_PATH=/usr/local/share/orch LUA_INCDIR="${lua_incdir}" \
LUA_LIB="${lua_lib}" bmake
- name: Run self-tests
run: |
sudo mkdir -p /usr/local/share/orch
sudo cp orch.lua /usr/local/share/orch
sh tests/basic_test.sh