Skip to content

Commit

Permalink
Merge pull request #11 from Deamon87/development
Browse files Browse the repository at this point in the history
Merge 2 years of development
  • Loading branch information
Deamon87 authored Aug 21, 2022
2 parents 9cb46ba + bc199c8 commit 7276530
Show file tree
Hide file tree
Showing 377 changed files with 31,242 additions and 18,597 deletions.
235 changes: 223 additions & 12 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,247 @@
# From gist https://gist.github.com/NickNaso/0d478f1481686d5bcc868cac06620a60
# This is a basic workflow to help you get started with Actions
# workflow - цепочка действий
# Имя процесса Билдится на всех типах 📦 🐍

name: MapViewer CI

# Controls when the workflow will run
# Controls when the action will run. Triggers the workflow on push
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master ]
pull_request:
branches: [ master ]
release:

# Allows you to run this workflow manually from the Actions tab
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# tags:
# - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }} # будет запускаться по очереди на всех типах машин
strategy:
fail-fast: false
matrix:
config:
- {
name: "Windows Latest MSVC",
os: windows-latest,
artifact: "windows_msvc.7z",
build_type: "Release",
cc: "cl",
cxx: "cl",
environment_script: "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Auxiliary/Build/vcvars64.bat",
archiver: "7z a",
generators: "Visual Studio 17 2022"
}
# - {
# name: "Windows Latest MinGW",
# os: windows-latest,
# artifact: "windows_mingw.7z",
# build_type: "Release",
# cc: "gcc",
# cxx: "g++",
# archiver: "7z a",
# generators: "Ninja"
# }
- {
name: "Ubuntu_Latest_GCC",
os: ubuntu-latest,
artifact: "ubuntu_gcc.7z",
build_type: "Release",
cc: "gcc",
cxx: "g++",
archiver: "7z a",
generators: "Ninja"
}
- {
name: "Emscripten",
os: ubuntu-latest,
artifact: "emscripten.7z",
build_type: "Release",
cc: "emcc",
cxx: "em++",
archiver: "7z a",
generators: "Ninja"
}
- {
name: "Ubuntu_GCC_9",
os: ubuntu-latest,
artifact: "ubuntu_gcc9.7z",
build_type: "Release",
cc: "gcc",
cxx: "g++",
archiver: "7z a",
generators: "Ninja"
}
- {
name: "macOS Latest Clang",
os: macos-latest,
artifact: "macos_clang.7z",
build_type: "Release",
cc: "clang",
cxx: "clang++",
archiver: "7za a",
generators: "Ninja"
}

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
with:
submodules: 'recursive'
# Installs python 3.10
- uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Print env
run: |
echo github.event.action: ${{ github.event.action }}
echo github.event_name: ${{ github.event_name }}
- name: Install dependencies on windows
if: startsWith(matrix.config.os, 'windows')
run: |
choco install ninja cmake
ninja --version
cmake --version
# cmd "${{ matrix.config.environment_script }}"
- name: Install emscripten on Emscripten target
if: startsWith(matrix.config.name, 'emscripten')
run: |
sudo mv /usr/local/bin/cmake /usr/local/bin/cmake-old
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | sudo apt-key add -
sudo apt-add-repository 'deb https://apt.kitware.com/ubuntu/ bionic main'
sudo apt-get update
sudo apt-get install ninja-build cmake
sudo apt-get install xorg-dev libglu1-mesa-dev
git clone https://github.com/emscripten-core/emsdk.git
cd emsdk
git pull
./emsdk install latest
./emsdk activate latest
ninja --version
cmake --version
gcc --version
cd ..
- name: Install dependencies on ubuntu
if: startsWith(matrix.config.name, 'Ubuntu_Latest_GCC')
run: |
sudo apt-get update
sudo apt-get install ninja-build cmake
sudo apt-get install xorg-dev libglu1-mesa-dev
ninja --version
cmake --version
gcc --version
- name: Install dependencies on ubuntu9
if: startsWith(matrix.config.name, 'Ubuntu_GCC_9')
run: |
echo Update gcc-9 =======================================================================
echo gcc version before
gcc --version
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install ninja-build cmake gcc-9 g++-9
sudo apt-get install xorg-dev libglu1-mesa-dev
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 90 --slave /usr/bin/g++ g++ /usr/bin/g++-9 --slave /usr/bin/gcov gcov /usr/bin/gcov-9
echo gcc version after
gcc --version
echo Update ninja =======================================================================
echo ninja version before
ninja --version
# wget https://github.com/ninja-build/ninja/releases/download/v1.10.0/ninja-linux.zip
wget https://github.com/ninja-build/ninja/releases/latest/download/ninja-linux.zip
sudo unzip ninja-linux.zip -d /usr/local/bin/
sudo update-alternatives --install /usr/bin/ninja ninja /usr/local/bin/ninja 1 --force
echo ninja version after
ninja --version
echo Update cmake =======================================================================
echo cmake version before
cmake --version
# curl --silent "https://api.github.com/repos/Kitware/CMake/releases/latest" | sed -n 's/.*tag_name":\s"\(.*\)".*/\1/p' | head -2
# wget https://github.com/Kitware/CMake/releases/latest/download/cmake-3.16.5-Linux-x86_64.sh
cmake_version=$(curl --silent "https://api.github.com/repos/Kitware/CMake/releases/latest" | sed -n 's/.*tag_name":\s"\(.*\)".*/\1/p' | head -2 | cut -c 2-)
echo cmake download latest v$cmake_version version
wget https://github.com/Kitware/CMake/releases/download/v$cmake_version/cmake-$cmake_version-Linux-x86_64.sh
chmod +x cmake-$cmake_version-Linux-x86_64.sh
sudo mkdir /opt/cmake
sudo ./cmake-$cmake_version-Linux-x86_64.sh --prefix=/opt/cmake --skip-license
sudo update-alternatives --install /usr/bin/cmake cmake /opt/cmake/bin/cmake 1 --force
echo cmake version after
cmake --version
- name: Install dependencies on macos
if: startsWith(matrix.config.os, 'macos')
run: |
brew install p7zip cmake ninja
ninja --version
cmake --version
- name: Configure standalone
if: ${{ !startsWith(matrix.config.name, 'emscripten') }}
shell: bash
run: |
mkdir build
mkdir instdir
cd build
cmake \
-S ../ \
-B . \
-DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }} \
-G "${{ matrix.config.generators }}" \
-DCMAKE_INSTALL_PREFIX:PATH=../instdir
- name: Configure emscripten
if: startsWith(matrix.config.name, 'emscripten')
shell: bash
run: |
cd emsdk
source ./emsdk_env.sh
TOOLCHAIN_LOC="$(find ~+ . -name 'Emscripten.cmake' -print -quit)"
cd ..
mkdir build
mkdir instdir
cd build
cmake \
-S ../emscripten_port \
-B . \
-DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }} \
-DCMAKE_TOOLCHAIN_FILE=${TOOLCHAIN_LOC} \
-DCMAKE_INSTALL_PREFIX:PATH=../instdir
- name: Build
shell: bash
working-directory: build
run: cmake --build . --config ${{ matrix.config.build_type }}

