Skip to content

Commit

Permalink
travis-ci: add mac build + prototype for windows.
Browse files Browse the repository at this point in the history
additionally fix base-requirements.
  • Loading branch information
KyleSanderson authored Jun 1, 2020
1 parent 6aa092d commit acd1d08
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 20 deletions.
59 changes: 40 additions & 19 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,40 +1,61 @@
git:
depth: 1
language: cpp
compiler: gcc
sudo: false
dist: trusty

env:
global:
- secure: "VsvGz6WqBVbT+RpnaWwYb16mVvQHQMvzfRxLlUEnYBVkKCWBgyECDXRL/ShBwGW+aMYW25ZPt/aJNk7rN/wvTrgGU2N9X6CrfVyGPp94HPSYPzEbZSXRoCGex30HkVVITYUBDd06CWuMMIOgS7At/XdJIR1ZjZpOr91Oze3YbGA="

addons:
apt:
sources: ['ubuntu-toolchain-r-test']
packages: ['g++-6', 'g++-6-multilib', 'lib32stdc++6', 'lib32z1-dev', 'libc6-dev-i386', 'linux-libc-dev', 'g++-multilib']

matrix:
fast_finish: true
include:
- os: linux
dist: trusty
language: cpp
compiler: gcc
addons:
apt:
sources: ['ubuntu-toolchain-r-test']
packages: ['lib32stdc++6', 'lib32z1-dev', 'libc6-dev-i386', 'linux-libc-dev', 'g++-multilib']
env:
- AMB="install --user"
- PATH="~/.local/bin:$PATH"
- RELEASE_PKG_FILE="package-lin.tgz"
# - os: windows
# language: cpp
# env:
# - AMB="install"
# - PATH="$PATH:/C/ProgramData/chocolatey/bin:/C/ProgramData/chocolatey/lib/mingw/tools/install/mingw64/opt/bin"
# - RELEASE_PKG_FILE="package-win.tgz"
- os: mac
osx_image: xcode7.2
language: cpp
compiler: clang
env:
- AMB="install"
- PATH="~/.local/bin:$PATH"
- RELEASE_PKG_FILE="package-mac.tgz"

before_script:
- CHECKOUT_DIR=$PWD && cd ..
- mkdir assets && cd assets
- git clone https://github.com/alliedmodders/ambuild.git
- cd ambuild
- python setup.py build
- python setup.py install --user
- python setup.py $AMB
- cd ..
- git clone --depth 1 --recurse-submodules -j8 --shallow-submodules https://[email protected]/SteamDatabase/SteamworksSDK.git SteamworksSDK
- git clone --depth 1 --recurse-submodules -j8 --shallow-submodules -b sdk2013 https://github.com/alliedmodders/hl2sdk.git hl2sdk-sdk2013
- git clone --depth 1 --recurse-submodules -j8 --shallow-submodules https://github.com/alliedmodders/metamod-source.git mmsource-central
- git clone --depth 1 --recurse-submodules -j8 --shallow-submodules -b 1.10-dev https://github.com/alliedmodders/metamod-source.git mmsource-central
- git clone --depth 1 --recurse-submodules -j8 --shallow-submodules -b 1.7-dev https://github.com/alliedmodders/sourcemod.git sourcemod-central
- cd $CHECKOUT_DIR
- cd ..

script:
- PATH="~/.local/bin:$PATH"
- mkdir build && cd build
- python ../configure.py -s 'sdk2013' --hl2sdk-root=../../ --sm-path=../../sourcemod-central --mms-path=../../mmsource-central --steamworks-path=../../SteamworksSDK
- mkdir build
- cd build
- cp ../AMBuildScript ../../
- python2 ../configure.py -s sdk2013 --hl2sdk-root ../assets --sm-path ../assets/sourcemod-central --mms-path ../assets/mmsource-central --steamworks-path ../assets/SteamworksSDK
- ambuild
- tar czvf package-lin.tgz package
- export RELEASE_PKG_FILE=$(ls *.tgz)

- tar czvf ${RELEASE_PKG_FILE} package

deploy:
provider: releases
api_key:
Expand Down
2 changes: 1 addition & 1 deletion Extension/AMBuilder
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@ for sdk_name in SteamWorks.sdks:
binary.compiler.postlink += os.path.join(SteamWorks.steamworks_root, 'redistributable_bin', 'steam_api.lib'),;

if builder.target_platform == 'mac':
binary.compiler.postlink += os.path.join(SteamWorks.steamworks_root, 'redistributable_bin', 'osx32', 'libsteam_api.dylib'),;
binary.compiler.postlink += os.path.join(SteamWorks.steamworks_root, 'redistributable_bin', 'osx', 'libsteam_api.dylib'),;

SteamWorks.extensions += builder.Add(project)

0 comments on commit acd1d08

Please sign in to comment.