Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
s1lentq committed Jun 20, 2024
0 parents commit 0ed1668
Show file tree
Hide file tree
Showing 285 changed files with 47,107 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Manual:
# http://EditorConfig.org

# top-most EditorConfig file
root = true

# 1 tab = 4 spaces indentation and with a newline ending every file
[*]
indent_style = tab
indent_size = 4
trim_trailing_whitespace = true
insert_final_newline = true
37 changes: 37 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
###############################################################################
# Set default behavior to automatically normalize line endings.
###############################################################################
* text=auto

# Sources
*.c text eol=crlf diff=c
*.cc text eol=crlf diff=cpp
*.cxx text eol=crlf diff=cpp
*.cpp text eol=crlf diff=cpp
*.c++ text eol=crlf diff=cpp
*.hpp text eol=crlf diff=cpp
*.h text eol=crlf diff=c
*.h++ text eol=crlf diff=cpp
*.hh text eol=crlf diff=cpp

# Compiled Object files
*.o binary
*.a binary
*.obj binary
*.lib binary
*.jar binary

# Project files
*.sln text eol=crlf
*.vcxproj text eol=crlf
*.vcxproj.filters text eol=crlf

# Scripts
*.sh text eol=lf

# Resources files
*.bmp binary
*.ico binary
*.png binary
*.wav binary
*.tga binary
147 changes: 147 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
name: C/C++ CI

on:
push:
paths-ignore:
- '**.md'

pull_request:
types: [opened, reopened, synchronize]
release:
types: [published]

jobs:
windows:
name: 'Windows'
runs-on: windows-2019

env:
solution: 'msvc/reunion.sln'
buildPlatform: 'Win32'
buildRelease: 'Release'

steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Setup MSBuild
uses: microsoft/setup-msbuild@v1.1.3
with:
vs-version: '16.8'

- name: Build
run: |
msbuild ${{ env.solution }} -p:Configuration="${{ env.buildRelease }}" /t:Clean,Build /p:Platform=${{ env.buildPlatform }} /p:PlatformToolset=v140_xp /p:XPDeprecationWarning=false
- name: Move files
run: |
mkdir publish\bin\Windows
move msvc\${{ env.buildRelease }}\reunion_mm.dll publish\bin\Windows\reunion_mm.dll
- name: Deploy artifacts
uses: actions/upload-artifact@v3.1.1
with:
name: win32
path: publish/*

linux:
name: 'Linux'
runs-on: ubuntu-latest
container: s1lentq/linux86buildtools:latest
outputs:
app-version: ${{ steps.app-version.outputs.version }}

steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Build using Intel C++ Compiler 19.0
run: |
rm -rf build && CC=icc CXX=icpc cmake -B build && cmake --build build -j8
- name: Reading appversion.h
id: app-version
run: |
if [ -e "reunion/version/appversion.h" ]; then
APP_VERSION=$(cat "reunion/version/appversion.h" | grep -wi '#define APP_VERSION_STRD' | sed -e 's/#define APP_VERSION_STRD[ \t\r\n\v\f]\+\(.*\)/\1/i' -e 's/\r//g')
if [ $? -ne 0 ]; then
APP_VERSION=""
else
# Remove quotes
APP_VERSION=$(echo $APP_VERSION | xargs)
fi
fi
echo "version=${APP_VERSION}" >> "$GITHUB_OUTPUT"
shell: bash

- name: Move files
run: |
mkdir -p publish/bin/Linux
rsync -a reunion/dist/ publish/ --exclude=*.tpl
rsync -a reunion/src/reunion_api.h publish/public/
rsync -a reunion/extra/ publish/amxx/
mv build/reunion/reunion_mm_i386.so publish/bin/Linux/reunion_mm_i386.so
- name: Run GLIBC/ABI version compat test
run: |
binaries=(
"publish/bin/Linux/reunion_mm_i386.so"
)
bash ./reunion/version/glibc_test.sh ${binaries[@]}
if [[ $? -ne 0 ]]; then
exit 1 # Assertion failed
fi
shell: bash

- name: Deploy artifacts
uses: actions/upload-artifact@v3.1.1
id: upload-job
with:
name: linux32
path: publish/*

publish:
name: 'Publish'
runs-on: ubuntu-latest
needs: [windows, linux]

steps:
- name: Deploying linux artifacts
uses: actions/download-artifact@v3
with:
name: linux32

- name: Deploying windows artifacts
uses: actions/download-artifact@v3
with:
name: win32

- name: Packaging
id: packaging-job
run: |
7z a -tzip reunion-${{ needs.linux.outputs.app-version }}.zip .
- name: Publish artifacts
uses: actions/upload-artifact@v3.1.1
with:
name: reunion-${{ needs.linux.outputs.app-version }}
path: |
*.zip
- name: Release artifacts
uses: softprops/action-gh-release@v1
id: publish-job
if: |
github.event_name == 'release' &&
github.event.action == 'published' &&
startsWith(github.ref, 'refs/tags/') &&
steps.packaging-job.outcome == 'success'
with:
files: |
*.zip
env:
GITHUB_TOKEN: ${{ secrets.API_TOKEN }}
31 changes: 31 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
**/build
**/publish
**/workspace
*.iml
*.bat
*.aps
*.hint
*.tlog
*.log
*.lnk
*.pdb
**/.vscode/**
**/msvc/bin*
**/msvc/obj*
**/msvc/Debug*
**/msvc/Release*
**/msvc/.vs
**/msvc/*.db
**/msvc/*.opendb
**/msvc/*.sdf
**/msvc/*.opensdf
**/msvc/*.user
**/msvc/*.suo
**/msvc/*.db
**/msvc/*.opendb
**/msvc/ipch
**/PublishPath*.ini

publish
**/appversion.h
**/reunion/dist/Readme.txt
12 changes: 12 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
cmake_minimum_required(VERSION 3.1)
project(reunion CXX)

if (WIN32)
message(FATAL_ERROR "CMakeLists.txt Windows platform isn't supported yet. Use msvc/Reunion.sln instead it!")
endif()

add_custom_target(appversion DEPENDS
COMMAND "${PROJECT_SOURCE_DIR}/reunion/version/appversion.sh" "${PROJECT_SOURCE_DIR}"
)

add_subdirectory(reunion)
Loading

0 comments on commit 0ed1668

Please sign in to comment.