Skip to content

Commit

Permalink
Merge pull request #5 from tmp64/cmake
Browse files Browse the repository at this point in the history
Add CMake
  • Loading branch information
tmp64 authored Aug 15, 2023
2 parents 27d3e21 + 3623086 commit 27de92f
Show file tree
Hide file tree
Showing 201 changed files with 2,766 additions and 1,867 deletions.
86 changes: 30 additions & 56 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,67 +9,41 @@ on:
schedule:
- cron: '0 0 1 * *'

env:
# Path to the solution file relative to the root of the project.
SOLUTION_FILE_PATH: msvc/weaponmod.sln

# Configuration type to build.
# You can convert this to a build matrix if you need coverage of multiple configuration types.
# https://docs.github.com/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
BUILD_CONFIGURATION: Release

jobs:
linux:
name: Linux-x86
runs-on: ubuntu-latest
build:
strategy:
matrix:
runs-on: [windows-2019, ubuntu-20.04]

# The type of runner that the job will run on
runs-on: ${{ matrix.runs-on }}

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Checkout
uses: actions/[email protected]

- name: Save Git info into variables
id: vars
shell: bash
run: |
echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
- name: Update system
run: sudo apt update
- name: Install G++ (multilib)
run: sudo apt install -y g++-multilib
- name: Build
run: CFG=${{env.BUILD_CONFIGURATION}} make
- name: Deploy
uses: actions/[email protected]
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/[email protected]
with:
name: weaponmod-linux-${{ steps.vars.outputs.sha_short }}
path: |
Release/weaponmod_amxx_i386.so
win32:
name: Win32
runs-on: windows-2019
steps:
- uses: actions/checkout@v2

- name: Save Git info into variables
id: vars
shell: bash
submodules: recursive

- name: Set up Python 3.8
uses: actions/[email protected]
with:
python-version: 3.8

- name: Install Ubuntu packages
if: matrix.runs-on == 'ubuntu-20.04'
run: |
echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v1
sudo dpkg --add-architecture i386
sudo apt update || true
sudo apt install -y libc6:i386 ninja-build gcc-9-multilib g++-9-multilib libssl1.1:i386 libssl-dev:i386 zlib1g-dev:i386
- name: Build
working-directory: ${{env.GITHUB_WORKSPACE}}
# Add additional options to the MSBuild command line here (like platform or verbosity level).
# See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference
run: msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} ${{env.SOLUTION_FILE_PATH}}
- name: Build release
id: build
run: |
python ./scripts/build_release.py --build-type release --vs 2019 --toolset v141_xp --linux-compiler gcc-9 --out-dir ./_build_out --cmake-args="-DWARNINGS_ARE_ERRORS=ON" --github-actions
- name: Upload build result
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3.1.2
with:
name: weaponmod-windows-${{ steps.vars.outputs.sha_short }}
path: |
msvc/Release/weaponmod_amxx.dll
msvc/Release/weaponmod_amxx.pdb
name: ${{ steps.build.outputs.artifact_name }}
path: ./_build_out/WeaponMod-*.zip
Loading

0 comments on commit 27de92f

Please sign in to comment.