93 lines
2.4 KiB
YAML
93 lines
2.4 KiB
YAML
---
|
|
name: Build
|
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
build-msvc:
|
|
name: Build Windows
|
|
runs-on: windows-latest
|
|
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: true
|
|
|
|
- name: Install Build tools
|
|
shell: cmake -P {0}
|
|
run: |
|
|
file(MAKE_DIRECTORY $ENV{BUILD_TOOLS_PATH})
|
|
file(DOWNLOAD https://cdn.anotherfoxguy.com/build-tools.zip "$ENV{TMP}/build-tools.zip" SHOW_PROGRESS)
|
|
execute_process(COMMAND ${CMAKE_COMMAND} -E tar xzf "$ENV{TMP}/build-tools.zip" WORKING_DIRECTORY "$ENV{BUILD_TOOLS_PATH}")
|
|
|
|
- name: Enable Developer Command Prompt
|
|
uses: ilammy/msvc-dev-cmd@v1.10.0
|
|
|
|
- name: Cache conan packages
|
|
uses: actions/cache@v3
|
|
with:
|
|
key: win-conan-${{ hashFiles('**/conanfile.txt') }}
|
|
path: ~/.conan/
|
|
|
|
- name: Cache Qt
|
|
id: cache-qt
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: "${{ github.workspace }}/qt/"
|
|
key: ${{ runner.os }}-QtCache
|
|
|
|
- name: Install Qt
|
|
uses: jurplel/install-qt-action@v2
|
|
with:
|
|
cached: ${{ steps.cache-qt.outputs.cache-hit }}
|
|
modules: qtwebengine
|
|
dir: "${{ github.workspace }}/qt/"
|
|
|
|
- name: Add conan remote
|
|
run: conan remote add fuel-scm https://artifactory.anotherfoxguy.com/artifactory/api/conan/fuel-scm -f
|
|
|
|
- name: Build
|
|
run: |
|
|
mkdir build
|
|
cd build
|
|
conan install .. --build=missing
|
|
cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=redist ..
|
|
ninja
|
|
shell: cmd
|
|
|
|
- name: Install
|
|
run: |
|
|
cd build
|
|
ninja install
|
|
shell: cmd
|
|
|
|
- name: Upload redist folder
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: fuel-win
|
|
path: build/redist
|
|
|
|
build-gcc:
|
|
name: Build Linux
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
submodules: true
|
|
|
|
- name: Install qt
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install qt5keychain-dev qtwebengine5-dev qttools5-dev -y
|
|
|
|
- name: Build
|
|
run: |
|
|
mkdir build
|
|
cd build
|
|
cmake -DCMAKE_BUILD_TYPE=Release ..
|
|
make -j4
|
|
shell: bash
|