-
-
Notifications
You must be signed in to change notification settings - Fork 452
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
70 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
FROM jetbrains/teamcity-minimal-agent:latest | ||
|
||
# This is important for using apt-get | ||
USER root | ||
|
||
# Install cross-build dependencies | ||
RUN apt-get update && \ | ||
apt-get install -y --no-install-recommends ca-certificates subversion ncftp \ | ||
git autoconf wget make patch cmake clang llvm-dev uuid-dev libssl-dev lzma-dev libxml2-dev python3 | ||
|
||
# Prepare cross-build environment | ||
ENV MACOSX_DEPLOYMENT_TARGET=10.15 \ | ||
PATH="${PATH}:/opt/osxcross/bin" \ | ||
OSXCROSS_MP_INC=1 | ||
|
||
RUN mkdir -p /opt/osxcross && \ | ||
git clone https://github.com/tpoechtrager/osxcross.git /opt/osxcross/setup_files && \ | ||
cd /opt/osxcross/setup_files && \ | ||
wget -P tarballs https://github.com/phracker/MacOSX-SDKs/releases/download/11.3/MacOSX11.3.sdk.tar.xz && \ | ||
UNATTENDED=1 TARGET_DIR=/opt/osxcross ./build.sh && \ | ||
UNATTENDED=1 ../bin/osxcross-macports install mysql8 libidn2 | ||
|
||
# Default build configuration | ||
ENV AS_BUILDAGENT=0 \ | ||
BUILD_ARCHITECTURE=x64 \ | ||
BUILD_CONFIG=release \ | ||
AR=x86_64-apple-darwin20.4-ar \ | ||
CC=x86_64-apple-darwin20.4-clang \ | ||
CXX=x86_64-apple-darwin20.4-clang++ | ||
|
||
# Set build directory | ||
VOLUME /build | ||
WORKDIR /build | ||
|
||
# Copy entrypoint script | ||
COPY utils/docker-entrypoint-osx.sh /docker-entrypoint.sh | ||
|
||
# Set entrypoint | ||
ENTRYPOINT /docker-entrypoint.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/bash | ||
|
||
# If configurede as a build agent, start Teamcity agent | ||
if [[ $AS_BUILDAGENT = "1" ]]; then | ||
# https://github.com/JetBrains/teamcity-docker-minimal-agent/blob/master/Dockerfile#L17 | ||
exec /run-services.sh | ||
fi | ||
|
||
# Manually invoke build process | ||
# So, first make a shallow clone of the repository if it not exists | ||
umask 000 | ||
if [ ! -f ./premake5.lua ]; then | ||
git clone --depth=1 https://github.com/multitheftauto/mtasa-blue.git . | ||
fi | ||
|
||
./linux-build.sh --os=macosx --arch=$BUILD_ARCHITECTURE --config=$BUILD_CONFIG |