Persian Translation Submission #24
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: [pull_request] | |
jobs: | |
build: | |
name: ${{ matrix.config.name }} | |
runs-on: ${{ matrix.config.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
- { | |
name: "Windows Latest MSVC", artifact: "dota2-rpc-client", | |
os: windows-latest, | |
cc: "cl", cxx: "cl", | |
environment_script: "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvars64.bat" | |
} | |
- { | |
name: "Ubuntu 20.04 GCC", artifact: "dota2-rpc-client-linux", | |
os: ubuntu-20.04, | |
build_type: "Release", cc: "gcc", cxx: "g++" | |
} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Download libgtk-3-dev | |
run: | | |
if [ "$RUNNER_OS" == "Linux" ]; then | |
sudo apt install -y libgtk-3-dev | |
else | |
echo "$RUNNER_OS don't need this library!" | |
fi | |
shell: bash | |
- name: Fetch CMake | |
uses: lukka/get-cmake@latest | |
with: | |
cmakeVersion: 3.21.2 | |
- name: Install Conan | |
id: conan | |
uses: turtlebrowser/get-conan@main | |
with: | |
version: 1.59.0 | |
- name: Configuring project | |
run: | | |
cmake -S . -B ./build -DCMAKE_BUILD_TYPE=Release -DCMAKE_CONFIGURATION_TYPES:STRING=Release -DCMAKE_TRY_COMPILE_CONFIGURATION:STRING=Release | |
- name: Build project | |
run: | | |
cmake --build ./build --config Release --target dota2-rpc-client -j 10 | |
- name: Preparing for upload | |
run: | | |
if [ "$RUNNER_OS" == "Linux" ]; then | |
mkdir ./build/bin | |
mv ./build/lang ./build/bin/lang | |
mv ./build/templates ./build/bin/templates | |
mv ./build/config.json ./build/bin/config.json | |
mv ./build/dota2-rpc-client ./build/bin/dota2-rpc-client | |
else | |
echo "$RUNNER_OS don't need this trick!" | |
fi | |
shell: bash | |
- name: Upload | |
uses: actions/upload-artifact@v3 | |
with: | |
path: ./build/bin | |
name: ${{ matrix.config.artifact }} |