Skip to content

Commit

Permalink
ci: use CMake on all platforms
Browse files Browse the repository at this point in the history
Signed-off-by: Kyle Evans <[email protected]>
  • Loading branch information
kevans91 committed Jan 23, 2024
1 parent 007562f commit 030b9d8
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 25 deletions.
9 changes: 6 additions & 3 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@ build_task:
freebsd_instance:
image: freebsd-13-2-release-amd64
setup_script:
sudo pkg install -y lua54
sudo pkg install -y lua54 cmake
configure_script:
- mkdir build
- cd build && cmake ..
build_script:
env ORCHLUA_PATH=/usr/local/share/orch make
make -C build
test_script:
make check
make -C build check
28 changes: 8 additions & 20 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- os: ubuntu-22.04
- os: macos-latest
lua: 5.4
pkgs: bmake coreutils [email protected]
pkgs: cmake coreutils [email protected]
exclude:
- os: ubuntu-20.04
lua: 5.4
Expand All @@ -36,29 +36,17 @@ jobs:
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
sudo apt-get -yq --no-install-suggests --no-install-recommends install cmake 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) (macOS)
if: runner.os == 'macOS'
- name: configure
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
mkdir build
cd build && cmake ..
- name: build orch(1)
run: make -C build
- name: Run self-tests
run: |
bmake check
run: make -C build check
8 changes: 6 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,12 @@ jobs:
- name: install system packages
run: |
sudo apt-get update --quiet || true
sudo apt-get -yq --no-install-suggests --no-install-recommends install bmake luarocks
sudo apt-get -yq --no-install-suggests --no-install-recommends install cmake luarocks
- name: install lua packages
run: sudo luarocks install luacheck
- name: configure
run: |
mkdir build
cd build && cmake ..
- name: run linter
run: bmake lint
run: make -C build lint

0 comments on commit 030b9d8

Please sign in to comment.