# Runs a single command using the runners shell
- name: Run a one-line script
run: echo Hello, world!
- name: Install Strip
shell: bash
working-directory: build
run: cmake --install . --strip

# Runs a set of commands using the runners shell
- name: Run a multi-line script
- name: Pack
shell: bash
working-directory: instdir
run: |
echo Add other actions to build,
echo test, and deploy your project.
ls -laR
${{ matrix.config.archiver }} ../${{ matrix.config.artifact }} .
- name: Upload
uses: actions/upload-artifact@v1
with:
path: ./${{ matrix.config.artifact }}
name: ${{ matrix.config.artifact }}

- name: Upload release asset
if: github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'created')
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./${{ matrix.config.artifact }}
asset_name: ${{ matrix.config.artifact }}.zip
asset_content_type: application/zip
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
cache
cache__
cache_old
cmake-build-*
cmake-build-*
venv
19 changes: 19 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,22 @@
[submodule "3rdparty/libpng"]
path = 3rdparty/libpng
url = https://github.com/glennrp/libpng.git
[submodule "wowViewerLib/3rdparty/tbb"]
path = wowViewerLib/3rdparty/tbb
url = https://github.com/Deamon87/tbb.git
[submodule "3rdparty/filesystem_impl"]
path = 3rdparty/filesystem_impl
url = https://github.com/gulrak/filesystem.git
[submodule "wowViewerLib/3rdparty/tinygltf"]
path = wowViewerLib/3rdparty/tinygltf
url = https://github.com/syoyo/tinygltf
[submodule "emscripten_port/3rdparty/zipper"]
path = emscripten_port/3rdparty/zipper
url = https://github.com/sebastiandev/zipper.git
[submodule "3rdparty/libressl"]
path = 3rdparty/libressl
url = https://github.com/libressl-portable/portable.git

