mirror of
https://github.com/nillerusr/source-engine.git
synced 2026-07-16 06:19:58 +00:00
131 lines
4.1 KiB
YAML
131 lines
4.1 KiB
YAML
name: Build
|
|
|
|
on: [push, pull_request]
|
|
env:
|
|
WAF_FLAGS: -T release --disable-warns --prefix=build_hl2
|
|
|
|
jobs:
|
|
build-linux:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ubuntu-latest]
|
|
bits: ['', '--32bits']
|
|
android: ['']
|
|
flags: ['', '-d']
|
|
include:
|
|
- os: ubuntu-20.04
|
|
bits: ''
|
|
android: '--android=armeabi-v7a-hard,4.9,21 --togles'
|
|
flags: ''
|
|
runs-on: ${{ matrix.os }}
|
|
env:
|
|
DEPS: libopenal-dev libpng-dev libjpeg-dev libfreetype6-dev libfontconfig1-dev libcurl4-gnutls-dev libsdl2-dev zlib1g-dev libbz2-dev libedit-dev
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
submodules: recursive
|
|
|
|
- name: Install common dependencies
|
|
run: sudo apt-get update && sudo apt-get install -y g++-multilib gcc-multilib
|
|
- name: Install 32bit dependencies
|
|
if: ${{ matrix.bits != '' && !matrix.android }}
|
|
run: |
|
|
sudo dpkg --add-architecture i386
|
|
sudo apt-get update
|
|
sudo apt-get install -y aptitude
|
|
sudo aptitude install -y $(echo $DEPS | sed -r 's/[a-z0-9_\-]+/&:i386/g')
|
|
echo "PKG_CONFIG_PATH=/usr/lib/i386-linux-gnu/pkgconfig" >> $GITHUB_ENV
|
|
- name: Install 64bit dependencies
|
|
if: ${{ matrix.bits == '' }}
|
|
run: |
|
|
sudo apt-get install -y $DEPS
|
|
- name: Install Android dependencies
|
|
if: ${{ matrix.android == '' }}
|
|
run: |
|
|
wget https://dl.google.com/android/repository/android-ndk-r10e-linux-x86_64.zip -o /dev/null
|
|
unzip android-ndk-r10e-linux-x86_64.zip
|
|
export NDK_HOME=$PWD/android-ndk-r10e/
|
|
echo "NDK_HOME=$NDK_HOME" >> $GITHUB_ENV
|
|
echo "ANDROID_NDK_HOME=$NDK_HOME" >> $GITHUB_ENV
|
|
|
|
- name: Configure
|
|
run: ./waf configure ${{ matrix.bits }} ${{ matrix.android }} ${{ matrix.flags }} $WAF_FLAGS
|
|
- name: Build ${{ matrix.os }}
|
|
run: ./waf install --strip-to-file
|
|
- name: Upload build
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: linux${{matrix.bits}}${{matrix.flags}}${{matrix.android}}
|
|
path: |
|
|
build_hl2
|
|
!build_hl2/**/*.debug
|
|
- name: Upload debug symbols
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: debug-Linux${{matrix.bits}}${{matrix.flags}}${{matrix.android}}
|
|
path: |
|
|
build_hl2/**/*.debug
|
|
|
|
build-macos:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
flags: ['', '-d']
|
|
runs-on: macos-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
submodules: recursive
|
|
|
|
- name: Install dependencies
|
|
run: brew install sdl2
|
|
|
|
- name: Configure
|
|
run: ./waf configure ${{ matrix.flags }} $WAF_FLAGS
|
|
- name: Build macos-amd64
|
|
run: ./waf install --strip-to-file
|
|
- name: Upload build
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: macOS${{matrix.flags}}${{matrix.android}}
|
|
path: |
|
|
build_hl2
|
|
!build_hl2/**/*.dSYM
|
|
- name: Upload debug symbols
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: debug-macOS${{matrix.flags}}${{matrix.android}}
|
|
path: |
|
|
build_hl2/**/*.dSYM
|
|
|
|
build-windows:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [windows-2019]
|
|
bits: ['', '--32bits']
|
|
flags: ['', '-d']
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
submodules: recursive
|
|
|
|
- name: Configure
|
|
run: ./waf configure ${{ matrix.bits }} ${{ matrix.flags }} ${{ env.WAF_FLAGS }}
|
|
- name: Build ${{ matrix.os }}
|
|
run: ./waf install
|
|
- name: 'Upload build'
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: windows${{matrix.bits}}${{matrix.flags}}
|
|
path: |
|
|
build_hl2
|
|
!build_hl2/**/*.pdb
|
|
- name: 'Upload debug symbols'
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: windows${{matrix.bits}}${{matrix.flags}}
|
|
path: |
|
|
build_hl2/**/*.pdb |