first commit
This commit is contained in:
@@ -0,0 +1,111 @@
|
||||
name: CI
|
||||
|
||||
on: [push, pull_request, workflow_dispatch]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-22.04, windows-2022]
|
||||
sourcemod-version: [master]
|
||||
python-version: ['3.10']
|
||||
include:
|
||||
- os: ubuntu-22.04
|
||||
target-archs: x86,x86_64
|
||||
platform: linux
|
||||
compiler_cc: clang
|
||||
compiler_cxx: clang++
|
||||
|
||||
- os: windows-2022
|
||||
target-archs: x86,x86_64
|
||||
platform: windows
|
||||
compiler_cc: clang
|
||||
compiler_cxx: clang++
|
||||
|
||||
steps:
|
||||
- name: Install Linux packages
|
||||
if: runner.os == 'Linux'
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt install -yq --no-install-recommends g++-multilib ${{ matrix.compiler_cc }}
|
||||
|
||||
- name: Select compiler
|
||||
if: startsWith(runner.os, 'Linux')
|
||||
run: |
|
||||
echo "CC=${{ matrix.compiler_cc }}" >> $GITHUB_ENV
|
||||
echo "CXX=${{ matrix.compiler_cxx }}" >> $GITHUB_ENV
|
||||
${{ matrix.compiler_cc }} --version
|
||||
${{ matrix.compiler_cxx }} --version
|
||||
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v7
|
||||
with:
|
||||
path: extension
|
||||
|
||||
- name: Checkout SourceMod ${{ matrix.sourcemod-version }}
|
||||
uses: actions/checkout@v7
|
||||
with:
|
||||
repository: alliedmodders/sourcemod
|
||||
ref: ${{ matrix.sourcemod-version }}
|
||||
path: sourcemod
|
||||
submodules: recursive
|
||||
|
||||
- name: Install AMBuild
|
||||
run: |
|
||||
python -m pip install wheel
|
||||
pip install git+https://github.com/alliedmodders/ambuild
|
||||
|
||||
- name: Build
|
||||
working-directory: extension
|
||||
shell: bash
|
||||
env:
|
||||
BREAKPAD_SYMBOL_SERVER: ${{ secrets.BREAKPAD_SYMBOL_SERVER }}
|
||||
run: |
|
||||
mkdir build && cd build
|
||||
perl ../curl/lib/mk-ca-bundle.pl
|
||||
python ../configure.py --enable-optimize --targets=${{ matrix.target-archs }}
|
||||
ambuild
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: ${{ github.event.repository.name }}-${{ matrix.platform }}
|
||||
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@v4
|
||||
|
||||
- name: Package
|
||||
run: |
|
||||
for folder in ./*; do
|
||||
if [ -d "$folder" ]; then
|
||||
echo "Processing folder: $folder"
|
||||
cd $folder
|
||||
tar -czf ../$folder.tar.gz -T <(\ls -1)
|
||||
cd ..
|
||||
sha256sum $folder.tar.gz > $folder.tar.gz.sha256
|
||||
fi
|
||||
done
|
||||
|
||||
- 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 }}
|
||||
@@ -0,0 +1,18 @@
|
||||
name: Lock threads
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 0 * * *'
|
||||
|
||||
permissions:
|
||||
issues: write
|
||||
pull-requests: write
|
||||
discussions: write
|
||||
|
||||
jobs:
|
||||
lock:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: dessant/lock-threads@v5
|
||||
with:
|
||||
issue-lock-inactive-days: 180
|
||||
Reference in New Issue
Block a user