Compare commits
5
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1c8f4ea593 | ||
|
|
6f0c5c022a | ||
|
|
d8935c7961 | ||
|
|
3942212f1c | ||
|
|
2aa6b65d1f |
+16
-113
@@ -1,116 +1,19 @@
|
|||||||
name: CI
|
name: Build AlliedModders Extension
|
||||||
|
|
||||||
on: [push, pull_request, workflow_dispatch]
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
- main
|
||||||
|
tags:
|
||||||
|
- "*"
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
- main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build-release-extension:
|
||||||
name: Build
|
uses: srcdslab/ci-workflows/.github/workflows/shared_build_release_am_extension.yml@v1
|
||||||
runs-on: ${{ matrix.os }}
|
with:
|
||||||
strategy:
|
sdks: "css"
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
os: [ubuntu-20.04]
|
|
||||||
sourcemod-version: [1.11-dev]
|
|
||||||
include:
|
|
||||||
- os: ubuntu-20.04
|
|
||||||
target-archs: x86,x86_64
|
|
||||||
sdks: css
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Install Linux packages
|
|
||||||
if: runner.os == 'Linux'
|
|
||||||
run: |
|
|
||||||
sudo apt update
|
|
||||||
sudo apt install -yq --no-install-recommends g++-multilib
|
|
||||||
|
|
||||||
- name: Set up Python
|
|
||||||
uses: actions/setup-python@v2
|
|
||||||
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
path: extension
|
|
||||||
|
|
||||||
- name: Checkout SourceMod
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
repository: alliedmodders/sourcemod
|
|
||||||
ref: ${{ matrix.sourcemod-version }}
|
|
||||||
path: sourcemod
|
|
||||||
submodules: recursive
|
|
||||||
|
|
||||||
- name: Checkout AMBuild
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
repository: alliedmodders/ambuild
|
|
||||||
path: ambuild
|
|
||||||
|
|
||||||
- name: Checkout sm-ext-common
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
repository: srcdslab/sm-ext-common
|
|
||||||
path: sourcemod/extensions/sm-ext-common
|
|
||||||
|
|
||||||
- name: Install sourcemod dependencies
|
|
||||||
run: |
|
|
||||||
bash sourcemod/tools/checkout-deps.sh -m -s ${{ matrix.sdks }}
|
|
||||||
|
|
||||||
- name: Install AMBuild
|
|
||||||
uses: BSFishy/pip-action@v1
|
|
||||||
with:
|
|
||||||
packages: ./ambuild
|
|
||||||
|
|
||||||
- name: Build
|
|
||||||
working-directory: extension
|
|
||||||
shell: bash
|
|
||||||
env:
|
|
||||||
BREAKPAD_SYMBOL_SERVER: ${{ secrets.BREAKPAD_SYMBOL_SERVER }}
|
|
||||||
run: |
|
|
||||||
mkdir build && cd build
|
|
||||||
python ../configure.py --enable-optimize --targets=${{ matrix.target-archs }} --sdks=${{ matrix.sdks }}
|
|
||||||
ambuild
|
|
||||||
|
|
||||||
- name: Upload artifact
|
|
||||||
uses: actions/upload-artifact@v2
|
|
||||||
with:
|
|
||||||
name: ${{ runner.os }}
|
|
||||||
path: extension/build/package
|
|
||||||
|
|
||||||
|
|
||||||
release:
|
|
||||||
name: Release
|
|
||||||
if: startsWith(github.ref, 'refs/tags/')
|
|
||||||
needs: build
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Download artifacts
|
|
||||||
uses: actions/download-artifact@v2
|
|
||||||
|
|
||||||
- name: Package
|
|
||||||
run: |
|
|
||||||
version=`echo $GITHUB_REF | sed "s/refs\/tags\///"`
|
|
||||||
ls -Rall
|
|
||||||
if [ -d "./Linux/" ]; then
|
|
||||||
cd ./Linux/
|
|
||||||
tar -czf ../${{ github.event.repository.name }}-${version}-linux.tar.gz -T <(\ls -1)
|
|
||||||
cd -
|
|
||||||
fi
|
|
||||||
if [ -d "./macOS/" ]; then
|
|
||||||
cd ./macOS/
|
|
||||||
tar -czf ../${{ github.event.repository.name }}-${version}-mac.tar.gz -T <(\ls -1)
|
|
||||||
cd -
|
|
||||||
fi
|
|
||||||
if [ -d "./Windows/" ]; then
|
|
||||||
cd ./Windows/
|
|
||||||
tar -czf ../${{ github.event.repository.name }}-${version}-windows.tar.gz -T <(\ls -1)
|
|
||||||
cd -
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Release
|
|
||||||
uses: svenstaro/upload-release-action@v2
|
|
||||||
with:
|
|
||||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
file: '*.tar.gz'
|
|
||||||
tag: ${{ github.ref }}
|
|
||||||
file_glob: true
|
|
||||||
|
|||||||
@@ -0,0 +1,24 @@
|
|||||||
|
name: Dependabot auto-merge
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request_target:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
- main
|
||||||
|
types:
|
||||||
|
- opened
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
pull-requests: write
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
enableAutoMerge:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: github.event.pull_request.user.login == 'dependabot[bot]'
|
||||||
|
steps:
|
||||||
|
- name: Enable auto-merge for Dependabot PRs
|
||||||
|
run: gh pr merge --auto --merge "$PR_URL"
|
||||||
|
env:
|
||||||
|
PR_URL: ${{ github.event.pull_request.html_url }}
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -2,3 +2,6 @@ build
|
|||||||
Containerfile
|
Containerfile
|
||||||
.venv
|
.venv
|
||||||
safetyhook
|
safetyhook
|
||||||
|
ambuild
|
||||||
|
*.env
|
||||||
|
*.ps1
|
||||||
|
|||||||
+1
-1
Submodule sm-ext-common updated: 8247958423...2adde8cc6f
+15
-10
@@ -5,21 +5,26 @@ projectName = 'sendsnapshotfixer'
|
|||||||
|
|
||||||
project = builder.LibraryProject(projectName)
|
project = builder.LibraryProject(projectName)
|
||||||
project.sources += [
|
project.sources += [
|
||||||
os.path.join(Extension.ext_root, 'src', 'extension.cpp'),
|
os.path.join(Extension.ext_root, 'src', 'extension.cpp'),
|
||||||
os.path.join(Extension.sm_root, 'public', 'smsdk_ext.cpp')
|
os.path.join(Extension.sm_root, 'public', 'smsdk_ext.cpp')
|
||||||
]
|
]
|
||||||
|
|
||||||
for sdk_name in Extension.sdks:
|
for sdk_name in Extension.sdks:
|
||||||
sdk = Extension.sdks[sdk_name]
|
sdk = Extension.sdks[sdk_name]
|
||||||
if sdk['name'] in ['mock']:
|
if sdk['name'] in ['mock']:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
for cxx in builder.targets:
|
for cxx in builder.targets:
|
||||||
if not cxx.target.arch in sdk['platforms'][cxx.target.platform]:
|
if not cxx.target.arch in sdk['platforms'][cxx.target.platform]:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
binary = Extension.HL2ExtConfig(project, builder, cxx, projectName + '.ext.' + sdk['extension'], sdk)
|
binary = Extension.HL2ExtConfig(project, builder, cxx, projectName + '.ext.' + sdk['extension'], sdk)
|
||||||
|
|
||||||
Extension.AddCDetour(binary)
|
Extension.AddCDetour(binary)
|
||||||
|
|
||||||
|
# Silence fatal errors on unrecognized Clang warning flags from CDetour
|
||||||
|
if cxx.family in ['gcc', 'clang']:
|
||||||
|
binary.compiler.cflags += ['-Wno-unknown-warning-option']
|
||||||
|
binary.compiler.cxxflags += ['-Wno-unknown-warning-option']
|
||||||
|
|
||||||
Extension.extensions += builder.Add(project)
|
Extension.extensions += builder.Add(project)
|
||||||
|
|||||||
Reference in New Issue
Block a user