From 9440bdaa7d1c82f14b4604f4f677c180e2912ed0 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Mon, 16 Oct 2023 07:58:29 +0300 Subject: [PATCH 39/40] CI: Add emscripten build See osdn #48853 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 b8abdca156..723b6d21b9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -264,3 +264,18 @@ jobs: - name: build shell: bash run: ./scripts/ci-build.sh tcc + + emsdk: + runs-on: ubuntu-22.04 + steps: + - name: check out Freeciv + uses: actions/checkout@v3.5.2 + - name: install dependencies + run: | + sudo apt-get update + sudo DEBIAN_FRONTEND=noninteractive apt-get -y install \ + meson \ + libtolua-dev + - name: build + shell: bash + run: ./scripts/ci-build.sh emsdk diff --git a/scripts/ci-build.sh b/scripts/ci-build.sh index 2121054a6c..347bb12631 100755 --- a/scripts/ci-build.sh +++ b/scripts/ci-build.sh @@ -174,6 +174,29 @@ make install echo "Freeciv build successful!" ;; +emsdk) +EMSDK_VER=3.1.47 + +( + # Outside source tree + cd .. + + git clone https://github.com/emscripten-core/emsdk + + cd emsdk + ./emsdk install "${EMSDK_VER}" + ./emsdk activate "${EMSDK_VER}" +) + +EMSDKDIR="$(cd ../emsdk && pwd)" + +mkdir build +cd build +../platforms/emscripten/emsbuild.sh "${EMSDKDIR}" + +echo "Freeciv build successful!" +;; + *) # Fetch S3_2 in the background for the ruleset upgrade test git fetch --no-tags --quiet https://github.com/freeciv/freeciv.git S3_2:S3_2 & -- 2.42.0