Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI fixes and updates #1291

Merged
merged 9 commits into from
May 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ build_windows_task:
matrix:
- BUILD_CONFIG: Release
- BUILD_CONFIG: Debug
AGS_DIRECTX_LIB: C:\Lib\DirectX
AGS_LIBOGG_LIB: C:\Lib\Xiph
AGS_LIBTHEORA_LIB: C:\Lib\Xiph
AGS_LIBVORBIS_LIB: C:\Lib\Xiph
Expand Down Expand Up @@ -175,11 +174,8 @@ build_editor_task:
matrix:
- BUILD_CONFIG: Release
- BUILD_CONFIG: Debug
AGS_DIRECTX_LIB: C:\Lib\DirectX
AGS_SDL_INCLUDE: C:\Lib\SDL2\include
AGS_SDL_SOUND_INCLUDE: C:\Lib\SDL_sound\src
AGS_SDL_LIB: C:\Lib\SDL2\lib\x86
AGS_SDL_SOUND_LIB: C:\Lib\SDL_sound\build\Release
nuget_packages_cache:
folder: Solutions\packages
fingerprint_script: type Editor\AGS.Editor\packages.config
Expand All @@ -190,6 +186,7 @@ build_editor_task:
copy C:\Lib\irrKlang\*.dll Editor\References\ &&
cd Solutions &&
cmd /v:on /c "set "LIB=C:\Program Files (x86)\Windows Kits\8.0\Lib\Win8\um\x86;!LIB!" &&
set "PATH=C:\Program Files (x86)\Windows Kits\8.1\bin\x86;!PATH!" &&
msbuild AGS.Editor.Full.sln /p:PlatformToolset=v140 /p:Configuration=%BUILD_CONFIG% /p:Platform="Mixed Platforms" /maxcpucount /nologo"
ags_editor_pdb_artifacts:
path: Solutions/.build/*/*.pdb
Expand Down Expand Up @@ -240,8 +237,8 @@ editor_packaging_task:
copy %SYSTEMDRIVE%\Redist\vc_redist.x86.exe Windows\Installer\Source\Redist\
get_editor_script: >
mkdir Windows\Installer\Source\Editor &&
curl -fLSs "https://api.cirrus-ci.com/v1/artifact/build/%CIRRUS_BUILD_ID%/build_editor/binaries.zip" |
tar -f - -xvzC Windows\Installer\Source\Editor --strip-components 3 Solutions/.build/Release
curl -fLSs "https://api.cirrus-ci.com/v1/artifact/build/%CIRRUS_BUILD_ID%/build_editor/binaries.zip" --output "%TEMP%\binaries.zip" &&
tar -f "%TEMP%\binaries.zip" -xvzC Windows\Installer\Source\Editor --strip-components 3 Solutions/.build/Release
get_windows_engine_script: >
mkdir Windows\Installer\Source\Engine &&
curl -fLSso Windows\Installer\Source\Engine\acwin.exe
Expand Down Expand Up @@ -288,7 +285,9 @@ pdb_packaging_task:
"build_editor/ags_editor_pdb.zip" \
"build_editor/ags_native_pdb.zip"
do
curl -fLSs "https://api.cirrus-ci.com/v1/artifact/build/$CIRRUS_BUILD_ID/$download" | bsdtar -f - -xvzC /tmp/pdb -s "!.*/Debug/.*!!p" -s "!.*/!!p"
curl -fLSs "https://api.cirrus-ci.com/v1/artifact/build/$CIRRUS_BUILD_ID/$download" --output /tmp/tmp_pdb.zip
bsdtar -f /tmp/tmp_pdb.zip -xvzC /tmp/pdb -s "!.*/Debug/.*!!p" -s "!.*/!!p"
rm /tmp/tmp_pdb.zip
done
make_pdb_archive_script: |
version=$(awk -F"[ \"]+" '{ if ($1=="#define" && $2=="ACI_VERSION_STR") { print $3; exit } }' Common/core/def_version.h)
Expand Down Expand Up @@ -339,7 +338,9 @@ make_release_task:
baseurl="https://api.cirrus-ci.com/v1/artifact/build/$CIRRUS_BUILD_ID"
mkdir -p /tmp/github_release && \
cd /tmp/github_release && \
curl -fLSs "$baseurl/editor_packaging/installer.zip" | bsdtar -f - -xv --strip-components 3 && \
curl -fLSs "$baseurl/editor_packaging/installer.zip" -o /tmp/github_release/installer.zip && \
bsdtar -f /tmp/github_release/installer.zip -xv --strip-components 3 && \
rm /tmp/github_release/installer.zip && \
for download in "editor_packaging/archive/$(basename AGS-*.exe .exe).zip" \
"linux_packaging/binaries/ags_${version}_linux.tar.gz" \
"pdb_packaging/archive/AGS-${version}-pdb.zip" \
Expand Down
4 changes: 2 additions & 2 deletions CMake/FetchSDL_Sound.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FetchContent_Declare(
sdlsound_content
URL https://hg.icculus.org/icculus/SDL_sound/archive/997e90562b35.tar.gz
URL_HASH MD5=66136bd4ef0dd7e09d33503eaf65a18e
URL https://hg.icculus.org/icculus/SDL_sound/archive/4b78007f035f.tar.gz
URL_HASH MD5=ff2448f5a789ae2a07636c243d8f8780
)

