Skip to content

Commit 6372a8f

Browse files
committed
first commit
0 parents  commit 6372a8f

File tree

297 files changed

+102103
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

297 files changed

+102103
-0
lines changed

Diff for: .github/workflows/ci.yml

+108
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
name: build
2+
3+
on:
4+
push:
5+
paths:
6+
- pushbuild.txt
7+
pull_request:
8+
paths:
9+
- pushbuild.txt
10+
11+
jobs:
12+
build:
13+
name: build with sm${{ matrix.sm_version }} on ${{ matrix.os_short }}
14+
runs-on: ${{ matrix.os }}
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
os:
19+
- ubuntu-latest
20+
- windows-latest
21+
sm_version:
22+
- "1.11"
23+
- "latest"
24+
25+
include:
26+
- sm_version: latest
27+
sm_branch: master
28+
29+
- sm_version: "1.11"
30+
sm_branch: "1.11-dev"
31+
32+
- os: windows-latest
33+
os_short: win
34+
35+
- os: ubuntu-latest
36+
os_short: linux
37+
38+
steps:
39+
- name: Prepare env
40+
shell: bash
41+
run: |
42+
echo "GITHUB_SHA_SHORT=${GITHUB_SHA::7}" >> $GITHUB_ENV
43+
44+
- name: Install (Linux)
45+
if: runner.os == 'Linux'
46+
run: |
47+
sudo dpkg --add-architecture i386
48+
sudo apt-get update
49+
sudo apt-get install -y clang g++-multilib zlib1g-dev libssl-dev zlib1g-dev:i386 libssl-dev:i386
50+
echo "CC=clang" >> $GITHUB_ENV
51+
echo "CXX=clang++" >> $GITHUB_ENV
52+
53+
- name: Getting SourceMod ${{ matrix.sm_version }}
54+
uses: actions/checkout@v4
55+
with:
56+
repository: alliedmodders/sourcemod
57+
ref: ${{ matrix.sm_branch }}
58+
path: sourcemod-${{ matrix.sm_version }}
59+
submodules: recursive
60+
61+
- name: Setting up Python
62+
uses: actions/setup-python@v5
63+
with:
64+
python-version: '3.10'
65+
66+
- name: Getting ambuild
67+
run: |
68+
python -m pip install wheel
69+
pip install git+https://github.com/alliedmodders/ambuild
70+
71+
- name: Getting own repository
72+
uses: actions/checkout@v4
73+
with:
74+
path: extension
75+
76+
- name: Install v143 Toolset
77+
if: runner.os == 'Windows'
78+
shell: powershell
79+
run: |
80+
Set-Location "C:\Program Files (x86)\Microsoft Visual Studio\Installer\"
81+
$InstallPath = "C:\Program Files\Microsoft Visual Studio\2022\Enterprise"
82+
$WorkLoads = '--add Microsoft.VisualStudio.Component.VC.Tools.x86.x64'
83+
$Arguments = ('/c', "vs_installer.exe", 'modify', '--installPath', "`"$InstallPath`"", $WorkLoads, '--quiet', '--norestart', '--nocache')
84+
$process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden
85+
if ($process.ExitCode -eq 0) {
86+
Write-Host "components have been successfully added"
87+
} else {
88+
Write-Host "components were not installed"
89+
}
90+
91+
- uses: microsoft/setup-msbuild@v2
92+
if: runner.os == 'Windows'
93+
with:
94+
msbuild-architecture: x64
95+
vs-version: '15'
96+
- name: Compiling ${{ github.event.repository.name }} files
97+
working-directory: extension
98+
run: |
99+
mkdir build
100+
cd build
101+
python ../configure.py --enable-optimize --symbol-files --sm-path="${{ github.workspace }}/sourcemod-${{ matrix.sm_version }}" --targets=x86,x64
102+
ambuild
103+
104+
- name: Uploading package
105+
uses: actions/upload-artifact@v4
106+
with:
107+
name: sm-ext-websocket-sm${{ matrix.sm_version }}-${{ matrix.os_short }}-${{ env.GITHUB_SHA_SHORT }}
108+
path: extension/build/package

Diff for: .gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
build/
2+
.vscode/

0 commit comments

Comments
 (0)