Skip to content

Commit

Permalink
add meson build to the CI
Browse files Browse the repository at this point in the history
  • Loading branch information
andy5995 committed Aug 23, 2022
1 parent 9746192 commit 1864bac
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 4 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -169,3 +169,24 @@ jobs:
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
# run: ctest -C ${{env.BUILD_TYPE}}

meson:
strategy:
fail-fast: false
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Get dependencies
run: |
sudo apt-get -y update && sudo apt-get -y upgrade
sudo mk/linux/setupBuildDeps.sh
sudo apt-get install -y meson
# Using pip is only required if a newer version of meson is required
# sudo apt-get install -y python3-pip python3-setuptools # required for pip
# sudo -H python3 -m pip install meson ninja # version included w
- name: Build
run: |
meson setup builddir
cd builddir
meson compile -v
4 changes: 2 additions & 2 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ project(
'MegaGlest',
['c', 'cpp'],
version: '3.13.0.999',
meson_version : '>= 0.56.0',
meson_version : '>= 0.53.2',
default_options: ['warning_level=0']
)

Expand Down Expand Up @@ -32,7 +32,7 @@ compiler = meson.get_compiler('cpp')
# ],
# language: 'cpp')

subdir('source/shared_lib')
subdir('source/shared_lib')
#subdir('source/glest_game')


Expand Down
16 changes: 14 additions & 2 deletions source/shared_lib/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,19 @@ dep_curl = dependency('libcurl')
dep_sdl = dependency('sdl2')
dep_x11 = dependency('x11')
dep_openal = dependency('openal')
dep_lua = dependency('lua')

# Using simply 'lua' doesn't work on all Linux distributions
# See https://github.com/mesonbuild/meson/issues/4553 for more info
foreach name : ['lua', 'lua5.3', 'lua-5.3', 'lua53']
dep_lua = dependency(name, version: '>=5.3', required: false)
if dep_lua.found()
break
endif
endforeach
if not dep_lua.found()
error('Lua could not be found!')
endif

dep_cppunit = dependency('cppunit')
dep_fribidi = dependency('fribidi')
dep_glib = dependency('glib-2.0')
Expand Down Expand Up @@ -77,7 +89,7 @@ dep_glib = dependency('glib-2.0')
#-lGLEW
#-lminiupnpc
#-lircclient
#-lSDL2main
#-lSDL2main
#-lfribidi
#-lglib-2.0

Expand Down

0 comments on commit 1864bac

Please sign in to comment.