FetchContent_GetProperties(sdlsound_content)
Expand Down
74 changes: 0 additions & 74 deletions CMake/FindDirectX.cmake

This file was deleted.

4 changes: 1 addition & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,7 @@ endif()
find_package(PkgConfig)
find_package(Threads)

if (WIN32)
find_package(DirectX)
elseif (LINUX)
if (LINUX)
find_package(X11)
endif()

Expand Down
2 changes: 1 addition & 1 deletion Engine/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@ else()
endif()

if (WIN32)
target_link_libraries(engine PUBLIC DirectX::Direct3D9 shlwapi)
target_link_libraries(engine PUBLIC shlwapi)
elseif (LINUX)
target_link_libraries(engine PUBLIC X11::X11)
endif()
Expand Down
50 changes: 29 additions & 21 deletions ci/linux/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ RUN apt-get install curl libcurl4-openssl-dev libssl-dev
RUN apt-get install \
build-essential \
debhelper \
autoconf \
dh-autoreconf \
git \
libogg-dev \
libtheora-dev \
Expand Down Expand Up @@ -56,30 +58,45 @@ RUN apt-get install \

# Build newer libogg
ARG LIBOGG_VERSION=1.3.4
RUN curl -fLsS "https://downloads.xiph.org/releases/ogg/libogg-$LIBOGG_VERSION.tar.gz" | tar -f - -xvzC /tmp && \
cd /tmp/libogg-$LIBOGG_VERSION && \
RUN curl -fLsS "https://github.com/xiph/ogg/releases/download/v${LIBOGG_VERSION}/libogg-${LIBOGG_VERSION}.tar.gz" --output /tmp/libogg-${LIBOGG_VERSION}.tar.gz && \
tar --file=/tmp/libogg-${LIBOGG_VERSION}.tar.gz -xvzC /tmp && \
cd /tmp/libogg-${LIBOGG_VERSION} && \
./configure --prefix=/opt && \
make && \
make install && \
rm -r /tmp/libogg-$LIBOGG_VERSION
rm -r /tmp/libogg-${LIBOGG_VERSION} && \
rm /tmp/libogg-${LIBOGG_VERSION}.tar.gz

# Build newer libvorbis
ARG LIBVORBIS_VERSION=1.3.7
RUN curl -fLsS "https://downloads.xiph.org/releases/vorbis/libvorbis-$LIBVORBIS_VERSION.tar.xz" | tar -f - -xvJC /tmp && \
cd /tmp/libvorbis-$LIBVORBIS_VERSION && \
RUN curl -fLsS "https://github.com/xiph/vorbis/releases/download/v${LIBVORBIS_VERSION}/libvorbis-${LIBVORBIS_VERSION}.tar.gz" --output /tmp/libvorbis-${LIBVORBIS_VERSION}.tar.gz && \
tar --file=/tmp/libvorbis-${LIBVORBIS_VERSION}.tar.gz -xvzC /tmp && \
cd /tmp/libvorbis-${LIBVORBIS_VERSION} && \
./configure --disable-examples --disable-oggtest --prefix=/opt && \
make && \
make install && \
rm -r /tmp/libvorbis-$LIBVORBIS_VERSION
rm -r /tmp/libvorbis-${LIBVORBIS_VERSION} && \
rm /tmp/libvorbis-${LIBVORBIS_VERSION}.tar.gz

