👷 Added a simple CI build

This commit is contained in:
Edgar 2023-09-25 15:59:28 +02:00
parent af913636a3
commit c6583150e6
No known key found for this signature in database
GPG key ID: 3C2E1F2C1C353131

103
.github/workflows/build-overte.yml vendored Normal file
View file

@ -0,0 +1,103 @@
---
name: Build game
on: [ push, pull_request ]
jobs:
build-gcc:
name: Linux build on Ubuntu
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: false
fetch-depth: 1
- name: Cache conan
uses: actions/cache@v3
with:
key: conan-ubuntu-${{ hashFiles('conanfile.py') }}
path: ~/.conan2/
- name: Install dependencies
run: |
curl "https://raw.githubusercontent.com/AnotherFoxGuy/ci-scripts/main/install-conan.sh" | sudo bash
sudo apt-get update
sudo apt-get -y install \
pkg-config \
ninja-build \
qtbase5-dev \
qtbase5-private-dev \
qtwebengine5-dev \
qtwebengine5-dev-tools \
qtmultimedia5-dev \
libqt5opengl5-dev \
qtscript5-dev \
libqt5scripttools5 \
libqt5webchannel5-dev \
libqt5websockets5-dev \
qtxmlpatterns5-dev-tools \
qttools5-dev \
libqt5xmlpatterns5-dev \
libqt5svg5-dev \
qml-module-qtwebchannel \
qml-module-qtquick-controls \
qml-module-qtquick-controls2 \
qml-module-qt-labs-settings \
qml-module-qtquick-dialogs \
qml-module-qtwebengine
shell: bash
- name: Configure
run: |
conan profile detect --force
echo "tools.system.package_manager:mode = install" > ~/.conan2/global.conf
echo "tools.system.package_manager:sudo = True" >> ~/.conan2/global.conf
conan remote add overte https://git.anotherfoxguy.com/api/packages/overte/conan -f
conan install . -s build_type=Release -b missing -pr:b=default -c tools.cmake.cmaketoolchain:generator="Ninja"
conan cache clean "*" -sbd
cmake --preset conan-release
shell: bash
- name: Build
run: ninja
shell: bash
build-msvc:
name: Windows build
runs-on: windows-2019
env:
BUILD_TOOLS_PATH: C:\apps\build-tools\
steps:
- run: echo $env:BUILD_TOOLS_PATH | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- uses: actions/checkout@v3
with:
submodules: false
fetch-depth: 1
- name: Install Build tools
run: git clone https://git.anotherfoxguy.com/AnotherFoxGuy/build-tools.git %BUILD_TOOLS_PATH%
shell: cmd
- name: Cache conan packages
uses: actions/cache@v3
with:
key: conan-windows-${{ hashFiles('conanfile.py') }}
path: ~/.conan2
- name: Configure
run: |
conan remote add overte https://git.anotherfoxguy.com/api/packages/overte/conan -f
conan install . -b missing -pr:b=tools/conan-profiles/vs-19-release-ninja -pr=tools/conan-profiles/vs-19-release-ninja
conan cache clean "*" -sbd
shell: cmd
- name: Enable Developer Command Prompt
uses: ilammy/msvc-dev-cmd@v1.12.1
- name: Build
run: |
cmake --preset conan-release
ninja
shell: cmd