[submodule "3rdparty/mdebtls"]
path = 3rdparty/mdebtls
url = https://github.com/ARMmbed/mbedtls
2 changes: 1 addition & 1 deletion 3rdparty/casclib
Submodule casclib updated 54 files
+1 −0 .gitignore
+43 −38 CMakeLists.txt
+0 −35 CascLib_vs08.bat
+40 −16 CascLib_vs08.vcproj
+34 −4 CascLib_vs08_dll.vcproj
+36 −0 CascLib_vs08_test.vcproj
+0 −44 CascLib_vs17.bat
+3 −3 CascLib_vs19.sln
+7 −1 CascLib_vs19.vcxproj
+18 −0 CascLib_vs19.vcxproj.filters
+13 −7 CascLib_vs19_dll.vcxproj
+18 −0 CascLib_vs19_dll.vcxproj.filters
+7 −1 CascLib_vs19_test.vcxproj
+18 −0 CascLib_vs19_test.vcxproj.filters
+25 −28 PostBuild.bat
+0 −6 doc/history.txt
+58 −0 make-msvc.bat
+0 −1 sources
+8 −3 sources-c.c
+2 −0 sources-cpp.cpp
+6 −6 src/CascCommon.h
+217 −164 src/CascDecrypt.cpp
+5 −0 src/CascDumpData.cpp
+184 −129 src/CascFiles.cpp
+2 −2 src/CascFindFile.cpp
+8 −6 src/CascIndexFiles.cpp
+5 −9 src/CascLib.h
+11 −11 src/CascOpenFile.cpp
+32 −22 src/CascOpenStorage.cpp
+20 −29 src/CascPort.h
+23 −23 src/CascReadFile.cpp
+3 −3 src/CascRootFile_WoW.cpp
+37 −37 src/DllMain.def
+14 −6 src/DllMain.rc
+15 −20 src/common/Common.cpp
+21 −13 src/common/Common.h
+27 −7 src/common/Csv.cpp
+22 −0 src/common/Csv.h
+2 −6 src/common/Directory.cpp
+215 −238 src/common/FileStream.cpp
+10 −9 src/common/FileStream.h
+3 −3 src/common/ListFile.cpp
+23 −0 src/common/Map.h
+674 −0 src/common/Mime.cpp
+130 −0 src/common/Mime.h
+2 −2 src/common/Path.h
+441 −0 src/common/Sockets.cpp
+115 −0 src/common/Sockets.h
+2,163 −0 src/zlib/deflate.c
+349 −0 src/zlib/deflate.h
+1,203 −0 src/zlib/trees.c
+128 −0 src/zlib/trees.h
+157 −102 test/CascTest.cpp
+1 −1 test/TLogHelper.cpp
1 change: 1 addition & 0 deletions 3rdparty/filesystem_impl
Submodule filesystem_impl added at 1edf4a
1 change: 1 addition & 0 deletions 3rdparty/libressl
Submodule libressl added at 867b57
1 change: 1 addition & 0 deletions 3rdparty/mdebtls
Submodule mdebtls added at 59d97a
Loading

0 comments on commit 7276530

Please sign in to comment.