Skip to content

Commit

Permalink
Update AMDBuildScript, add new Github Actions workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
NomisCZ committed Jan 6, 2021
1 parent e51d2be commit c7f3111
Show file tree
Hide file tree
Showing 4 changed files with 371 additions and 221 deletions.
52 changes: 0 additions & 52 deletions .github/workflows/c-cpp.yml

This file was deleted.

111 changes: 111 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
# This is a basic workflow to help you get started with Actions

name: CI

# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
tags:
- 'v*'

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: [3.8]
os: [ ubuntu-18.04, windows-latest, macos-latest ]
include:
- os: ubuntu-18.04
asset_name: 'package-linux'
zip_cmd: 'zip -r package.zip build/package'
CC: 'clang'
CXX: 'clang'

- os: windows-latest
asset_name: 'package-windows'
zip_cmd: 'powershell Compress-Archive build/package package.zip'

- os: macos-latest
asset_name: 'package-macos'
zip_cmd: 'zip -r package.zip build/package'
CC: 'clang'
CXX: 'clang'
steps:
- uses: actions/checkout@v2
with:
path: 'sm-environment'
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install Linux Deps
if: runner.os == 'Linux'
run: |
sudo apt update
sudo apt install -y gcc-multilib g++-multilib
- name: Install Windows Deps
if: runner.os == 'Windows'
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x86
- name: Checkout AMBuild
uses: actions/checkout@v2
with:
repository: 'alliedmodders/ambuild'
path: 'ambuild'
- name: Install AMBuild
run: |
cd ambuild
python setup.py build
python setup.py install
- name: Checkout SourceMod
uses: actions/checkout@v2
with:
repository: 'alliedmodders/sourcemod'
ref: '1.10-dev'
path: 'sourcemod'
submodules: 'recursive'
- name: Checkout HL2 SDK
uses: actions/checkout@v2
with:
repository: 'alliedmodders/hl2sdk'
ref: 'sdk2013'
path: 'hl2sdk-sdk2013'
- name: Checkout MM Source
uses: actions/checkout@v2
with:
repository: 'alliedmodders/metamod-source'
ref: '1.10-dev'
path: 'mmsource'
- name: Checkout Steam Works
uses: actions/checkout@v2
with:
ssh-key: ${{ secrets.STEAMWORKS_PULL_KEY }}
repository: 'hexa-core-eu/SteamWorksSDK'
ref: '1.49'
path: 'steamworks-sdk'
- name: Run Build
shell: bash
working-directory: ./sm-environment
run: |
mkdir build
cd build
python ../configure.py --hl2sdk-root=$GITHUB_WORKSPACE --mms-path=$GITHUB_WORKSPACE/mmsource --sm-path=$GITHUB_WORKSPACE/sourcemod --steamworks-path=$GITHUB_WORKSPACE/steamworks-sdk --sdks=sdk2013 --enable-optimize
ambuild
- name: Zip Release
working-directory: ./sm-environment
run: ${{ matrix.zip_cmd }}
- name: Release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ github.workspace }}/sm-environment/package.zip
asset_name: ${{ matrix.asset_name }}.zip
tag: ${{ github.ref }}
Loading

0 comments on commit c7f3111

Please sign in to comment.