Skip to content

Commit

Permalink
Add NLS CI job.
Browse files Browse the repository at this point in the history
Cmake only since scons fails with an encoding error on Ubuntu 16.04.
  • Loading branch information
Pentarctagon committed Jan 31, 2021
1 parent 8d9eb0c commit bf3db2c
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 6 deletions.
28 changes: 25 additions & 3 deletions .github/workflows/ci-main.yml
Expand Up @@ -39,7 +39,7 @@ jobs:

- name: Ubuntu 1604
run: |
export BRANCH=master
export BRANCH=1.14
export IMAGE=1604
export NLS=false
export TOOL=scons
Expand All @@ -61,7 +61,7 @@ jobs:

- name: Ubuntu 1604
run: |
export BRANCH=master
export BRANCH=1.14
export IMAGE=1604
export NLS=false
export TOOL=scons
Expand Down Expand Up @@ -91,7 +91,7 @@ jobs:

- name: Ubuntu 1604
run: |
export BRANCH=master
export BRANCH=1.14
export IMAGE=1604
export NLS=false
export TOOL=cmake
Expand All @@ -103,6 +103,28 @@ jobs:
export CACHE_DIR=/home/wesnoth-travis/build
./.github/workflows/ci-scripts/ubuntu.sh
translations:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2
with:
submodules: "recursive"

- name: Ubuntu 1604
run: |
export BRANCH=1.14
export IMAGE=1604
export NLS=only
export TOOL=cmake
export CC=clang
export CXX=clang++
export CXX_STD=11
export CFG=Debug
export LTO=false
export CACHE_DIR=/home/wesnoth-travis/build
./.github/workflows/ci-scripts/ubuntu.sh
macos-master-release:
runs-on: macos-10.15

Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/ci-scripts/docker.sh
Expand Up @@ -33,6 +33,27 @@ execute() {

EXIT_VAL=-1

if [ "$NLS" == "only" ]; then
export LANGUAGE=en_US.UTF-8
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8

./utils/travis/check_utf8.sh || exit 1
./utils/travis/utf8_bom_dog.sh || exit 1
echo "Checked for invalid characters"

cmake -DENABLE_NLS=true -DENABLE_GAME=false -DENABLE_SERVER=false -DENABLE_CAMPAIGN_SERVER=false -DENABLE_TESTS=false -DENABLE_POT_UPDATE_TARGET=TRUE
make update-po4a-man || exit 1
echo "Ran umake pdate-po4a-man"
make update-po4a-manual || exit 1
echo "Ran make update-po4a-manual"
make pot-update || exit 1
echo "Ran make pot-update"
make mo-update || exit 1
echo "Ran make mo-update"
exit 0
fi

if [ "$TOOL" == "cmake" ]; then
export CCACHE_MAXSIZE=3000M
export CCACHE_COMPILERCHECK=content
Expand Down
6 changes: 5 additions & 1 deletion utils/dockerbuilds/travis/Dockerfile-base-1604-1.14
Expand Up @@ -13,10 +13,14 @@ RUN apt install -y -qq libsdl2-2.0-0 libsdl2-dev libsdl2-image-2.0-0 libsdl2-ima
# make tzdata not prompt for a timezone
ENV DEBIAN_FRONTEND=noninteractive

# translations
RUN apt install -y -qq asciidoc dos2unix xsltproc po4a docbook-xsl language-pack-en
RUN locale-gen en_US.UTF-8

# misc
RUN apt install -y -qq libpng12-0 libpng12-dev libreadline6-dev libvorbis-dev libcairo2 libcairo2-dev libpango-1.0-0 libpango1.0-dev libfribidi0 libfribidi-dev libbz2-1.0 libbz2-dev zlib1g zlib1g-dev libpangocairo-1.0-0 libssl-dev expect-dev

# programs
RUN apt install -y -qq openssl gdb xvfb bzip2 git scons cmake make ccache gcc g++ clang python3
RUN apt install -y -qq openssl gdb xvfb bzip2 git scons cmake make ccache gcc g++ clang python3 moreutils

WORKDIR /home/wesnoth-travis
3 changes: 1 addition & 2 deletions utils/travis/check_utf8.sh
Expand Up @@ -9,5 +9,4 @@ find src/ -type f -print0 | xargs -0 isutf8 --
find data/ -not -name "*.png" -not -name "*.ogg" -not -name "*.jpg" -not -name "*.wav" -not -name "*.gif" -not -name "*.xcf" -not -name "*.bin" \
-not -name "test_cve_2018_1999023_2.cfg" -type f -print0 | xargs -0 isutf8 --
find po/ -type f -print0 | xargs -0 isutf8 --
isutf8 changelog
isutf8 RELEASE_NOTES
isutf8 changelog.md

0 comments on commit bf3db2c

Please sign in to comment.