2021-03-02 02:36:10 +00:00
|
|
|
name: Build
|
|
|
|
|
2021-03-05 14:00:07 +00:00
|
|
|
on:
|
|
|
|
push:
|
2021-04-06 19:20:29 +00:00
|
|
|
branches-ignore:
|
2021-03-05 14:00:07 +00:00
|
|
|
- master
|
2021-03-19 14:47:53 +00:00
|
|
|
paths-ignore:
|
|
|
|
- '*.json'
|
|
|
|
- '*.md'
|
|
|
|
- '*LICENSE'
|
2021-04-06 19:20:29 +00:00
|
|
|
pull_request:
|
2021-03-02 02:36:10 +00:00
|
|
|
|
|
|
|
jobs:
|
2021-03-19 14:47:53 +00:00
|
|
|
build-linux:
|
|
|
|
name: Build Linux (${{matrix.name}} x86_64)
|
2021-03-02 02:36:10 +00:00
|
|
|
runs-on: ubuntu-20.04
|
2021-03-19 14:47:53 +00:00
|
|
|
strategy:
|
2021-04-05 21:04:50 +00:00
|
|
|
fail-fast: false
|
2021-03-19 14:47:53 +00:00
|
|
|
matrix:
|
|
|
|
include:
|
|
|
|
- name: GCC
|
|
|
|
cc: gcc
|
|
|
|
cxx: g++
|
|
|
|
- name: Clang
|
|
|
|
cc: clang
|
|
|
|
cxx: clang++
|
2021-03-07 20:42:48 +00:00
|
|
|
|
2021-03-02 02:36:10 +00:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
with:
|
2021-03-29 22:32:55 +00:00
|
|
|
fetch-depth: 0
|
2021-03-02 02:36:10 +00:00
|
|
|
submodules: recursive
|
2021-03-07 20:42:48 +00:00
|
|
|
|
2021-03-02 02:36:10 +00:00
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
2021-03-19 19:04:13 +00:00
|
|
|
sudo apt-get update
|
2021-03-05 14:00:07 +00:00
|
|
|
sudo apt-get -y install build-essential curl git cmake ninja-build llvm-dev libclang-dev clang lld \
|
2021-04-04 22:39:07 +00:00
|
|
|
zlib1g-dev libglu1-mesa-dev libdbus-1-dev libvulkan-dev libxi-dev libxrandr-dev libasound2-dev \
|
|
|
|
libpulse-dev libudev-dev libpng-dev libncurses5-dev libx11-xcb-dev python3 python-is-python3 qt5-default \
|
|
|
|
libcurl4-openssl-dev
|
2021-03-19 14:47:53 +00:00
|
|
|
# free up disk space
|
|
|
|
# https://github.com/actions/virtual-environments/issues/2840#issuecomment-790492173
|
|
|
|
echo Before
|
|
|
|
df -h .
|
|
|
|
sudo apt-get clean
|
|
|
|
sudo rm -rf /usr/share/dotnet
|
|
|
|
sudo rm -rf /opt/ghc
|
|
|
|
sudo rm -rf /usr/local/share/boost
|
|
|
|
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
|
|
|
|
echo After
|
|
|
|
df -h .
|
2021-03-07 20:42:48 +00:00
|
|
|
|
2021-03-02 02:36:10 +00:00
|
|
|
- name: Create build directory
|
|
|
|
run: cmake -E make_directory ${{github.workspace}}/build
|
2021-03-07 20:42:48 +00:00
|
|
|
|
2021-03-02 02:36:10 +00:00
|
|
|
- name: Configure CMake
|
|
|
|
working-directory: ${{github.workspace}}/build
|
2021-03-07 20:42:48 +00:00
|
|
|
run: |
|
2021-03-28 18:07:38 +00:00
|
|
|
cmake $GITHUB_WORKSPACE -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
2021-04-06 19:20:29 +00:00
|
|
|
-DCMAKE_C_COMPILER=${{matrix.cc}} -DCMAKE_CXX_COMPILER=${{matrix.cxx}}
|
2021-03-07 20:42:48 +00:00
|
|
|
|
2021-03-02 02:36:10 +00:00
|
|
|
- name: Build
|
|
|
|
working-directory: ${{github.workspace}}/build
|
2021-04-06 19:20:29 +00:00
|
|
|
run: cmake --build .
|
2021-03-07 20:42:48 +00:00
|
|
|
|
2021-03-02 02:36:10 +00:00
|
|
|
build-macos:
|
2021-03-15 15:28:57 +00:00
|
|
|
name: Build macOS (AppleClang x86_64)
|
2021-03-02 02:36:10 +00:00
|
|
|
runs-on: macos-10.15
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
with:
|
2021-03-29 22:32:55 +00:00
|
|
|
fetch-depth: 0
|
2021-03-02 02:36:10 +00:00
|
|
|
submodules: recursive
|
2021-03-07 20:42:48 +00:00
|
|
|
|
2021-03-02 02:36:10 +00:00
|
|
|
- name: Install dependencies
|
2021-03-19 19:01:26 +00:00
|
|
|
run: |
|
2021-04-12 16:29:10 +00:00
|
|
|
brew update
|
2021-04-06 19:20:29 +00:00
|
|
|
brew install ninja qt@5 graphicsmagick imagemagick
|
2021-03-19 19:01:26 +00:00
|
|
|
brew link qt@5
|
|
|
|
yarn global add create-dmg
|
2021-03-07 20:42:48 +00:00
|
|
|
|
2021-03-02 02:36:10 +00:00
|
|
|
- name: Create build directory
|
|
|
|
run: cmake -E make_directory ${{github.workspace}}/build
|
2021-03-07 20:42:48 +00:00
|
|
|
|
2021-03-02 02:36:10 +00:00
|
|
|
- name: Configure CMake
|
|
|
|
working-directory: ${{github.workspace}}/build
|
2021-03-15 15:48:59 +00:00
|
|
|
run: |
|
2021-03-19 19:16:52 +00:00
|
|
|
export PATH="/usr/local/opt/qt@5/bin:$PATH" # FIXME remove
|
2021-04-06 19:20:29 +00:00
|
|
|
cmake $GITHUB_WORKSPACE -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo
|
2021-03-07 20:42:48 +00:00
|
|
|
|
2021-03-02 02:36:10 +00:00
|
|
|
- name: Build
|
|
|
|
working-directory: ${{github.workspace}}/build
|
2021-04-06 19:20:29 +00:00
|
|
|
run: cmake --build .
|
2021-03-07 20:42:48 +00:00
|
|
|
|
2021-03-02 02:36:10 +00:00
|
|
|
build-windows-msvc:
|
|
|
|
name: Build Windows (MSVC x86_64)
|
2021-04-12 16:29:10 +00:00
|
|
|
if: 'false' # disabled due to memory constraints
|
2021-04-06 19:20:29 +00:00
|
|
|
runs-on: windows-2019
|
2021-03-08 01:40:00 +00:00
|
|
|
env:
|
|
|
|
LLVM_VERSION: 10.0.1
|
2021-03-13 14:41:14 +00:00
|
|
|
Qt_VERSION: 5.15.2
|
2021-04-06 19:20:29 +00:00
|
|
|
IPP_VERSION: 2021.2.0.210
|
2021-03-02 02:36:10 +00:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
with:
|
2021-03-29 22:32:55 +00:00
|
|
|
fetch-depth: 0
|
2021-03-02 02:36:10 +00:00
|
|
|
submodules: recursive
|
2021-03-07 20:42:48 +00:00
|
|
|
|
2021-03-08 01:40:00 +00:00
|
|
|
- name: Install LLVM
|
2021-03-13 16:58:20 +00:00
|
|
|
run: |
|
|
|
|
$TempDir = "$env:RUNNER_WORKSPACE\temp"
|
|
|
|
$Filename = "LLVM-$env:LLVM_VERSION-win64.exe"
|
|
|
|
New-Item -Path "$TempDir" -ItemType Directory -ea 0
|
|
|
|
(New-Object Net.WebClient).DownloadFile("https://axiodl.com/files/$Filename", "$TempDir\$Filename")
|
|
|
|
Start-Process "$TempDir\$Filename" -ArgumentList "/S /D=$env:RUNNER_WORKSPACE\LLVM" -Wait
|
|
|
|
|
|
|
|
- name: Install vcpkg Qt
|
|
|
|
run: |
|
|
|
|
$TempDir = "$env:RUNNER_WORKSPACE\temp"
|
|
|
|
$Filename = "vcpkg-qt-$env:Qt_VERSION.7z"
|
|
|
|
New-Item -Path "$TempDir" -ItemType Directory -ea 0
|
|
|
|
(New-Object Net.WebClient).DownloadFile("https://axiodl.com/files/$Filename", "$TempDir\$Filename")
|
|
|
|
7z x "-o$env:RUNNER_WORKSPACE" -aos "$TempDir\$Filename"
|
2021-03-08 01:16:26 +00:00
|
|
|
|
2021-04-06 19:20:29 +00:00
|
|
|
- name: Install dependencies
|
|
|
|
run: choco install ninja vulkan-sdk
|
2021-03-07 20:42:48 +00:00
|
|
|
|
2021-03-05 14:00:07 +00:00
|
|
|
- name: Enable Visual Studio environment
|
|
|
|
uses: ilammy/msvc-dev-cmd@v1
|
2021-03-07 20:42:48 +00:00
|
|
|
|
2021-03-02 02:36:10 +00:00
|
|
|
- name: Create build directory
|
|
|
|
run: cmake -E make_directory ${{github.workspace}}/build
|
2021-03-07 20:42:48 +00:00
|
|
|
|
2021-03-02 02:36:10 +00:00
|
|
|
- name: Configure CMake
|
|
|
|
working-directory: ${{github.workspace}}/build
|
2021-03-07 20:42:48 +00:00
|
|
|
run: |
|
2021-03-13 14:59:28 +00:00
|
|
|
$workspace = $env:RUNNER_WORKSPACE -replace '\\', '/'
|
2021-03-28 18:07:38 +00:00
|
|
|
cmake $env:GITHUB_WORKSPACE -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo `
|
2021-03-13 16:58:20 +00:00
|
|
|
-DCMAKE_TOOLCHAIN_FILE="$workspace/vcpkg-qt-$env:Qt_VERSION/scripts/buildsystems/vcpkg.cmake" `
|
2021-03-13 17:18:43 +00:00
|
|
|
-DVCPKG_TARGET_TRIPLET=x64-windows-static `
|
2021-03-07 20:42:48 +00:00
|
|
|
-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded -DCMAKE_CXX_FLAGS= -DCMAKE_C_FLAGS= `
|
2021-04-06 19:20:29 +00:00
|
|
|
-DLLVM_ROOT_DIR="$workspace/LLVM"
|
2021-03-07 20:42:48 +00:00
|
|
|
|
2021-03-02 02:36:10 +00:00
|
|
|
- name: Build
|
|
|
|
working-directory: ${{github.workspace}}/build
|
2021-04-06 19:20:29 +00:00
|
|
|
run: cmake --build .
|
2021-03-07 20:42:48 +00:00
|
|
|
|
2021-03-02 02:36:10 +00:00
|
|
|
build-windows-clang:
|
|
|
|
name: Build Windows (Clang x86_64)
|
|
|
|
runs-on: windows-2019
|
2021-03-08 01:40:00 +00:00
|
|
|
env:
|
|
|
|
LLVM_VERSION: 10.0.1
|
2021-03-13 14:41:14 +00:00
|
|
|
Qt_VERSION: 5.15.2
|
2021-04-05 16:23:52 +00:00
|
|
|
IPP_VERSION: 2021.2.0.210
|
2021-03-02 02:36:10 +00:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
with:
|
2021-03-29 22:32:55 +00:00
|
|
|
fetch-depth: 0
|
2021-03-02 02:36:10 +00:00
|
|
|
submodules: recursive
|
2021-03-07 20:42:48 +00:00
|
|
|
|
2021-03-02 02:36:10 +00:00
|
|
|
- name: Install LLVM
|
2021-03-13 16:58:20 +00:00
|
|
|
run: |
|
|
|
|
$TempDir = "$env:RUNNER_WORKSPACE\temp"
|
|
|
|
$Filename = "LLVM-$env:LLVM_VERSION-win64.exe"
|
|
|
|
New-Item -Path "$TempDir" -ItemType Directory -ea 0
|
|
|
|
(New-Object Net.WebClient).DownloadFile("https://axiodl.com/files/$Filename", "$TempDir\$Filename")
|
|
|
|
Start-Process "$TempDir\$Filename" -ArgumentList "/S /D=$env:RUNNER_WORKSPACE\LLVM" -Wait
|
2021-03-10 20:36:19 +00:00
|
|
|
|
2021-03-13 16:58:20 +00:00
|
|
|
- name: Install vcpkg Qt
|
|
|
|
run: |
|
|
|
|
$TempDir = "$env:RUNNER_WORKSPACE\temp"
|
|
|
|
$Filename = "vcpkg-qt-$env:Qt_VERSION.7z"
|
|
|
|
New-Item -Path "$TempDir" -ItemType Directory -ea 0
|
|
|
|
(New-Object Net.WebClient).DownloadFile("https://axiodl.com/files/$Filename", "$TempDir\$Filename")
|
|
|
|
7z x "-o$env:RUNNER_WORKSPACE" -aos "$TempDir\$Filename"
|
2021-03-08 01:16:26 +00:00
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
run: choco install ninja vulkan-sdk
|
2021-03-07 20:42:48 +00:00
|
|
|
|
2021-03-05 14:00:07 +00:00
|
|
|
- name: Enable Visual Studio environment
|
|
|
|
uses: ilammy/msvc-dev-cmd@v1
|
2021-03-07 20:42:48 +00:00
|
|
|
|
2021-03-02 02:36:10 +00:00
|
|
|
- name: Create build directory
|
|
|
|
run: cmake -E make_directory ${{github.workspace}}/build
|
2021-03-07 20:42:48 +00:00
|
|
|
|
2021-03-02 02:36:10 +00:00
|
|
|
- name: Configure CMake
|
|
|
|
working-directory: ${{github.workspace}}/build
|
2021-03-07 20:42:48 +00:00
|
|
|
run: |
|
2021-03-13 14:59:28 +00:00
|
|
|
$workspace = $env:RUNNER_WORKSPACE -replace '\\', '/'
|
2021-03-28 18:07:38 +00:00
|
|
|
cmake $env:GITHUB_WORKSPACE -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo `
|
2021-03-13 16:58:20 +00:00
|
|
|
-DCMAKE_TOOLCHAIN_FILE="$workspace/vcpkg-qt-$env:Qt_VERSION/scripts/buildsystems/vcpkg.cmake" `
|
2021-03-13 17:18:43 +00:00
|
|
|
-DVCPKG_TARGET_TRIPLET=x64-windows-static `
|
2021-03-07 20:42:48 +00:00
|
|
|
-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded `
|
2021-04-05 20:44:27 +00:00
|
|
|
-DCMAKE_C_COMPILER=clang-cl `
|
2021-04-05 20:56:38 +00:00
|
|
|
-DCMAKE_CXX_COMPILER=clang-cl `
|
2021-04-05 20:44:27 +00:00
|
|
|
-DCMAKE_LINKER=lld-link `
|
2021-04-06 19:20:29 +00:00
|
|
|
-DLLVM_ROOT_DIR="$workspace/LLVM"
|
2021-04-06 22:15:33 +00:00
|
|
|
|
|
|
|
- name: Build
|
|
|
|
working-directory: ${{github.workspace}}/build
|
|
|
|
run: cmake --build .
|