Update .gitlab-ci.yml file

Try to build i686 linux binaries
This commit is contained in:
Alam Ed Arias 2023-10-12 12:55:10 +00:00
parent 567565968d
commit 50c32451fb

View file

@ -16,13 +16,18 @@
# This specific template is located at:
# https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Getting-Started.gitlab-ci.yml
stages: # List of stages for jobs, and their order of execution
- build
.default_Scripts: &ccache
export CCACHE_BASEDIR="$PWD";export CCACHE_DIR="$PWD/ccache";export CCACHE_COMPILERCHECK=content
.ccache_Scripts: &ccache
- export CCACHE_BASEDIR="$PWD"
- export CCACHE_DIR="$PWD/ccache"
- export CCACHE_COMPILERCHECK=content
.aptcache_Scripts: &aptcache
- export APT_CACHE_DIR=`pwd`/apt-cache
- mkdir --parents --verbose $APT_CACHE_DIR/partial/
.job_template: &job_build # This job runs in the build stage, which runs first.
stage: build
@ -43,18 +48,34 @@ stages: # List of stages for jobs, and their order of execution
- apt-cache
unprotect: true
before_script:
- dpkg --add-architecture i386
- dpkg --add-architecture amd64
- apt-get update
- export APT_CACHE_DIR=`pwd`/apt-cache
- mkdir --parents --verbose $APT_CACHE_DIR/partial/
- *aptcache
- apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes make git ccache
- apt-get --option dir::cache::archives="$APT_CACHE_DIR" autoclean
- *ccache
- ccache --zero-stats || true
- ccache --show-stats || true
after_script:
- *aptcache
- apt-get --option dir::cache::archives="$APT_CACHE_DIR" autoclean
- *ccache
- ccache --show-stats
build-i686-linux-gnu:
<<: *job_build
artifacts:
paths:
- "bin/lsdl2srb2*"
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-i686"
script:
- *aptcache
- apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc-i686-linux-gnu
- apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes libsdl2-mixer-dev:i386 libpng-dev:i386 libcurl4-openssl-dev:i386 libgme-dev:i386 libopenmpt-dev:i386
- export CC="i686-linux-gnu-gcc"
- *ccache
- make --directory=src CCACHE=1 LINUX=1
build-x86_64-linux-gnu:
<<: *job_build
artifacts:
@ -62,10 +83,11 @@ build-x86_64-linux-gnu:
- "bin/lsdl2srb2*"
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-x86-64"
script:
- *ccache
- apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes libsdl2-mixer-dev libpng-dev libcurl4-openssl-dev libgme-dev libopenmpt-dev gcc
- apt-get --option dir::cache::archives="$APT_CACHE_DIR" autoclean
- *aptcache
- apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc-x86-64-linux-gnu
- apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes libsdl2-mixer-dev:amd64 libpng-dev:amd64 libcurl4-openssl-dev:amd64 libgme-dev:amd64 libopenmpt-dev:amd64
- export CC="x86_64-linux-gnu-gcc"
- *ccache
- make --directory=src CCACHE=1 LINUX64=1
build-i686-w64-mingw32:
@ -75,9 +97,9 @@ build-i686-w64-mingw32:
- "bin/srb2win.exe*"
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win32"
script:
- *ccache
- *aptcache
- apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc-mingw-w64-i686-win32
- apt-get --option dir::cache::archives="$APT_CACHE_DIR" autoclean
- *ccache
- make --directory=src CCACHE=1 MINGW=1 PREFIX=i686-w64-mingw32
build-x86_64-w64-mingw32:
@ -87,7 +109,7 @@ build-x86_64-w64-mingw32:
- "bin/srb2win64.exe*"
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win64"
script:
- *ccache
- *aptcache
- apt-get --option dir::cache::archives="$APT_CACHE_DIR" install --no-install-recommends --yes gcc-mingw-w64-x86-64-win32
- apt-get --option dir::cache::archives="$APT_CACHE_DIR" autoclean
- *ccache
- make --directory=src CCACHE=1 MINGW64=1 PREFIX=x86_64-w64-mingw32