Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
09f84da524 |
+56
-83
@@ -1,116 +1,89 @@
|
|||||||
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:
|
||||||
name: Build
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-20.04]
|
os:
|
||||||
sourcemod-version: [1.11-dev]
|
- ubuntu-20.04
|
||||||
|
- windows-2022
|
||||||
include:
|
include:
|
||||||
- os: ubuntu-20.04
|
- os: ubuntu-20.04
|
||||||
target-archs: x86,x86_64
|
cc: clang-10
|
||||||
sdks: css
|
cxx: clang++-10
|
||||||
|
- os: windows-2022
|
||||||
|
cc: msvc
|
||||||
|
cxx: msvc
|
||||||
|
fail-fast: false
|
||||||
|
name: ${{ matrix.os }} - ${{ matrix.cc }}
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Install Linux packages
|
- uses: actions/checkout@v4
|
||||||
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:
|
with:
|
||||||
path: extension
|
submodules: true
|
||||||
|
|
||||||
- name: Checkout SourceMod
|
- name: Build extension
|
||||||
uses: actions/checkout@v2
|
uses: srcdslab/action-ambuild@v1
|
||||||
|
id: ambuild
|
||||||
with:
|
with:
|
||||||
repository: alliedmodders/sourcemod
|
os: ${{ matrix.os }}
|
||||||
ref: ${{ matrix.sourcemod-version }}
|
cc: ${{ matrix.cc }}
|
||||||
path: sourcemod
|
cxx: ${{ matrix.cxx }}
|
||||||
submodules: recursive
|
ambuild-ref: 'master'
|
||||||
|
mm-ref: '1.12-dev'
|
||||||
|
sm-ref: '1.12-dev'
|
||||||
|
hl2sdk-manifests-ref: 'master'
|
||||||
|
sdks: 'css'
|
||||||
|
configure-path: '../sm-ext-common/configure.py'
|
||||||
|
configure-additional-flags: '--enable-optimize --enable-auto-versioning --ext-root "../"'
|
||||||
|
|
||||||
- name: Checkout AMBuild
|
- name: Upload package
|
||||||
uses: actions/checkout@v2
|
uses: actions/upload-artifact@v4
|
||||||
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:
|
with:
|
||||||
name: ${{ runner.os }}
|
name: ${{ runner.os }}
|
||||||
path: extension/build/package
|
path: ${{ steps.ambuild.outputs.package-path }}
|
||||||
|
if-no-files-found: error
|
||||||
|
retention-days: 14
|
||||||
|
|
||||||
release:
|
release:
|
||||||
name: Release
|
name: Github release
|
||||||
if: startsWith(github.ref, 'refs/tags/')
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
needs: build
|
needs: build
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Download artifacts
|
- name: Download artifacts
|
||||||
uses: actions/download-artifact@v2
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
path: ./gh-artifacts
|
||||||
|
|
||||||
- name: Package
|
- name: Package artifacts
|
||||||
|
working-directory: gh-artifacts
|
||||||
run: |
|
run: |
|
||||||
version=`echo $GITHUB_REF | sed "s/refs\/tags\///"`
|
version=`echo $GITHUB_REF | sed "s/refs\/tags\///"`
|
||||||
ls -Rall
|
for platform in *; do
|
||||||
if [ -d "./Linux/" ]; then
|
if [ -d "./$platform/" ]; then
|
||||||
cd ./Linux/
|
cd "./$platform/"
|
||||||
tar -czf ../${{ github.event.repository.name }}-${version}-linux.tar.gz -T <(\ls -1)
|
tar -czf "../${{ github.event.repository.name }}-${platform,,}.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 -
|
cd -
|
||||||
fi
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
- name: Release
|
- name: Release packages
|
||||||
uses: svenstaro/upload-release-action@v2
|
uses: svenstaro/upload-release-action@v2
|
||||||
with:
|
with:
|
||||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
file: '*.tar.gz'
|
file: './gh-artifacts/*.tar.gz'
|
||||||
tag: ${{ github.ref }}
|
tag: ${{ github.ref }}
|
||||||
file_glob: true
|
file_glob: true
|
||||||
|
|||||||
@@ -2,3 +2,6 @@ build
|
|||||||
Containerfile
|
Containerfile
|
||||||
.venv
|
.venv
|
||||||
safetyhook
|
safetyhook
|
||||||
|
ambuild
|
||||||
|
*.env
|
||||||
|
*.ps1
|
||||||
|
|||||||
+1
-1
Submodule sm-ext-common updated: 8247958423...2adde8cc6f
Reference in New Issue
Block a user