165 lines
5.1 KiB
YAML
165 lines
5.1 KiB
YAML
name: Build
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- ci
|
|
paths-ignore:
|
|
- '*.md'
|
|
- 'CMakeSettings.json'
|
|
- 'LICENSE'
|
|
# pull_request:
|
|
|
|
jobs:
|
|
build-linux-gcc:
|
|
name: Build Linux (GCC x86_64)
|
|
runs-on: ubuntu-20.04
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
submodules: recursive
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get -y install cmake ninja-build qt5-default libclang-dev llvm-dev
|
|
|
|
- name: Create build directory
|
|
run: cmake -E make_directory ${{github.workspace}}/build
|
|
|
|
- name: Configure CMake
|
|
working-directory: ${{github.workspace}}/build
|
|
run: |
|
|
cmake $GITHUB_WORKSPACE -GNinja -DCMAKE_BUILD_TYPE=Release
|
|
|
|
- name: Build
|
|
working-directory: ${{github.workspace}}/build
|
|
run: cmake --build . --config $BUILD_TYPE
|
|
|
|
# - name: Generate AppImage
|
|
# env:
|
|
# VERSION: ${{github.run_number}}
|
|
# run: ci/build-appimage.sh
|
|
#
|
|
# - name: Upload artifacts
|
|
# uses: actions/upload-artifact@v2
|
|
# with:
|
|
# name: pwe-${{github.run_number}}-linux-gcc-x86_64
|
|
# path: PrimeWorldEditor-*.AppImage
|
|
|
|
build-macos:
|
|
name: Build macOS (AppleClang x86_64)
|
|
runs-on: macos-10.15
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
submodules: recursive
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
brew install ninja qt@5 graphicsmagick imagemagick
|
|
brew link qt@5
|
|
yarn global add create-dmg
|
|
|
|
- name: Create build directory
|
|
run: cmake -E make_directory ${{github.workspace}}/build
|
|
|
|
- name: Configure CMake
|
|
working-directory: ${{github.workspace}}/build
|
|
run: |
|
|
export PATH="/usr/local/opt/qt@5/bin:$PATH" # FIXME remove
|
|
cmake $GITHUB_WORKSPACE -GNinja -DCMAKE_BUILD_TYPE=Release
|
|
|
|
- name: Build
|
|
working-directory: ${{github.workspace}}/build
|
|
run: cmake --build . --config $BUILD_TYPE
|
|
|
|
# - name: Import signing certificate
|
|
# uses: devbotsxyz/xcode-import-certificate@master
|
|
# with:
|
|
# certificate-data: ${{ secrets.MACOS_CERTIFICATE_DATA }}
|
|
# certificate-passphrase: ${{ secrets.MACOS_CERTIFICATE_PASSWORD }}
|
|
# keychain-password: ${{ secrets.MACOS_KEYCHAIN_PASSWORD }}
|
|
#
|
|
# - name: Deploy & codesign application
|
|
# working-directory: build/Binaries
|
|
# run: |
|
|
# macdeployqt PrimeWorldEditor.app -sign-for-notarization="${{secrets.MACOS_CODESIGN_IDENT}}" -no-strip
|
|
# create-dmg PrimeWorldEditor.app --identity="${{secrets.MACOS_CODESIGN_IDENT}}"
|
|
# xcrun altool -t osx -f *.dmg --primary-bundle-id com.axiodl.PrimeWorldEditor --notarize-app \
|
|
# -u "${{secrets.MACOS_ASC_USERNAME}}" -p "${{secrets.MACOS_ASC_PASSWORD}}" \
|
|
# --team-id "${{secrets.MACOS_ASC_TEAM_ID}}"
|
|
#
|
|
# - name: Upload artifacts
|
|
# uses: actions/upload-artifact@v2
|
|
# with:
|
|
# name: urde-${{github.run_number}}-macos-appleclang-x86_64
|
|
# path: build/Binaries/*.dmg
|
|
|
|
build-windows-msvc:
|
|
name: Build Windows (MSVC x86_64)
|
|
runs-on: windows-2019
|
|
env:
|
|
LLVM_VERSION: 11.0.1
|
|
Qt_VERSION: 5.15.2
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
submodules: recursive
|
|
|
|
- name: Cache Qt
|
|
id: cache-qt
|
|
uses: actions/cache@v1
|
|
with:
|
|
path: ../Qt
|
|
key: ${{runner.os}}-QtCache-${{env.Qt_VERSION}}
|
|
|
|
- name: Install Qt
|
|
uses: jurplel/install-qt-action@v2
|
|
with:
|
|
version: ${{env.Qt_VERSION}}
|
|
cached: ${{steps.cache-qt.outputs.cache-hit}}
|
|
|
|
- name: Install LLVM
|
|
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://github.com/llvm/llvm-project/releases/download/llvmorg-$env:LLVM_VERSION/$Filename", "$TempDir\$Filename")
|
|
Start-Process "$TempDir\$Filename" -ArgumentList "/S" -Wait
|
|
|
|
- name: Install dependencies
|
|
run: choco install ninja
|
|
|
|
- name: Enable Visual Studio environment
|
|
uses: ilammy/msvc-dev-cmd@v1
|
|
|
|
- name: Create build directory
|
|
run: cmake -E make_directory ${{github.workspace}}/build
|
|
|
|
- name: Configure CMake
|
|
working-directory: ${{github.workspace}}/build
|
|
run: |
|
|
$workspace = $env:RUNNER_WORKSPACE -replace '\\', '/'
|
|
cmake $env:GITHUB_WORKSPACE -GNinja -DCMAKE_BUILD_TYPE=Release
|
|
|
|
- name: Build
|
|
working-directory: ${{github.workspace}}/build
|
|
run: cmake --build . --config $BUILD_TYPE
|
|
|
|
# - name: Upload artifacts
|
|
# uses: actions/upload-artifact@v2
|
|
# with:
|
|
# name: urde-${{github.run_number}}-win32-msvc-x86_64
|
|
# path: |
|
|
# build/Binaries/urde.exe
|
|
# build/Binaries/hecl.exe
|
|
# build/Binaries/hecl-gui.exe
|
|
# build/Binaries/visigen.exe
|