# Build newer libtheora - note that encoding support is disabled
# Build and install SDL2
ARG SDL2_VERSION=2.0.12
RUN curl -fLsS "https://www.libsdl.org/release/SDL2-$SDL2_VERSION.tar.gz" | tar -f - -xvzC /tmp && \
cd /tmp/SDL2-$SDL2_VERSION && \
./configure --enable-shared --enable-loadso --enable-sdl-dlopen --enable-pulseaudio-shared --enable-sndio-shared --enable-x11-shared --enable-oss=no --enable-libsamplerate-shared --enable-wayland-shared --enable-directfb-shared && \
make -j$(getconf _NPROCESSORS_ONLN) && make install && \
mkdir -p /usr/local/share/doc/libSDL2-2.0/ && cp /tmp/SDL2-$SDL2_VERSION/debian/copyright /usr/local/share/doc/libSDL2-2.0/copyright && \
rm -r /tmp/SDL2-$SDL2_VERSION

# Build newer libtheora - note that encoding support is disabled AND it's directory uses GH repo name instead
ARG LIBTHEORA_VERSION=1.1.1
RUN curl -fLsS "https://downloads.xiph.org/releases/theora/libtheora-$LIBTHEORA_VERSION.tar.bz2" | tar -f - -xvjC /tmp && \
cd /tmp/libtheora-$LIBTHEORA_VERSION && \
./configure --disable-encode --disable-examples --disable-oggtest --prefix=/opt && \
RUN curl -fLsS "https://github.com/xiph/theora/archive/refs/tags/v${LIBTHEORA_VERSION}.tar.gz" --output /tmp/libtheora-${LIBTHEORA_VERSION}.tar.gz && \
tar --file=/tmp/libtheora-${LIBTHEORA_VERSION}.tar.gz -xvzC /tmp && \
cd /tmp/theora-${LIBTHEORA_VERSION} && \
./autogen.sh --disable-encode --disable-examples --disable-oggtest --prefix=/opt && \
make && \
make install && \
rm -r /tmp/libtheora-$LIBTHEORA_VERSION
rm -r /tmp/theora-${LIBTHEORA_VERSION} && \
rm /tmp/libtheora-${LIBTHEORA_VERSION}.tar.gz

# Build and install CMake
ARG CMAKE_VERSION=3.14.5
Expand All @@ -88,17 +105,8 @@ RUN curl -fLsS "https://github.com/Kitware/CMake/releases/download/v$CMAKE_VERSI
./configure --system-curl && make -j$(getconf _NPROCESSORS_ONLN) && make install && \
rm -r /tmp/cmake-$CMAKE_VERSION

# Build and install SDL2
ARG SDL2_VERSION=2.0.12
RUN curl -fLsS "https://www.libsdl.org/release/SDL2-$SDL2_VERSION.tar.gz" | tar -f - -xvzC /tmp && \
cd /tmp/SDL2-$SDL2_VERSION && \
./configure --enable-shared --enable-loadso --enable-sdl-dlopen --enable-pulseaudio-shared --enable-sndio-shared --enable-x11-shared --enable-oss=no --enable-libsamplerate-shared --enable-wayland-shared --enable-directfb-shared && \
make -j$(getconf _NPROCESSORS_ONLN) && make install && \
mkdir -p /usr/local/share/doc/libSDL2-2.0/ && cp /tmp/SDL2-$SDL2_VERSION/debian/copyright /usr/local/share/doc/libSDL2-2.0/copyright && \
rm -r /tmp/SDL2-$SDL2_VERSION

