Skip to content

Commit

Permalink
CI: Add emsdk build
Browse files Browse the repository at this point in the history
Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
  • Loading branch information
cazfi committed Oct 15, 2023
1 parent 9699637 commit 4b32adf
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -264,3 +264,17 @@ 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
- name: build
shell: bash
run: ./scripts/ci-build.sh emsdk
20 changes: 20 additions & 0 deletions scripts/ci-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,26 @@ make install
echo "Freeciv build successful!"
;;

emsdk)
EMSDK_VER=3.1.47

git clone https://github.com/emscripten-core/emsdk

(
cd emsdk
./emsdk install "${EMSDK_VER}"
./emsdk activate "${EMSDK_VER}"
)

EMSDKDIR="$(pwd)/emsdk"

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 &
Expand Down

0 comments on commit 4b32adf

Please sign in to comment.