diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..bd15101 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,52 @@ +name: SteamWorks.ext Build + +on: + push: + branches: [ master, windows98 ] + pull_request: + branches: [ master, windows98 ] + +jobs: + build: + runs-on: ${{ matrix.os }} + strategy: + matrix: + python-version: [2.7, 3.3, 3.8] + os: [ubuntu-18.04, macos-latest, windows-2019] + exclude: + - os: macos-latest + python-version: 3.3 + - os: windows-2019 + python-version: 3.3 + + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Install Deps + if: runner.os == 'Linux' + run: | + sudo dpkg --add-architecture i386 + sudo apt-get install lib32stdc++-7-dev lib32z1-dev libc6-dev-i386 + sudo apt-get install g++-multilib + - name: install AMBuild + run: | + mkdir assets + cd assets + git clone --depth 1 --recurse-submodules -j8 --shallow-submodules -b fix-deps https://github.com/alliedmodders/ambuild.git + pip install ./ambuild + - name: Clone Dependencies + run: | + git clone --depth 1 --recurse-submodules -j8 --shallow-submodules https://$OAUTH@github.com/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 -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 + - name: Run Build + run: | + mkdir build + cd build + cp ../AMBuildScript ../../ + python ../configure.py -s sdk2013 --hl2sdk-root ../assets --sm-path ../assets/sourcemod-central --mms-path ../assets/mmsource-central --steamworks-path ../assets/SteamworksSD + ambuild diff --git a/.travis.yml b/.travis.yml index a813cc5..8b6a3ed 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,12 +20,14 @@ matrix: - 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" + - SNAKEWRAP="python" + - os: windows + language: bash + env: + - AMB="install" + - PATH="$PATH:/C/python38:/C/python38/Scripts:/C/ProgramData/chocolatey/bin" + - RELEASE_PKG_FILE="package-win.tgz" + - SNAKEWRAP="C:/python38/python.exe" - os: mac osx_image: xcode7.2 language: cpp @@ -34,14 +36,14 @@ matrix: - AMB="install" - PATH="~/.local/bin:$PATH" - RELEASE_PKG_FILE="package-mac.tgz" + - SNAKEWRAP="python" before_script: + - (uname -a | grep Msys) && (choco install -y pip) || echo ":-)" + - (uname -a | grep Msys) && (travis_wait 90 choco install -y vcbuildtools && choco install vswhere) || echo ":-)" - mkdir assets && cd assets - - git clone -b 2.1-distutils https://github.com/alliedmodders/ambuild.git - - cd ambuild - - python setup.py build - - python setup.py $AMB - - cd .. + - git clone --depth 1 --recurse-submodules -j8 --shallow-submodules -b fix-deps https://github.com/alliedmodders/ambuild.git + - $SNAKEWRAP -m pip $AMB ./ambuild - git clone --depth 1 --recurse-submodules -j8 --shallow-submodules https://$OAUTH@github.com/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 -b 1.10-dev https://github.com/alliedmodders/metamod-source.git mmsource-central @@ -52,7 +54,11 @@ script: - 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 + - env + - eval "$(exec /usr/bin/env -i "${SHELL}" -l -c "export")" + - env + - (uname -a | grep Msys) && powershell "cmd /c "\"$VS140COMNTOOLS/vcvars32.bat\" && $SNAKEWRAP ../configure.py -s sdk2013 --hl2sdk-root ../assets --sm-path ../assets/sourcemod-central --mms-path ../assets/mmsource-central --steamworks-path ../assets/SteamworksSDK"" + - (uname -a | grep -v Msys) && $SNAKEWRAP ../configure.py -s sdk2013 --hl2sdk-root ../assets --sm-path ../assets/sourcemod-central --mms-path ../assets/mmsource-central --steamworks-path ../assets/SteamworksSDK - ambuild - tar czvf ${RELEASE_PKG_FILE} package