2022-06-26 14:38:36 +00:00
|
|
|
name: C/C++ CI
|
|
|
|
|
|
|
|
on: [push]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build-linux:
|
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
steps:
|
2022-06-26 17:41:13 +00:00
|
|
|
- uses: actions/checkout@v3
|
2022-06-26 14:38:36 +00:00
|
|
|
- name: apt
|
2022-06-26 19:53:16 +00:00
|
|
|
run: sudo apt update && sudo apt install bison flex ninja-build lua5.1 lua-posix
|
2022-06-26 14:38:36 +00:00
|
|
|
- name: make
|
2022-06-26 19:43:10 +00:00
|
|
|
run: make LUA=lua
|
2022-06-26 14:38:36 +00:00
|
|
|
|
|
|
|
build-macos:
|
|
|
|
runs-on: macos-latest
|
|
|
|
steps:
|
2022-06-26 17:41:13 +00:00
|
|
|
- uses: actions/checkout@v3
|
2022-06-26 14:38:36 +00:00
|
|
|
- name: brew
|
2022-06-26 19:58:57 +00:00
|
|
|
run: brew install ninja lua@5.1 luarocks
|
2022-06-26 19:43:10 +00:00
|
|
|
- name: luarocks
|
2022-06-26 19:43:57 +00:00
|
|
|
run: |
|
2022-06-26 20:46:43 +00:00
|
|
|
luarocks install --lua-version 5.1 luaposix 33.0.0-1
|
2022-06-26 14:38:36 +00:00
|
|
|
- name: make
|
2022-06-27 17:18:08 +00:00
|
|
|
run: |
|
|
|
|
eval $(luarocks --lua-version 5.1 path)
|
|
|
|
make LUA=/usr/local/bin/lua5.1
|
2022-06-26 14:38:36 +00:00
|
|
|
|
2022-06-26 17:41:13 +00:00
|
|
|
build-windows:
|
|
|
|
runs-on: windows-latest
|
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
shell: msys2 {0}
|
|
|
|
steps:
|
|
|
|
- uses: msys2/setup-msys2@v2
|
|
|
|
with:
|
|
|
|
update: true
|
|
|
|
msystem: MINGW32
|
|
|
|
install: >-
|
|
|
|
make
|
|
|
|
mingw-w64-i686-gcc
|
2022-06-27 20:21:28 +00:00
|
|
|
mingw-w64-x86_64-lua51
|
|
|
|
mingw-w64-x86_64-lua-luarocks
|
2022-06-26 17:41:13 +00:00
|
|
|
ninja
|
|
|
|
bison
|
|
|
|
flex
|
|
|
|
zip
|
2022-06-26 19:43:10 +00:00
|
|
|
- name: luarocks
|
2022-06-26 19:43:57 +00:00
|
|
|
run: |
|
2022-06-27 20:21:28 +00:00
|
|
|
git config --global url."https://".insteadOf git://
|
|
|
|
/mingw64/bin/luarocks --lua-version 5.1 install luaposix 33.0.0-1
|
2022-06-26 17:41:13 +00:00
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: build
|
|
|
|
run: |
|
2022-06-27 20:21:28 +00:00
|
|
|
make LUA=/mingw64/bin/lua5.1
|
2022-06-26 17:41:13 +00:00
|
|
|
|