# Build and install SDL_sound
ARG SDL2_SOUND_VERSION=997e90562b35
ARG SDL2_SOUND_VERSION=4b78007f035f
RUN cd /tmp && \
curl -fLsS "https://hg.icculus.org/icculus/SDL_sound/archive/$SDL2_SOUND_VERSION.tar.gz" --output SDL_sound.tar.gz && \
tar -xvzf SDL_sound.tar.gz && \
Expand Down
19 changes: 2 additions & 17 deletions ci/windows/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
# base will already have Chocolatey installed
FROM cirrusci/windowsservercore:2019
FROM ericoporto/min-ags-dev-env:1.0.0

# if no temp folder exists by default, create it
RUN IF exist %TEMP%\nul ( echo %TEMP% ) ELSE ( mkdir %TEMP% )

ARG VISUALCPP_BUILD_TOOLS_VERSION=14.0.25420.1
RUN cinst visualcpp-build-tools --version %VISUALCPP_BUILD_TOOLS_VERSION% -y && \
mkdir empty && \
robocopy empty %TEMP% /MIR > nul & \
rd /s /q empty

# Windows 8.0 SDK (but only install the .NET 4.5 SDK)
RUN pushd %TEMP% && \
curl -fLO http://download.microsoft.com/download/F/1/3/F1300C9C-A120-4341-90DF-8A52509B23AC/standalonesdk/sdksetup.exe && \
Expand All @@ -21,10 +15,8 @@ RUN pushd %TEMP% && \

ARG NUGET_VERSION=5.7.0
ARG INNO_SETUP_VERSION=6.0.5
ARG CMAKE_VERSION=3.19.1
RUN cinst nuget.commandline --version %NUGET_VERSION% -y && \
cinst innosetup --version %INNO_SETUP_VERSION% -y && \
cinst cmake --version %CMAKE_VERSION% --installargs ADD_CMAKE_TO_PATH=System -y && \
mkdir empty && \
robocopy empty %TEMP% /MIR > nul & \
rd /s /q empty
Expand All @@ -50,13 +42,6 @@ RUN curl -fLSs http://www.ambiera.at/downloads/irrKlang-32bit-%IRRKLANG_VERSION%
move %TEMP%\irrKlang-%IRRKLANG_VERSION%\bin\dotnet-4\*.dll Lib\irrKlang\ && \
rd /s /q %TEMP%\irrKlang-%IRRKLANG_VERSION%

RUN curl -fLSs https://download.microsoft.com/download/3/3/f/33f1af6e-c61b-4f14-a0de-3e9096ed4b3a/dxsdk_aug2007.exe | tar -f - -xvzC %TEMP% && \
tar -f %TEMP%\dxsdk_aug2007.exe -xvzC %TEMP% Lib/x86/*.lib && \
mkdir Lib\DirectX && \
move %TEMP%\Lib\x86\*.lib Lib\DirectX\ && \
del %TEMP%\dxsdk_aug2007.exe && \
rd /s /q %TEMP%\Lib

RUN mkdir Redist && \
cd Redist && \
curl -fLOJ https://download.microsoft.com/download/6/A/A/6AA4EDFF-645B-48C5-81CC-ED5963AEAD48/vc_redist.x86.exe
Expand All @@ -75,7 +60,7 @@ RUN mkdir Lib\SDL2 && \
echo endif ^(^) >> "Lib\SDL2\sdl2-config.cmake" && \
echo string^(STRIP "${SDL2_LIBRARIES}" SDL2_LIBRARIES^) >> "Lib\SDL2\sdl2-config.cmake"

ARG SDL_SOUND_VERSION=997e90562b35
ARG SDL_SOUND_VERSION=4b78007f035f
RUN mkdir Lib\SDL_sound && \
echo "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86 ^&^& pushd Lib\SDL_sound\build ^&^& msbuild SDL_sound.sln /p:PlatformToolset=v140 /p:Configuration=Release /p:Platform=Win32 /maxcpucount /nologo ^&^& popd > sdlsoundvcbuild.bat && \
mkdir Lib\SDL_sound\build && \
Expand Down