Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
133 changes: 19 additions & 114 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,116 +1,21 @@
name: CI

on: [push, pull_request, workflow_dispatch]
name: Build AlliedModders Extension

on:
push:
branches:
- master
- main
tags:
- "*"
pull_request:
branches:
- master
- main

jobs:
build:
name: Build
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04]
sourcemod-version: [1.11-dev]
include:
- os: ubuntu-20.04
target-archs: x86,x86_64
sdks: sdk2013

steps:
- name: Install Linux packages
if: runner.os == 'Linux'
run: |
sudo apt update
sudo apt install -yq --no-install-recommends g++-multilib libjansson-dev

- 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
build-release-extension:
uses: srcdslab/ci-workflows/.github/workflows/shared_build_release_am_extension.yml@v1
with:
sdks: "sdk2013"
artifact-path: "libuv/dist"
submodules: "recursive"
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
build
Containerfile
.venv
safetyhook
libuv
ambuild
*.env
*.ps1
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "sm-ext-common"]
path = sm-ext-common
url = https://github.com/srcdslab/sm-ext-common
Loading
Loading