From 8ca3e9f8ad9f78e4b41cc1297c6f21fb30c4cab4 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sat, 6 Aug 2022 13:24:36 +0300 Subject: [PATCH 49/49] CI: Add mac-meson build See osdn #45156 Signed-off-by: Marko Lindqvist --- .github/workflows/ci.yml | 15 +++++++++++++++ scripts/ci-build.sh | 23 +++++++++++++++++++++++ 2 files changed, 38 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ac6e458cc7..b02ec589b8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -79,6 +79,21 @@ jobs: - name: build shell: bash run: ./scripts/ci-build.sh os_x + mac-meson: + runs-on: macos-12 + steps: + - name: check out Freeciv + uses: actions/checkout@v3 + - name: install dependencies + run: | + brew install \ + meson \ + lua@5.4 \ + gtk+3 \ + sdl2_mixer + - name: build + shell: bash + run: ./scripts/ci-build.sh mac-meson normal: runs-on: ubuntu-22.04 steps: diff --git a/scripts/ci-build.sh b/scripts/ci-build.sh index 3408c48adc..94955daa7f 100755 --- a/scripts/ci-build.sh +++ b/scripts/ci-build.sh @@ -77,6 +77,29 @@ make -j$(sysctl -n hw.logicalcpu) make install ;; +"mac-meson") + +export CPPFLAGS="-I$(brew --prefix readline)/include" +export LDFLAGS="-L$(brew --prefix icu4c)/lib -L$(brew --prefix readline)/lib" +export PKG_CONFIG_PATH="$(brew --prefix icu4c)/lib/pkgconfig" + +mkdir build +cd build +meson .. \ + -Dack_experimental=true \ + -Ddebug=false \ + -Druledit=false \ + -Dsyslua=true \ + -Dclients=gtk3.22 \ + -Dfcmp=gtk3 \ + || (let meson_exit_status=$? \ + && echo "meson.log:" \ + && cat meson-logs/meson-log.txt \ + && exit $meson_exit_status) +ninja +ninja install +;; + "clang_debug") # Configure and build Freeciv mkdir build -- 2.35.1